Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →分析專案依賴關係並評估架構健全性。「分析依賴關係」「檢測循環依賴」「架構問題?」「檢查模組耦合」「查找層違規」等觸發。
.claude/skills/wasabeef-253a16/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 65% | 0% |
分析項目的依賴關系,評估架構的健康狀况。
bash/dependency-analysis [選項]
--visual : 可視化顯示依賴關系--circular : 仅檢測循環依賴--depth <數值> : 指定分析深度 (默認: 3)--focus <路徑> : 聚焦于特定模塊/目錄bash# 整個項目的依賴關系分析 /dependency-analysis # 檢測循環依賴 /dependency-analysis --circular # 特定模塊的詳细分析 /dependency-analysis --focus src/core --depth 5
數值化顯示模塊間的依賴關系:
text依賴關系分析報告 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 指標概覽 ├─ 模塊總數: 42 ├─ 平均依賴數: 3.2 ├─ 最大依賴深度: 5 └─ 循環依賴: 檢測到 2 個 ⚠️ 架構违規 ├─ [HIGH] src/domain/user.js → src/infra/database.js │ └─ 領域層直接依賴基礎設施層 ├─ [MED] src/api/auth.js ⟲ src/services/user.js │ └─ 檢測到循環依賴 └─ [LOW] src/utils/helper.js → 12 modules └─ 扇出過度 ✅ 建議操作 1. 引入 UserRepository 接口 2. 重新設計認證服務的职責 3. 按功能拆分辅助函數 📈 依賴關系圖 [用 ASCII 艺術顯示可視化依賴關系圖]
bash# CI/CD 管道中的自動檢查 /dependency-analysis --circular --fail-on-violation # 定義和驗證架構規則 /dependency-analysis --rules .architecture-rules.yml # 追蹤依賴關系的時間變化 /dependency-analysis --compare HEAD~10
yamlrules: - name: "Domain Independence" source: "src/domain/**" forbidden: ["src/infra/**", "src/api/**"] - name: "API Layer Dependencies" source: "src/api/**" allowed: ["src/domain/**", "src/application/**"] forbidden: ["src/infra/**"] thresholds: max_dependencies: 8 max_depth: 4 coupling_threshold: 0.7 ignore: - "**/test/**" - "**/mocks/**"
madge : JavaScript/TypeScript 依賴關系可視化dep-cruiser : 依賴關系規則驗證nx : 單體倉庫依賴關系管理plato : 復杂度與依賴關系综合分析bash# 包含 package.json 的分析 cat package.json /analyze-dependencies "分析這個項目的依賴關系問題" # 結合特定模塊的源代碼 ls -la src/core/ /analyze-dependencies --focus src/core "詳细評估核心模塊的依賴關系" # 與架構文檔對比 cat docs/architecture.md /analyze-dependencies --visual "確認設計文檔與實現的差異"
Other measured skills in the registry, with their headline benchmark lift.