.gemini/skills/ai-instruction-standards/SKILL.md
[UDS] 建立和維護 AI 指令檔案(CLAUDE.md、.cursorrules 等)並採用適當結構
npx skillsauth add asiaostrich/universal-dev-standards .gemini/skills/ai-instruction-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
語言: English | 繁體中文
版本: 1.0.0 最後更新: 2026-01-25 適用範圍: Claude Code Skills
核心標準: 本技能實作 AI 指令檔案標準。完整方法論文件請參閱核心標準。
此技能是三層 AI 協作系統的一部分:
| 層級 | 技能 | 回答的問題 |
|------|------|-----------|
| 行為層(即時) | /ai-collaboration | 「AI 如何準確回應?」 |
| 配置層(會話) | /ai-instruction-standards(此技能) | 「CLAUDE.md 該寫什麼?」 |
| 架構層(長期) | /ai-friendly-architecture | 「如何讓專案對 AI 友善?」 |
本技能協助建立和維護 AI 指令檔案,適當區分通用標準與專案特定配置。
| AI 工具 | 指令檔案 | 格式 |
|---------|----------|------|
| Claude Code | CLAUDE.md | Markdown |
| Cursor | .cursorrules | Markdown |
| Windsurf | .windsurfrules | Markdown |
| Cline | .clinerules | Markdown |
| GitHub Copilot | .github/copilot-instructions.md | Markdown |
| OpenCode | .opencode/instructions.md | Markdown |
| 類型 | 包含內容 | 範例 |
|------|----------|------|
| 通用 | 通用規則 | 「提交前執行測試」 |
| 專案特定 | 具體命令 | 「提交前執行 npm test」 |
# [專案名稱] - AI 指令
## 通用標準
<!-- 適用於任何專案的規則 -->
- Commit 訊息格式
- 程式碼審查清單
- 測試標準
- 反幻覺規則
---
## 專案特定配置
<!-- 此專案獨有的設定 -->
### 技術棧
[你的技術在此]
### 快速命令
[你的建置/測試/部署命令]
### 檔案結構
[你的專案結構]
完整標準請參閱:
AI 助手可使用 YAML 格式檔案以減少 Token 使用:
ai/standards/ai-instruction-standards.ai.yaml| 類別 | 良好範例 | |------|----------| | 提交標準 | 「遵循 Conventional Commits 格式」 | | 程式碼審查 | 「使用 BLOCKING、IMPORTANT、SUGGESTION 前綴」 | | 測試 | 「維持最低 80% 覆蓋率」 | | AI 行為 | 「分析前務必先讀取程式碼」 |
通用區段應避免:
npm test、pytest)cli/src/、/var/www/)Node.js 18、Python 3.11)| 類別 | 範例 |
|------|------|
| 技術棧 | Node.js 18、React 18、PostgreSQL 15 |
| 命令 | npm run lint、./scripts/deploy.sh |
| 檔案結構 | src/、cli/、tests/ |
| 團隊慣例 | 繁體中文註解 |
## 通用標準
[通用內容]
## 專案特定配置
[專案特定內容]
> ⚠️ **專案特定**:本區段包含此專案獨有的配置。
### 技術棧
...
<!-- 通用:以下適用於所有專案 -->
### Commit 訊息格式
...
<!-- 專案特定:為你的專案自訂 -->
### 快速命令
...
使用多個 AI 工具時,保持一致性:
project/
├── CLAUDE.md # Claude Code 指令
├── .cursorrules # Cursor 指令(可從 CLAUDE.md 匯入)
├── .windsurfrules # Windsurf 指令
└── .github/
└── copilot-instructions.md # Copilot 指令
最佳實踐:建立共用的 docs/ai-standards.md 並從各工具檔案引用,避免重複。
提交 AI 指令檔案變更前:
本技能支援專案特定配置。
CLAUDE.md 或等效檔案若未找到 AI 指令檔案:
.gitignore| 版本 | 日期 | 變更 | |------|------|------| | 1.0.0 | 2026-01-25 | 初始發布 |
本技能以 CC BY 4.0 授權發布。
來源: universal-dev-standards
development
[UDS] 扫描代码库的调试残留与代码质量问题;可自动修正安全模式。 Use when: before committing, during PR review, or periodic codebase cleanup. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 扫描, 清理.
tools
[UDS] 从规格衍生 BDD 场景、TDD 骨架或 ATDD 表格
development
[UDS] 识别重复流程并以正确的开发深度构建 Skill
tools
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.