Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Defines React environment, component architecture, state flow, build checks and security standards from repo evidence.
58% 83%+25 ptsof test cases passed
Passed 20 of 24 test cases with the skill, and 14 of 24 without it.
This test ran on v10. v13 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
864 agent runs
在应用工具或框架相关规则之前,先检查 package.json、锁文件、TypeScript/构建配置、CI 定义以及具有代表性的组件。只有当仓库依据明确指出时,才可将 React、Vite、Next.js、状态库、表单库或脚本视为可用。将基于周边模式得出的结论标注为推断结果。当某个缺失的决策会影响渲染架构、兼容性、安全性或验证方式时,停下来并指出所需的具体依据或用户决策。
以下规则适用于仓库配置已确认为基于 TypeScript 的 React 应用的情况。通过将当前需求与约束映射到组件职责、状态归属、服务端/客户端边界以及可观测的验证点来选择架构。
// 构建工具环境变量(仅限公开值;客户端暴露的变量需要 VITE_ 前缀)
const config = {
apiUrl: import.meta.env.VITE_API_URL || 'http://localhost:3000',
appName: import.meta.env.VITE_APP_NAME || 'My App'
}
// 在前端中不可用
const apiUrl = process.env.API_URL
.env 文件排除在版本控制之外,并为所需的变量名提供不含机密信息的示例文件处理机密信息的正确方式:
// 安全风险:API 密钥在浏览器中暴露
const apiKey = import.meta.env.VITE_API_KEY
const response = await fetch(`https://api.example.com/data?key=${apiKey}`)
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.