opencode-refactor-agent
v0.1.2
Published
OpenCode plugin with a CLI installer. Note: npm install/bun add only installs the package; run `npx opencode-refactor-agent install` to configure OpenCode.
Downloads
286
Readme
opencode-refactor-agent
Add a safe refactor primary agent to OpenCode without replacing build or plan.
Why use this
- Review-first workflow: analyze before editing.
- Safer changes: asks for explicit confirmation before applying refactors.
- Better focus: choose
legibility,performance, ormaintainability. - Keeps behavior stable: designed for low-risk, incremental improvements.
Refactor vs Build
- Use
refactorwhen you want to improve code quality without changing features. - Use
buildwhen you want to implement or change functionality directly.
Installation
npx opencode-refactor-agent@latest installImportant: npm install opencode-refactor-agent or bun add opencode-refactor-agent only installs the package.
It does not configure OpenCode automatically.
Run npx opencode-refactor-agent@latest install (or bunx opencode-refactor-agent@latest install) to enable the plugin.
This adds opencode-refactor-agent@latest to ~/.config/opencode/opencode.json.
Quick start
Check that the agent is available:
opencode agent listYou should see refactor (primary) together with build and plan.
Run your first refactor:
/refactor src/services/userCommands
/refactor <scope>
/refactor-legibility <scope>
/refactor-performance <scope>
/refactor-maintainability <scope>Manual config
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-refactor-agent@latest"]
}Uninstall
npx opencode-refactor-agent@latest uninstallLicense
MIT
