From praxis
Runs 15 structural checks on code for readability, structure, safety, purity, and design. Complements TDD by verifying design quality.
How this skill is triggered — by the user, by Claude, or both
Slash command
/praxis:code-quality-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step.
EXTREMELY_IMPORTANT: This is a MANDATORY protocol, not a suggestion. Follow every step. Do not skip steps. Do not combine steps. Do not summarize. Work through each gate in order.
Tests verify that code WORKS. This protocol verifies that code is WELL-DESIGNED. Run these checks on any significant code you write or review.
Work through each. Mark PASS, FAIL, or N/A. Do not skip any applicable check.
1. NAMING — Does every variable, function, and class name reveal its intent?
processData() → FAIL. extractValidEmails() → PASS.isValid, hasPermission, canExecute.2. FUNCTION SIZE — Does every function do exactly one thing?
3. NESTING DEPTH — Is anything nested deeper than 2 levels?
4. SINGLE RESPONSIBILITY — Does each module/class have exactly one reason to change?
5. COUPLING — Can you change module A without touching module B?
6. COHESION — Is everything inside this module related to the same concern?
7. FAIL FAST — Do errors surface immediately with clear messages?
8. IDEMPOTENCY — What happens if this operation runs twice?
9. INPUT VALIDATION — Are all inputs validated at the boundary?
10. COMMAND-QUERY SEPARATION — Does every function either return data OR change state?
11. IMMUTABILITY — Is data mutated, or are new copies created?
const over let. Prefer map/filter/reduce over mutating loops.12. SURPRISE CHECK — Would a reader be surprised by ANY behavior?
13. COMPOSITION — Is inheritance used where composition would work?
14. ORTHOGONALITY — If you change feature X, how many other files change?
15. SIMPLICITY — Is this the simplest approach that solves the problem?
After completing all checks:
CODE QUALITY ANALYSIS
├── Readability: Naming [P/F] | Size [P/F] | Nesting [P/F]
├── Structure: SRP [P/F] | Coupling [P/F] | Cohesion [P/F]
├── Safety: FailFast [P/F] | Idempotent [P/F] | Validation [P/F]
├── Purity: CQS [P/F] | Immutable [P/F] | NoSurprise [P/F]
├── Design: Composition [P/F] | Orthogonal [P/F] | Simple [P/F]
├── Score: [X/15 passed]
└── Action items: [list any FAIL items with specific fix]
Code with 3+ FAIL items in the Safety or Structure categories should not
ship without remediation. Flag these as blocking issues in code review.
Rationalizations this skill catches:
After the 15-check analysis is complete:
If Superpowers is installed → pass the quality report to Skill(superpowers:requesting-code-review)
or the active Superpowers review workflow. FAIL items become required fixes in the review.
Safety and Structure FAILs are blocking items that Superpowers' code reviewer should enforce.
If Superpowers is NOT installed → present the report to the user with specific fix recommendations for each FAIL item.
npx claudepluginhub xd4o/praxis --plugin praxisEvaluates code complexity, readability, design principles, error handling, and testability. Designed for use by review orchestrators to assess maintainability.
Conducts multi-axis code review across correctness, readability, architecture, security, and performance. Use before merging any change.
Conducts multi-axis code reviews evaluating correctness, readability, architecture, security, and performance before merging changes.