/cook-zh-cn:analyze-dependencies runs instead · from cook-zh-cn
Analyzes project dependency relationships and evaluates architecture health, detecting circular dependencies, layer violations, and excessive coupling.
This skill never runs in Claude Code
It ships in cook-zh-cn at skills/, but /cook-zh-cn:analyze-dependencies (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
分析项目的依赖关系,评估架构的健康状况。
/dependency-analysis [选项]
--visual : 可视化显示依赖关系--circular : 仅检测循环依赖--depth <数值> : 指定分析深度 (默认: 3)--focus <路径> : 聚焦于特定模块/目录# 整个项目的依赖关系分析
/dependency-analysis
# 检测循环依赖
/dependency-analysis --circular
# 特定模块的详细分析
/dependency-analysis --focus src/core --depth 5
数值化显示模块间的依赖关系:
依赖关系分析报告
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 指标概览
├─ 模块总数: 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 艺术显示可视化依赖关系图]
# CI/CD 管道中的自动检查
/dependency-analysis --circular --fail-on-violation
# 定义和验证架构规则
/dependency-analysis --rules .architecture-rules.yml
# 追踪依赖关系的时间变化
/dependency-analysis --compare HEAD~10
rules:
- 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 : 复杂度与依赖关系综合分析# 包含 package.json 的分析
cat package.json
/analyze-dependencies
"分析这个项目的依赖关系问题"
# 结合特定模块的源代码
ls -la src/core/
/analyze-dependencies --focus src/core
"详细评估核心模块的依赖关系"
# 与架构文档对比
cat docs/architecture.md
/analyze-dependencies --visual
"确认设计文档与实现的差异"
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wasabeef/claude-code-cookbook --plugin cook-zh-cn39 skills in this plugin
/analyze-performance基于 Core Web Vitals 的性能分析和 UX 评分基于 Core Web Vitals 的性能分析和 UX 评分。「分析性能」「改善速度」「检查 Core Web Vitals」「页面速度」等触发。/check-fact通过代码库和文档验证信息准确性通过代码库和文档验证信息准确性。「这个信息对吗?」「事实检查」「验证这个」等触发。/check-prompt评估并改进 AI 提示词质量评估并改进 AI 提示词质量。「检查提示词」「评估提示词质量」「改进提示词」等触发。/commit-message从暂存更改生成提交消息从暂存更改生成提交消息。「生成提交消息」「建议 commit message」「写个提交信息」等触发。/context7通过 Context7 MCP 搜索技术文档通过 Context7 MCP 搜索技术文档。「查文档」「查看官方文档」「库怎么用?」等触发。/design-patterns建议设计模式并评估 SOLID 原则建议设计模式并评估 SOLID 原则。「建议设计模式」「可以用什么模式?」「检查 SOLID 原则」「检测反模式」等触发。2 plugins ship this exact skill · first indexed Jul 16, 2026
Other plugins' skills for the same job