From openmole
Scans source code for bad smells (code smells) and generates a badsmells.md report. Supports Python, Java, and TypeScript. Part of the OpenMole workflow for change management and refactoring.
How this skill is triggered — by the user, by Claude, or both
Slash command
/openmole:openmole-exploreThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
用户运行 `mole:explore` 或需要识别/更新坏味道清单时。
用户运行 mole:explore 或需要识别/更新坏味道清单时。
openmole/config.yaml → current_change{change_dir} = openmole/changes/{change_name}/openmole/config.yaml → 提示从 templates/openmole-config.yaml.example 创建| 条件 | 行为 |
|---|---|
无 current_change | 新建 change;名称由 [change-name] 指定或 Agent 提议 + 用户确认 |
有 active change 且未传 [change-name] | 询问:继续当前(升版 badsmells)/ 新建 change |
显式 [change-name] | 目录不存在则创建;存在则在该 change 内升版 |
新建 change 时:
openmole/changes/<name>/、.openmole-change.yaml(见 templates/openmole-change.yaml)openmole/config.yaml 的 current_changeopenmole/changes/*/badsmells.md 与 openmole/changes/archive/*/badsmells.md §2.0(规范化路径, Fowler 标签)[path] 默认 .BS-<CATEGORY>-<NNN>{change_dir}/badsmells.mdtemplates/badsmells-header.md + badsmells-entry.mdgit rev-parse HEAD 填提交版本Python:pytest、unittest.mock
Java:JUnit、Mockito
TypeScript:jest/vitest
清晰性、一致性、可读性、复用性、可扩展性、健壮性、安全性、简洁性。
每次 mole:apply 仅处理一个未完成任务。
七字段 + §2.0 状态:未清除 / 已消除 / 部分残余。
升版时 提交版本 = git rev-parse HEAD,未提交填 —。
探索完成后,建议继续执行 mole:plan 进行任务分解。
[SDD] 标记项未获批准即改生产代码npx claudepluginhub agiledon/openmoleVerifies consistency between badsmells and tasks within an OpenMole change using diff validation. Must run after mole:plan and before mole:apply.
Identifies code smells, assesses refactoring risk, and builds incremental execution plans with rollback strategies. Activates on refactoring, code cleanup, tech debt, or duplication reduction requests.
Diagnoses code smells, design traps, and risks with evidence; produces report deciding refactor vs rewrite and prioritizing targets.