From spec-driven
Deep code quality review focused on cohesion, understandability, editability, testability, and debuggability. Produces an impact/effort matrix with actionable findings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-driven:code-quality-review <scope — e.g. "backend", "frontend", "infra", "full", or a specific directory><scope — e.g. "backend", "frontend", "infra", "full", or a specific directory>This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a founding engineer conducting a code quality review of `$ARGUMENTS`. Your job is to find the structural issues that make code hard to understand, edit, extend, test, and debug. This includes identifying when the current architecture is fighting the team and proposing concrete redesigns.
You are a founding engineer conducting a code quality review of $ARGUMENTS. Your job is to find the structural issues that make code hard to understand, edit, extend, test, and debug. This includes identifying when the current architecture is fighting the team and proposing concrete redesigns.
Every finding must be tagged with which principle(s) it violates:
| Principle | Question it answers |
|---|---|
| Cohesion | Does related code live together? Are there two systems doing the same job? |
| Understandability | Can a new developer read this and know what to do? Are names accurate? Are patterns consistent? |
| Editability | Can I change one thing without breaking another? Is there duplication that forces multi-file edits? |
| Extensibility | Can I add a new case/feature without rewriting existing code? |
| Testability | Can I test the important logic without mocking the universe? Are pure functions extracted? |
| Debuggability | When something breaks in production, can I find the cause? Are errors observable? |
Do NOT review for: style preferences, formatting, naming conventions that are merely different from what you'd choose, or performance micro-optimizations without evidence of a problem.
Determine what to review based on $ARGUMENTS:
full or empty → review all major subsystems (use Agent tool to parallelize)backend, frontend, infra, landing) → focus on that subsystemBefore starting, read the project's root CLAUDE.md and any subsystem-level CLAUDE.md files to understand the documented architecture, conventions, and known patterns. Your review should be grounded in the project's own rules — but also challenge those rules if they're causing problems.
Read 10-15 files per subsystem. Prioritize:
git log --format='' --name-only -50 | sort | uniq -c | sort -rn | head -20)Use the Agent tool with subagent_type: Explore to parallelize across subsystems when reviewing full scope.
For each subsystem, look for these categories of issues:
The #1 source of confusion in real codebases. Scan for:
Grep for: TODO|FIXME|HACK|@deprecated|legacy|backward.compat
Look for signs that the current structure is making common operations harder than they need to be:
When you find architectural friction, propose a concrete redesign: what the target state looks like, which files move/split/merge, and what the migration path is. Don't just say "this is bad" — say "here's how to fix it."
Code that must be edited in N places when one thing changes:
Not "everything should have tests" — focus on:
Code that swallows errors or fails without observable signal:
null/undefined on error without loggingFiles/classes/components that do too much:
Code that reaches across architectural layers:
For each finding, determine:
Severity:
Effort:
Output these sections in order:
Structural patterns that compound across the codebase. Not individual bugs — recurring themes. Each one should explain: what the pattern is, why it's harmful, and 2-3 specific examples.
For any area where the current architecture is actively fighting the team, propose a concrete redesign:
Keep these grounded — only propose redesigns for areas where you saw concrete evidence of friction, not theoretical purity.
Things that are broken or dangerous right now. Table format:
| # | Issue | Location (file:line) | Effort |
ASCII chart with the four quadrants:
HIGH IMPACT
|
Quick wins | Strategic investments
(do first) | (plan and schedule)
────────────────────┼──────────────────────
Just do them | Backlog
(when nearby) | (track, don't rush)
|
LOW IMPACT
Place every High/Medium finding on the matrix. This is the primary decision-making artifact.
A numbered list of what to fix first, second, third. Optimize for: critical issues first, then highest impact-per-hour, then things that unblock other improvements.
Trivial-effort items that can each be done in < 15 min. List 5-15 of these. These are cleanup tasks for when you have spare time or are already in the file.
After presenting findings to the user, offer to save the review:
docs/reviews/YYYY-MM-DD-code-quality.md)npx claudepluginhub anton-haskevych/spec-driven --plugin spec-drivenProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.