frontend-technical-spec SKILL.md skillA
frontend-technical-spec from shinpr/ai-coding-project-boilerplate is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add shinpr/ai-coding-project-boilerplate/frontend-technical-spec@git:20260923.03f66bePins git:20260923.03f66be in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- shinpr/ai-coding-project-boilerplate
- Path
.claude/skills-zh-CN/frontend-technical-spec/SKILL.md- Versions recorded
- 3
- Latest version
- git:20260923.03f66be, committed Sep 23, 2026
- First version recorded
- Aug 31, 2026
- Size
- 7,126 bytes
- Repository stars
- 234
- License
- MIT
根据仓库依据定义 React 环境、组件架构、状态/数据流、构建验证以及前端非功能性标准。用于配置或设计 React 前端及其构建、运行时边界时使用。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 技术设计规则(前端)
## 前置条件检测
在应用工具或框架相关规则之前,先检查 `package.json`、锁文件、TypeScript/构建配置、CI 定义以及具有代表性的组件。只有当仓库依据明确指出时,才可将 React、Vite、Next.js、状态库、表单库或脚本视为可用。将基于周边模式得出的结论标注为推断结果。当某个缺失的决策会影响渲染架构、兼容性、安全性或验证方式时,停下来并指出所需的具体依据或用户决策。
## 基础技术栈方针
以下规则适用于仓库配置已确认为基于 TypeScript 的 React 应用的情况。通过将当前需求与约束映射到组件职责、状态归属、服务端/客户端边界以及可观测的验证点来选择架构。
## 环境变量管理与安全
### 环境变量管理
- **使用构建工具的客户端暴露机制**:浏览器代码只能读取由所配置的打包工具/框架明确暴露的值;仅服务端可访问的环境变量不会进入客户端包
- 通过配置层集中管理环境变量
- 在应用使用前,在一个类型化的配置边界处解析所有暴露的值
- 仅当需求中定义了值缺失时的有效行为时才为其设置默认值;否则应在启动/构建验证阶段失败,并给出变量名和期望格式
```typescript
// 构建工具环境变量(仅限公开值;客户端暴露的变量需要 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
```
### 安全性(客户端约束)
- **关键**:所有前端代码都是公开的,在浏览器中可见
- **将机密信息保留在服务端**:客户端暴露的配置只应包含公开值;API 密钥、令牌和凭据应由后端或受信任的服务持有
- 将本地 `.env` 文件排除在版本控制之外,并为所需的变量名提供不含机密信息的示例文件
- 只记录和返回当前信任边界所批准的字段;对密码、令牌和个人数据进行脱敏
**处理机密信息的正确方式**:
```typescript
// 安全风险:API 密钥在浏览器中暴露
const apiKey = import.meta.env.VITE_API_KEY
const response = await fetch(`https://api.example.com/data?key=${apiKey}`)
// 正确做法:后端管理机密信息,前端通过代理访问
…Read the whole file at its exact version.
How to install
mdr add shinpr/ai-coding-project-boilerplate/frontend-technical-spec@sha256:8811d125a473087dThe line at the top of this page pins the label git:20260923.03f66be, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_zazpzq5nsm67yfnk)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Aug 31, 2026 and Sep 23, 2026, about one every 11 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260923.03f66be latest | 2026-09-23 | 03f66be | 7,126 B | A | view · diff |
| git:20260901.fbc397a | 2026-09-01 | fbc397a | 7,035 B | A | view · diff |
| git:20260831.b183037 | 2026-08-31 | b183037 | 7,038 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (7126 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
shinpr/ai-coding-project-boilerplate · 234 stars · license MIT · pushed 2026-10-14 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_zazpzq5nsm67yfnk GET https://markdownregistry.com/api/v1/resolve?ref=shinpr/ai-coding-project-boilerplate/frontend-technical-spec GET https://markdownregistry.com/api/v1/blob/8811d125a473087d5c4b81f16cf962e7243d1447e33893425ba453b152d03845
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from shinpr/ai-coding-project-boilerplate
Every file in shinpr/ai-coding-project-boilerplate