/senior-dev:code-criticfrom senior-dev
Conducts independent architectural code reviews evaluating cyclomatic complexity, DRY violations, SOLID principles, anti-patterns, maintainability, and interface robustness. Returns a quality score and formal critique.
Ships in senior-dev. 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.
This skill provides an uncompromising, independent architectural code review discipline. Operating as an objective Senior Code Critic, it systematically inspects source code for excessive cyclomatic complexity, code duplication (DRY violations), SOLID principles non-conformance, object-oriented and architectural anti-patterns, maintainability friction, and interface brittleness.
Unlike conventional linters or superficial PR approvals, this skill conducts deep structural evaluations, calculates an empirical quality score, and returns a formal review in its final message (no report file is written).
code-implementer.qa-tester or testing-expert.blackbox-tester.adversarial-challenger.compliance-verifier and security-audit.The code critique process evaluates code across six structural dimensions and returns the standard review in the final message.
Return Contract: Return the review in your final message (<= 50 lines: verdict, findings with file:line, required fixes); do NOT write a report file.
flowchart TD
START["Inspect Git Diff / Modified Files"] --> D1["1. Cyclomatic Complexity & Nesting"]
D1 --> D2["2. DRY & Duplication Elimination"]
D2 --> D3["3. SOLID Principles Adherence"]
D3 --> D4["4. Anti-Patterns & Code Smells"]
D4 --> D5["5. Maintainability & Cognitive Load"]
D5 --> D6["6. Interface Robustness & Error Paths"]
D6 --> RUBRIC["Calculate Quality Score (0 - 100%)"]
RUBRIC --> VERDICT{"Evaluate Thresholds"}
VERDICT -->|">=85% (No Dim <3)"| PASS["PASSED: Return review in final message"]
VERDICT -->|"70-84% (No Dim <2)"| COND["CONDITIONAL PASS: Actionable tech-debt log"]
VERDICT -->|"<70% or Critical Blocker"| REJECT["REJECTED: Detailed blocker remediation plan"]
Cyclomatic Complexity & Control Flow:
if/else ladders, and arrow-shaped code.DRY (Don't Repeat Yourself) & Redundancy:
SOLID Principles Adherence:
Architectural Anti-Patterns & Code Smells:
Maintainability & Cognitive Load:
Interface Robustness, Error Handling & Type Safety:
try/except without logging or re-raising).Each dimension is scored from 1 (unacceptable) to 5 (exemplary). The weighted score is compiled into a 30-point baseline and normalized to a 100% scale.
| Dimension | Weight | Max Points | Passing Standard (>= 4) |
|---|---|---|---|
| 1. Cyclomatic Complexity & Control Flow | 20% | 5 | $CC \le 10$, nesting depth $\le 3$, flat control flow |
| 2. DRY & Duplication Elimination | 15% | 5 | Reusable abstractions, zero duplicate validation or business logic |
| 3. SOLID Principles Adherence | 25% | 5 | Clean SRP boundaries, dependency injection, pure interface contracts |
| 4. Architectural Anti-Patterns | 15% | 5 | Zero God classes, no feature envy or leaky abstractions |
| 5. Maintainability & Cognitive Load | 10% | 5 | Concise functions ($\le 30$ lines), clear English naming, high readability |
| 6. Interface Robustness & Error Paths | 15% | 5 | Complete type hints, exhaustive validation, robust error propagation |
code-implementer with concrete line-by-line remediation steps.<= 50 lines)Do NOT write a review file. Return a Zero-Fluff review in your final message strictly capped at <= 50 lines (<= 20 lines on clean passes) conforming to the Critic Review Template. Omit empty dimension prose sections—output ONLY the compact metadata header, the 6-dimension rubric summary table, and actionable defects (or None. when clean):
# Critic Code Review Report
- **Feature**: `<feature-name>` | **Date**: `YYYY-MM-DD` | **Diff Ref**: `HEAD`
- **Reviewer**: `critic` | **Verdict**: `[PASSED | CONDITIONAL PASS | REJECTED]` | **Score**: `[XX.X]/30 ([XX]%)`
## 1. Quality Scoring Summary
| Dimension | Weight | Score (1-5) | Weighted | Key Metric / Threshold |
| :--- | :---: | :---: | :---: | :--- |
| **1. Cyclomatic Complexity** | 20% | `[1-5]` | `[X.X]` | Max `CC <= 10`, nesting `<= 3` |
| **2. DRY & Duplication** | 15% | `[1-5]` | `[X.X]` | Zero duplicated domain/validation logic |
| **3. SOLID Principles** | 25% | `[1-5]` | `[X.X]` | SRP, OCP, LSP, ISP, DIP invariants |
| **4. Anti-Patterns & Smells** | 15% | `[1-5]` | `[X.X]` | Zero God classes, Feature Envy, leaky layers |
| **5. Maintainability** | 10% | `[1-5]` | `[X.X]` | Functions `<= 30-40` LOC, clear English names |
| **6. Interface Robustness** | 15% | `[1-5]` | `[X.X]` | Strict typing, zero swallowed exceptions |
| **Total** | **100%** | — | **`[XX.X]/30`** | `PASSED >= 85%` \| `CONDITIONAL 70-84%` \| `REJECTED < 70%` |
## 2. Actionable Defects (Write `None.` on clean `PASSED`)
| Priority | Dimension | File & Line | Defect Summary | Required Remediation |
| :---: | :---: | :--- | :--- | :--- |
| `P0` | SOLID / SRP | `path/to/file:L#` | God method handling multi-domain logic | Split into dedicated service classes |
### Review checklist in docs/<feature-name>/spec.md (or the change row in PLAN.md) and answer every item OK or FAIL file:line in your verdict. A wiring row whose production code registers a stand-in (Fake, Mock, InMemory, Stub) or returns fixed records is FAIL.Reviewers inspect code using AST analysis tools, diff inspectors, and complexity metrics:
# Measure cyclomatic complexity with radon (Python)
radon cc src/ -s -a
# Measure maintainability index with radon (Python)
radon mi src/ -s
# Run ESLint complexity and maintainability rules (TypeScript/JavaScript)
npx eslint src/ --rule "complexity: [error, 10]" --rule "max-depth: [error, 3]"
# Dart complexity analysis
dart analyze --fatal-infos
file:line findings."critic subagent; inspect files using Read and Grep; return the review in the final message (no Write).critic subagent; inspect code using Read and Grep; calculate scores and return the review in the final message (no file).except: pass or empty catch blocks).file:line locations and actionable remediations.<= 50 lines Zero-Fluff cap (<= 20 lines on clean passes).docs/ instead of returning it in the final message.file:line references.PASSED, CONDITIONAL PASS, or REJECTED).<= 50 lines Zero-Fluff cap (<= 20 lines when clean, omitting empty prose sections).code-implementer.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jggomez/expert-ai-developer-skills --plugin senior-dev15 skills in this plugin
/adversarial-challengerAdversarial stress testing, fuzzing, worst-case inputs, failure-path probes, timeout/reconnection simulations, and concurrency/memory stress./blackbox-testerBlack-box browser verification validating real user flows, GUI forms, console/network errors, visual layouts, and 4-viewport screenshot evidence using deterministic Playwright execution./code-implementerGuides the implementation of code using Test-Driven Development (TDD) and clean code principles. Trigger when implementing new features, fixing bugs, or refactoring existing code.Other plugins' skills for the same job