Use when identifying bad code/design and selecting refactor targets - produces a diagnosis report with smells, risks, and refactor vs rewrite decision
Diagnoses code for structural issues and risks to decide between refactoring or rewriting with evidence-backed reports.
npx claudepluginhub withzombies/hyperpowersThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/concurrency-ipc-traps.mdreferences/smell-catalog.mdreferences/test-smells.md<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>
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.