/hyperpowers:refactoring-diagnosisfrom hyperpowers
Diagnoses bad code and design smells with evidence, assesses risk, and produces a structured refactor-vs-rewrite decision report.
Ships in hyperpowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
<skill_overview> Diagnose before refactoring: identify smells and traps with evidence, assess risk, and decide refactor vs rewrite before any code changes. </skill_overview>
<rigidity_level> MEDIUM FREEDOM - The required outputs and evidence standards are strict; the analysis depth and tools used can vary by codebase. </rigidity_level>
<quick_reference>
| Step | Action | Deliverable |
|---|---|---|
| 1 | Define scope and constraints | Scope statement |
| 2 | Gather evidence (code, tests, runtime behavior) | Evidence notes |
| 3 | Map evidence to smells/traps | Smell table |
| 4 | Assess risk and impact | Risk matrix |
| 5 | Decide refactor vs rewrite | Decision + rationale |
| 6 | Produce diagnosis report | Required report format |
| </quick_reference> |
<when_to_use>
<the_process>
State the specific module/component/system boundary you are diagnosing and what is out of scope.
Minimum evidence sources:
Use the catalogs in references:
references/smell-catalog.mdreferences/test-smells.mdreferences/concurrency-ipc-traps.mdFor each smell/trap, cite concrete evidence (file path, function, behavior).
Classify each smell by:
Rules of thumb:
Use this exact structure:
## Scope
- In scope:
- Out of scope:
- Constraints:
## Evidence
- Files reviewed:
- Entry points:
- Tests reviewed:
- Concurrency/IPC boundaries:
## Smells and Traps (Evidence-Backed)
| Smell/Trap | Evidence | Risk | Suggested Refactor Direction |
## Test Smells
| Test Smell | Evidence | Risk | Suggested Fix |
## Concurrency/IPC Traps
| Trap | Evidence | Risk | Suggested Fix |
## Risk Assessment
- Highest risk areas:
- Largest blast radius:
- Most likely regression vectors:
## Refactor vs Rewrite Decision
- Decision:
- Rationale:
## Top Refactor Targets (Prioritized)
1.
2.
3.
## Non-goals
-
## Open Questions
-
</the_process>
<common_rationalizations>
All of these mean: stop and complete diagnosis first.
<red_flags>
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub withzombies/hyperpowers --plugin hyperpowers22 skills in this plugin
/analyzing-test-effectivenessUse to audit test quality with SRE scrutiny - identifies weak tests, missing cases, and creates task docs for improvements/brainstormingUse when shaping a feature before implementation - turns rough ideas into an approved markdown spec and local task directory/building-hooksUse when creating Claude Code hooks - covers hook patterns, composition, testing, progressive enhancement from simple to advanced/debugging-with-toolsUse when encountering bugs or test failures - systematic debugging using debuggers, internet research, and agents to find root cause before fixing/dispatching-parallel-agentsUse when facing 3+ independent failures that can be investigated without shared state or dependencies - dispatches multiple Claude agents to investigate and fix independent problems concurrently/executing-plansUse to execute an approved local markdown task directory iteratively - work the current Now slice, update docs, then stop2 plugins ship this exact skill · first indexed Jul 15, 2026
Other plugins' skills for the same job