agentleFS
seikaikyoseikaikyo/dash-skills/skills/architecture-audit/SKILL.md

architecture-audit

Skill2 starsChanged 10 months agoMITView on GitHub

架構文件稽核。比對 CLAUDE.md 記錄與實際程式碼結構,找出差異並建議更新。大型 refactor 完成後或 OpenSpec 歸檔時手動執行。

Files
SKILL.md

Architecture Audit (架構文件稽核)

When to Use

在以下情況使用此 Skill:

  • 大型 refactor 完成後
  • OpenSpec 歸檔時
  • 新增/刪除多個檔案後
  • 手動執行 /architecture-audit

稽核流程

Step 1: 讀取 CLAUDE.md

cat CLAUDE.md

確認文件存在。若不存在,建議先建立。

Step 2: 掃描實際結構

# 前端
ls -R src/ | head -100

# 後端
ls -R *.py **/*.py | head -100

# 路由數量
grep -c "path:" src/router/index.ts 2>/dev/null || true

Step 3: 比對差異

檢查以下項目:

項目方法
新增的目錄/檔案實際有但 CLAUDE.md 未記錄
刪除的目錄/檔案CLAUDE.md 記錄但實際已不存在
路由數量CLAUDE.md 記錄數 vs 實際數
依賴版本package.json/requirements.txt vs CLAUDE.md
元件數量實際元件數 vs CLAUDE.md 記錄

Step 4: 輸出報告

架構稽核報告
===========
專案: {project_name}
日期: {date}

差異:
+ src/views/NewPage.vue (未記錄)
- src/views/OldPage.vue (已刪除)
~ 路由數量: 文件記 22, 實際 25

建議更新:
1. CLAUDE.md 目錄結構段落加入 NewPage
2. 移除已刪除的 OldPage 記錄
3. 更新路由數量為 25

Step 5: 使用者確認後更新

  • 使用者確認 → 直接更新 CLAUDE.md
  • 使用者拒絕 → 跳過

CLI 指令

# 快速檢查
dash architecture check .

# 詳細差異
dash architecture diff .

# 全專案掃描
dash architecture check --all

注意事項

  • 此 skill 不修改程式碼,只更新文件
  • CLAUDE.md 的目錄結構是參考,不需要列出每個檔案
  • 重點放在結構性變化(新增/刪除目錄、路由數量、依賴版本)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.