devbooks-entropy-monitor
devbooks-entropy-monitor:定期采集系统熵度量(结构熵/变更熵/测试熵/依赖熵),生成量化报告,当指标超阈值时建议重构。用户说"熵度量/复杂度趋势/重构预警/代码健康/技术债务度量"等时使用。
npx skills add majiayu000/claude-skill-registry --skill devbooks-entropy-monitor --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# DevBooks:系统熵度量与预警(Entropy Monitor) ## 渐进披露 ### 基础层(必读) 目标:明确本 Skill 的核心产出与使用范围。 输入:用户目标、现有文档、变更包上下文或项目路径。 输出:可执行产物、下一步指引或记录路径。 边界:不替代其他角色职责,不触碰 tests/。 证据:引用产出物路径或执行记录。 ### 进阶层(可选) 适用:需要细化策略、边界或风险提示时补充。 ### 扩展层(可选) 适用:需要与外部系统或可选工具协同时补充。 ## 推荐 MCP 能力类型 - 代码检索(code-search) - 引用追踪(reference-tracking) - 影响分析(impact-analysis) > 来源:《人月神话》第16章"没有银弹" — "软件实体的复杂性是根本属性...控制复杂性是软件开发的关键" ## 前置:配置发现(协议无关) - `<truth-root>`:当前真理目录根 - `<change-root>`:变更包目录根 执行前**必须**按以下顺序查找配置(找到后停止): 1. `.devbooks/config.yaml`(如存在)→ 解析并使用其中的映射 2. `dev-playbooks/project.md`(如存在)→ Dev-Playbooks 协议,使用默认映射 3. `project.md`(如存在)→ template 协议,使用默认映射 4. 若仍无法确定 → **停止并询问用户** **关键约束**: - 如果配置中指定了 `agents_doc`(规则文档),**必须先阅读该文档**再执行任何操作 - 禁止猜测目录根 - 禁止跳过规则文档阅读 ## 核心理念 **系统熵** = 代码复杂度随时间的增长趋势 熵度量的目标: 1. **定量化**:所有指标都是数值/比率,可对比 2. **趋势可视**:历史数据支持趋势分析 3. **阈值预警**:超阈值时主动建议重构 4. **定期执行**:作为独立任务,不嵌入每次 code review ## 执行方式 1) 先阅读并遵守:`~/.claude/skills/_shared/references/AI行为规范.md`(可验证性 + 结构质量守门)。 2) 严格按完整提示词输出:`references/熵度量方法论.md`。 ## 脚本 | 脚本 | 用途 | 示例 | |------|------|------| | `entropy-measure.sh` | 采集熵指标 | `entropy-measure.sh --project-root /path/to/repo` | | `entropy-report.sh` | 生成报告 | `entropy-report.sh --output report.md` |
- 渐进披露
- 基础层(必读)
- 进阶层(可选)
- 扩展层(可选)
- 推荐 MCP 能力类型
- 前置:配置发现(协议无关)
- 核心理念
- 执行方式
- 脚本
- 指标体系(四维度)
- A) 结构熵(Structural Entropy)
- B) 变更熵(Change Entropy)
- C) 测试熵(Test Entropy)
- D) 依赖熵(Dependency Entropy)
What does the devbooks-entropy-monitor skill do?
devbooks-entropy-monitor:定期采集系统熵度量(结构熵/变更熵/测试熵/依赖熵),生成量化报告,当指标超阈值时建议重构。用户说"熵度量/复杂度趋势/重构预警/代码健康/技术债务度量"等时使用。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill devbooks-entropy-monitor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
