用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill ai-friendly-architecture命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
[UDS] 以 Claude 原生 Agent tool 编排多任务执行计划(DAG-based,无外部引擎)。 Use when: executing a plan.json file with parallel/sequential task dependencies. Keywords: orchestrate, plan, execute, DAG, task plan, 编排, 执行计划, 并行.
[UDS] 从 Spec 文档、OpenSpec 变更或自由文本需求生成 plan.json。 Use when: converting specifications into executable task plans for /orchestrate. Keywords: plan, spec, task plan, 计划, 规格, 任务, plan.json, DAG.
[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, 推送, 保护分支, 质量门禁.
正在显示 SKILL.md
基于 SOC 职业分类
| name | ai-friendly-architecture |
| source | ../../../../skills/ai-friendly-architecture/SKILL.md |
| source_version | 1.0.0 |
| translation_version | 1.0.0 |
| last_synced | "2026-02-05T00:00:00.000Z" |
| status | current |
| scope | universal |
| description | [UDS] 設計 AI 友善架構,包含明確模式、分層文件和語義邊界 |
語言: English | 繁體中文
版本: 1.0.0 最後更新: 2026-01-25 適用範圍: Claude Code Skills
核心標準: 本技能實作 AI 友善架構。完整方法論文件請參閱核心標準。
本技能協助設計專案架構,透過明確模式、分層文件和語義邊界,最大化 AI 協作效能。
| 原則 | 描述 | 效益 |
|---|---|---|
| 明確優於隱含 | 明確記錄行為 | AI 無需猜測即可理解 |
| 分層上下文 | 多層級文件 | 依任務提供適當細節 |
| 語義邊界 | 清晰的模組邊界 | 獨立分析 |
| 可發現結構 | 自我說明的結構 | 快速定位 |
| 層級 | Token 預算 | 內容 |
|---|---|---|
| L1: 快速參考 | < 500 | 單行說明、API 簽章、入口點 |
| L2: 詳細 | < 5,000 | 完整 API 文件、使用範例 |
| L3: 範例 | 無限制 | 完整實作、邊界案例 |
project/
├── .ai-context.yaml # AI 上下文配置
├── docs/
│ ├── QUICK-REF.md # 第 1 層文件
│ └── ARCHITECTURE.md # 第 2 層文件
├── src/
│ └── auth/
│ ├── index.ts # 入口點與模組標頭
│ ├── QUICK-REF.md # 模組快速參考
│ └── README.md # 模組文件
└── CLAUDE.md # AI 指令檔案
/**
* ═══════════════════════════════════════════════════════════
* 模組: [模組名稱]
* ═══════════════════════════════════════════════════════════
*
* 目的: [單句描述]
*
* 相依性:
* - [dep1]: [原因]
* - [dep2]: [原因]
*
* 匯出:
* - [function1](params): [描述]
* - [function2](params): [描述]
*
* 配置:
* - [CONFIG_VAR]: [描述]
*
* ═══════════════════════════════════════════════════════════
*/
完整標準請參閱:
AI 助手可使用 YAML 格式檔案以減少 Token 使用:
ai/standards/ai-friendly-architecture.ai.yaml# .ai-context.yaml - AI 上下文配置
version: 1.0.0
project:
name: my-project
type: web-app # web-app | library | cli | api | monorepo
primary-language: typescript
modules:
- name: auth
path: src/auth/
entry: index.ts
description: 驗證與授權
dependencies: [database, crypto]
priority: high
- name: api
path: src/api/
entry: routes.ts
description: REST API 端點
dependencies: [auth, database]
priority: high
analysis-hints:
entry-points:
- src/main.ts
- src/index.ts
ignore-patterns:
- node_modules
- dist
- "*.test.ts"
| 優先級 | 內容類型 | 原因 |
|---|---|---|
| 1 | 入口點 | 應用程式結構 |
| 2 | .ai-context.yaml | 模組地圖和相依性 |
| 3 | QUICK-REF 檔案 | 快速 API 理解 |
| 4 | 修改的檔案 | 與任務直接相關 |
| 5 | 相依鏈 | 變更的上下文 |
| 反模式 | 問題 | 解決方案 |
|---|---|---|
| 魔術字串 | AI 無法追蹤常數 | 帶文件的型別常數 |
| 隱式路由 | 隱藏行為 | 明確路由映射 |
| 全域狀態 | 不可預測的相依性 | 依賴注入 |
| 循環相依 | 上下文混亂 | 階層式相依 |
| 單體檔案 | 上下文溢出 | 專注的模組 |
.ai-context.yaml 含模組清單QUICK-REF.md.ai-context.yaml 配置QUICK-REF.md本技能支援專案特定配置。
.ai-context.yamlQUICK-REF.md 檔案若未找到配置:
.ai-context.yaml 範本QUICK-REF.md| 版本 | 日期 | 變更 |
|---|---|---|
| 1.0.0 | 2026-01-25 | 初始發布 |
本技能以 CC BY 4.0 授權發布。
After /ai-friendly-architecture completes, the AI assistant should suggest:
AI 友善架構指南已掌握。建議下一步 / AI-friendly architecture guide understood. Suggested next steps:
- 執行
/sdd將 AI 友善架構設計納入正式規格 ⭐ Recommended / 推薦 — 確保架構決策有規格追蹤 / Ensure architecture decisions are tracked in specs- 建立
.ai-context.yaml和QUICK-REF.md— 立即實作 AI 友善結構 / Implement AI-friendly structure immediately- 執行
/ai-instruction-standards更新 CLAUDE.md 以反映架構配置 — 讓 AI 指令檔案與架構保持同步 / Keep AI instruction files in sync with architecture
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-01-25 | Initial release |
This skill is released under CC BY 4.0.
Source: universal-dev-standards