From claude-library
Find bugs, anti-patterns, and refactoring opportunities in existing code. Use when you want a targeted scan of a specific module, file, or area — not a full repo audit.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-library:code-diagnosisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Purpose**: Targeted scan of existing code to find bugs, smells, and refactoring opportunities
Purpose: Targeted scan of existing code to find bugs, smells, and refactoring opportunities
Use when:
code-reviewer agent for that)vs
/quality-review: Use/quality-reviewwhen you want a repo-wide health score with weighted categories and a priority matrix. Use/code-diagnosiswhen you want to scan a specific area for concrete issues to fix.vs
code-revieweragent: The agent reviews recent changes (git diff). This skill scans existing code regardless of when it was written.
Confirm the target:
Scan for issues across these categories:
Classify each finding:
Suggest concrete fixes for each finding
## Code Diagnosis: [Target]
### Summary
[2-3 lines: what this code does, overall impression, biggest concern]
### Findings
#### Bugs (fix now)
| # | Location | Issue | Impact |
|---|----------|-------|--------|
| 1 | file.py:42 | [description] | [what goes wrong] |
**Fix**: [specific code change or approach]
#### Smells (fix soon)
| # | Location | Issue | Category |
|---|----------|-------|----------|
| 1 | file.py:88 | [description] | [anti-pattern name] |
**Fix**: [specific code change or approach]
#### Opportunities (fix when convenient)
| # | Location | Issue | Benefit |
|---|----------|-------|---------|
| 1 | file.py:120 | [description] | [what improves] |
**Fix**: [specific code change or approach]
### Refactoring Roadmap
If the user plans to clean this up, suggest an order:
1. [First fix — highest risk or unblocks others]
2. [Second fix]
3. [Third fix]
### What's Actually Fine
[Call out 1-2 things that look good — not everything is broken]
# Scan a specific module
/code-diagnosis src/auth/
# Focus on performance only
/code-diagnosis src/data_pipeline.py focus on performance
# Broad scan of a service
/code-diagnosis src/api/ look for bugs, security issues, and refactoring opportunities
# Quick check before refactoring
/code-diagnosis src/utils/validation.py I'm about to refactor this — what should I know?
npx claudepluginhub tabers77/claude_experimentsDeeply analyzes code to identify technical debt, latent bugs, risks, and improvements using consultant agent with principles, prioritized categories, and health scores.
Performs brutally honest code reviews identifying code smells, anti-patterns, and issues with severity ratings, then refactors proportionally using edit tools. For 'wtf is this' or refactor requests.
Audits code generated by AI tools for structural flaws, fragility, and production risks. Useful for productionizing prototypes or assessing hidden technical debt.