Skip to content

oprogramadorreal/optimus-claude / skills/refactor

refactor

Verified

Refactors code toward project-guideline compliance and testability (so /optimus:unit-test can safely increase coverage) across four analysis lenses, fanned out to parallel agents when the scope warrants it. Supports "testability" or "guidelines" focus plus flexible scoping. Read-only until the user approves the plan; applied changes stay local. Use after /optimus:init, before /optimus:unit-test; for an iterative loop, use /optimus:deep refactor.

FileKindSize
README.mdmarkdown4.8 KB
SKILL.mdskill md10.7 KB
agents/code-simplifier.mdmarkdown1.1 KB
agents/consistency-analyzer.mdmarkdown1.4 KB
agents/guideline-reviewer.mdmarkdown926 B
agents/openai.yamlconfig198 B
agents/shared-constraints.mdmarkdown1016 B
agents/testability-analyzer.mdmarkdown1.3 KB

agents/shared-constraints.md

View on GitHub
# Refactor Agent Constraints

Read `$CLAUDE_PLUGIN_ROOT/references/shared-agent-constraints.md` first — it applies in full. Refactor addendums:

- Analyze the provided files, or the source files in the provided areas.
- Scope-expansion carve-out: cross-file consistency findings are a primary goal of refactor — report them even when the related file lies outside the original scope (the base rule's 3-extra-files-per-finding limit still applies).

## Output format

Report each finding in this exact format. Your agent prompt defines the **Category** values and any fields it adds or replaces.

- **File:** file:line
- **Category:** [per agent prompt]
- **Confidence:** High | Medium | Low — report a Low as Low; never round it up to Medium or drop the finding.
- **Guideline:** [which project guideline this addresses]
- **Issue:** [what is wrong and why it matters]
- **Current:**
  ```
  [relevant snippet — max 5 lines]
  ```
- **Suggested:**
  ```
  [fix or refactoring approach — max 5 lines]
  ```
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall