By agiledon
Manage a bad smell-driven refactoring workflow: scan code for bad smells, generate a structured refactoring plan with tasks, execute tasks incrementally with test verification, and archive completed changes.
执行下一个待处理的 OpenMole 重构任务(OpenMole apply 阶段)
归档当前 OpenMole change 至 openmole/changes/archive/
创建或继续 OpenMole change,扫描坏味道写入 openmole/changes/<name>/badsmells.md
从未清除坏味道生成重构任务 tasks.md(OpenMole plan 阶段)
验证 badsmells.md 与 tasks.md 的差异并同步(OpenMole verify 阶段)
mole:apply — 执行当前 change 下一个未完成的 B-Txx
mole:archive — 检查 change 完成度并归档至 openmole/changes/archive/
mole:explore — 创建/继续 change,扫描源码产出 badsmells.md
mole:plan — 从未清除/部分残余坏味道生成 tasks.md
mole:verify — 当前 change 内 badsmells 与 tasks 差分验证
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Executables (bin/) — files in this plugin's bin/directory are added to the Bash tool's PATH while the plugin is enabled.

Version 0.8.2 · CLI: openmole init · openmole update
npm 官方包名 / npm package name:
openmole
安装:npm install -g openmole· CLI 命令已更名openmole
npm official package name:
openmole— install withnpm install -g openmole. The CLI command isopenmole.
OpenMole is a refactoring methodology and agent plugin framework driven by code bad smells. Rules live in phase skills; project artifacts live under openmole/changes/<change-name>/.
| Command (IDE slash / protocol) | Skill | Phase |
|---|---|---|
/mole-explore · mole:explore | openmole-explore | Create/continue change; identify bad smells |
/mole-plan · mole:plan | openmole-plan | Task breakdown |
/mole-verify · mole:verify | openmole-verify | Verify coverage |
/mole-apply · mole:apply | openmole-apply | Execute refactoring |
/mole-archive · mole:archive | openmole-archive | Archive change |
Main outputs per phase: badsmells.md, tasks.md, analysis.md, and code changes.
openmole/
├── config.yaml # current_change · installed_ides · init_version · init_at
└── changes/
├── <change-name>/
│ ├── badsmells.md
│ ├── tasks.md
│ └── analysis.md
└── archive/
mole:explore → review badsmells → mole:plan → review tasks → mole:verify → mole:apply → user confirm → mole:archive
openmole/ # npm package root
├── bin/openmole.js # CLI entry
├── cli/ # init · update · IDE adapters
├── skills/ # phase skills (openmole-*)
├── commands/ # IDE commands (mole-*.md)
├── .cursor-plugin/ # Cursor manifest
├── .claude-plugin/ # Claude Code manifest
├── .codex/ # Codex install guide
├── gemini-extension.json # Gemini CLI extension
├── .opencode/plugins/openmole.js # OpenCode plugin (zero npm deps at runtime)
└── templates/ # config / gitignore templates
@clack/prompts (CLI only; plugin runtime has no third-party npm deps)npm registry (recommended)
npm install -g openmole
cd /path/to/your-project
openmole init # welcome screen → interactive IDE selection
Clone + link (development)
git clone https://github.com/agiledon/openmole.git
cd openmole && npm install && npm link
cd /path/to/your-project
openmole init
Install CLI from GitHub
npm install -g github:agiledon/openmole
cd /path/to/your-project
openmole init
Package name on npm is
openmole(theopenmolename is taken). The CLI command isopenmole.
After upgrading OpenMole, run openmole update in the target project to refresh IDE configs.
openmole init options| Flag | Description |
|---|---|
--ides cursor,opencode,... | Non-interactive IDE list |
--all | Configure all 7 IDEs |
--none | Workspace only (openmole/) |
--force | Overwrite existing workspace / IDE config |
--global | OpenCode user config (~/.config/opencode/) |
--dry-run | Print plan only |
openmole init will:
openmole/config.yaml, openmole/changes/, openmole/changes/archive/.gitignore (machine-local symlinks)| IDE | Install model |
|---|---|
| Cursor | Project .cursor/skills/ + .cursor/commands/; user symlink ~/.cursor/plugins/local/openmole |
| OpenCode | Project opencode.json → .opencode/plugins/openmole.js (--global → user config) |
| Claude Code | Project .claude/skills/ + .claude/commands/; user symlink ~/.claude/plugins/local/openmole |
| Codex | Project .codex/skills/ (skills only, Codex does not expose slash commands) |
| Gemini CLI | Project .gemini/skills/, .gemini/commands/, .gemini/extensions/openmole symlink |
| Kiro | Project .kiro/skills/, .kiro/commands/ |
| Qoder | Project .qoder/skills/, .qoder/commands/ |
Extend mode: If openmole/config.yaml exists, workspace is preserved; only IDEs missing from installed_ides are configured.
openmole updateRe-install IDE configs listed in openmole/config.yaml installed_ides (use after upgrading OpenMole):
openmole update
openmole update /path/to/project
openmole update --dry-run
npx claudepluginhub agiledon/openmoleDisciplined refactoring using small, verifiable steps based on Fowler's 'Refactoring' and Feathers' 'Working Effectively with Legacy Code'
Code cleanup, refactoring automation, and technical debt management with context restoration
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Codebase exploration, refactoring, and quality analysis
Comprehensive code quality toolkit for detecting code smells, analyzing complexity, and planning refactoring. Includes quality architect agent for strategic technical debt management.
Matt Pocock's agent skills for real engineering — grilling, spec/ticket flows, TDD, code review, domain modelling and more. Plug-and-play, not vibe coding.