/spec:reviewfrom spec
Reviews a story or design spec (not code, a diff or a pull request: use review:deep or review:adversarial for those) and enriches it with codebase-verified technical sub-tasks, architecture alignment checks, design simplification suggestions, and API test plans. Dynamically discovers project architecture at runtime. Was the spec-review skill. Use when: (1) a new story spec needs review before implementation, (2) a spec has high-level tasks but lacks implementation-ready detail, (3) need to verify spec assumptions against actual codebase, (4) a spec references API changes but has no test plan, (5) reviewing specs that reference data shapes or pipeline ordering, (6) spec subtasks mention add field X to object Y or call function at line N.
Ships in spec. 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; scripts run unread.
Paths: Commands call this skill's scripts as
"${CLAUDE_SKILL_DIR}/scripts/<name>.sh". Claude Code replaces${CLAUDE_SKILL_DIR}with this skill's directory before the text reaches you, so the command works from the project directory. A link such as./references/<file>.mdis relative to this skill's directory. A bare path such asscripts/ortests/inside a search refers to the target project being worked on. Values you only know at run time are<NAME>placeholders: write the real value in their place.
Comprehensive spec review combining codebase verification and implementation planning. Discovers project architecture at runtime — works with any codebase structure.
Story specs with technical subtasks frequently contain incorrect assumptions about the codebase — fields on the wrong object, wrong data shapes, incorrect pipeline ordering, unnecessary wrapper functions. These look plausible but cause confusion during implementation.
For every spec subtask that references code, verify these 8 categories:
# Don't assume a field is on the object you expect
grep -rn "fieldName" <service-directory> --include="*.ts" --include="*.js"
Common trap: Enrichment/transform services copy SOME fields from source items but not ALL.
grep -A5 "fieldName" <service-file>
# May reveal { value: number, unit: string } not just a number
Common trap: Duration/time fields are often objects {value, unit} not plain numbers.
# Trace the processing pipeline to verify what data exists at each stage
grep -n "extract\|enrich\|transform\|validate\|process" <orchestrator-file>
Common trap: Integration points may be BEFORE enrichment/transform runs.
grep -A3 "function targetFunction\|const targetFunction" <file>
Common trap: Functions may infer values from their inputs rather than accepting explicit params.
grep -B2 -A2 "fieldName =" <config-or-service-file>
# May reveal: field only set under certain conditions
grep -n "buildDynamic\|delegate\|dispatch\|forward" <relevant-files>
# Find pipeline agents/scripts that run build/enrichment steps
grep -rn "script-name\|task-name" .claude/agents/ scripts/ .github/
# When spec says "function A returns IDs that function B uses for lookup"
# Verify both use the same ID resolution/normalization
grep -A10 "function producer\|function consumer" <service-files>
Common trap: A producer resolves IDs to canonical form but the consumer expects raw values.
After applying the checklist, the spec should have:
# Discover project architecture (layers, services, test tools)
"${CLAUDE_SKILL_DIR}/scripts/discover-project-architecture.sh" "$(git rev-parse --show-toplevel)"
"${CLAUDE_SKILL_DIR}/scripts/discover-project-architecture.sh" "$(git rev-parse --show-toplevel)" --json
# Extract spec sections for analysis
"${CLAUDE_SKILL_DIR}/scripts/extract-spec-sections.sh" "<SPEC_FILE>"
"${CLAUDE_SKILL_DIR}/scripts/extract-spec-sections.sh" "<SPEC_FILE>" --json
# Task checklist for full review
"${CLAUDE_SKILL_DIR}/scripts/task-manifest.sh" full-review
Before starting a full review, create the task checklist from "${CLAUDE_SKILL_DIR}/scripts/task-manifest.sh" full-review:
| # | subject | activeForm |
|---|---|---|
| 1 | Discover architecture and extract spec | Discovering project architecture |
| 2 | Launch 4 parallel analysis agents | Analyzing spec with 4 parallel agents |
| 3 | Synthesize findings into enrichments | Synthesizing review findings |
| 4 | Calculate readiness score | Calculating implementation readiness |
| 5 | Present report and apply enrichments | Presenting review report |
Update rules:
in_progress (TaskUpdate) immediately before starting itcompleted immediately after it succeedscompleted after ALL agents returnin_progress and report the errordeleted1.1 Discover project architecture:
"${CLAUDE_SKILL_DIR}/scripts/discover-project-architecture.sh" "$(git rev-parse --show-toplevel)" --json
The JSON it prints has: packages with layer classification (frontend/backend/mcp/tooling), frameworks per package, test frameworks, API test tools, Bruno folders (if any), E2E framework, data flow patterns, i18n approach, and security patterns.
1.2 Extract spec sections (write the spec's path in place of <SPEC_FILE>, inside the quotes):
"${CLAUDE_SKILL_DIR}/scripts/extract-spec-sections.sh" "<SPEC_FILE>" --json
The JSON it prints has: title, acceptance criteria counts, referenced files and endpoints, sub-task count, and gap detection (missing codebase state, missing test plan).
1.3 Read CLAUDE.md and architecture docs from the project root. Look for:
CLAUDE.md — project-level development rules and conventionsdocs/development/ARCHITECTURE.md or similar — architecture documentationdocs/development/TESTING.md or similar — test strategy documentationThese provide project-specific context that the discovery script can't capture (business rules, data flow conventions, layer responsibility definitions).
Launch ALL four agents in a SINGLE Task tool message.
The
feature-dev:*agent types below require the separately-installedfeature-devplugin. If it is not available, dispatchgeneral-purposeinstead and note the substitution in your output.
| Agent | Type | Purpose | Key Output |
|---|---|---|---|
| Codebase Verifier | feature-dev:code-explorer | Verify every file path, function name, and data shape | Verified/corrected paths, signatures, shapes |
| Architecture Reviewer | feature-dev:code-explorer | Map spec to discovered architecture, identify boundary violations | Architecture alignment report |
| Design Simplifier | feature-dev:code-architect | Analyze for over-engineering, suggest simpler approaches | Simplification recommendations |
| Test Plan Extractor | general-purpose | Extract testable scenarios, design API/E2E test plan | Test plan using project's discovered test tools |
Codebase Verifier — Provide the spec's referenced files/functions/fields and ask:
You are verifying a story specification against the actual codebase.
SPEC TITLE: [title]
SPEC FILE: [path]
FILES REFERENCED IN SPEC:
[list from extraction]
FUNCTIONS REFERENCED:
[list of function names and claimed signatures]
YOUR TASK:
1. Verify each referenced file EXISTS at the claimed path
2. Verify each function has the claimed SIGNATURE
3. Verify each data shape matches reality (field names, types, nesting)
4. Check line number references are still accurate
5. Report DISCREPANCIES between spec claims and actual codebase
OUTPUT FORMAT:
- VERIFIED: [path/function] — matches spec
- CORRECTED: [path/function] — spec says X, actual is Y
- MISSING: [path/function] — does not exist in codebase
Architecture Reviewer — Inject discovered architecture into the prompt:
You are reviewing a story specification for architecture alignment.
SPEC TITLE: [title]
SOLUTION OVERVIEW: [paste solution section]
SUB-TASKS: [paste sub-task list]
PROJECT ARCHITECTURE (discovered at runtime):
[Paste the architecture JSON from step 1.1 — layers, services, frameworks]
PROJECT RULES (from CLAUDE.md):
[Paste relevant architecture rules from CLAUDE.md]
YOUR TASK:
1. Identify the project's layer boundaries from the discovered architecture
2. Check each sub-task respects layer boundaries
3. Map spec requirements to EXISTING services that already handle similar work
4. Flag missing cross-cutting concerns (CSRF, caching, i18n — based on discovered patterns)
5. Check if data flow follows the project's established direction
OUTPUT FORMAT:
- ALIGNED: [sub-task] — correctly uses [layer/service]
- VIOLATION: [sub-task] — [description of violation and fix]
- REUSE: [sub-task] — existing [service/function] already handles this
- MISSING: [concern] — spec should address [security/cache/i18n/etc.]
Design Simplifier — Provide the spec's technical design:
You are reviewing a story specification for over-engineering.
SPEC TITLE: [title]
TECHNICAL DESIGN: [paste design section]
SUB-TASKS: [paste all sub-tasks with details]
SUB-TASK COUNT: [N]
NEW FILES PROPOSED: [list]
SIMPLIFICATION PATTERNS:
[Paste the full contents of ${CLAUDE_SKILL_DIR}/references/design-simplification-checklist.md here — inline the content; do not pass the file path to the sub-agent]
YOUR TASK:
1. For each sub-task, ask: "Can this be done more simply?"
2. Check for unnecessary abstractions (wrappers, managers, helpers used once)
3. Check for redundant infrastructure (new cache when upstream caches exist)
4. Check for over-scoped changes (refactoring, observability, feature flags)
5. Propose concrete simplifications with rationale
OUTPUT FORMAT:
- KEEP: [sub-task] — appropriately scoped
- SIMPLIFY: [sub-task] — [current approach] → [simpler approach] because [reason]
- REMOVE: [sub-task] — unnecessary because [reason]
- MERGE: [sub-tasks X+Y] → single sub-task because [reason]
Test Plan Extractor — Use discovered test tools:
You are extracting testable use cases from a story specification.
SPEC TITLE: [title]
ACCEPTANCE CRITERIA: [paste all ACs]
ENDPOINTS AFFECTED: [list of API routes/tools]
PROJECT TEST INFRASTRUCTURE (discovered):
- API Test Tool: [e.g., Bruno, Postman, HTTP Client, or none]
- API Test Folders: [list from discovery, or "none detected"]
- Unit Test Framework: [e.g., Jest, Vitest, pytest per package]
- E2E Framework: [e.g., Playwright, Cypress, or none]
SCENARIO CATEGORIES:
HP (Happy Path, P0) | VAL (Validation, P0) | EDGE (Edge Cases, P1)
DC (Data Contract, P0) | REG (Regression, P1) | LOC (Localization, P1) | PERF (Performance, P2)
YOUR TASK:
1. For each acceptance criterion, identify testable API scenarios
2. Classify each scenario (HP/VAL/EDGE/DC/REG/LOC/PERF)
3. Determine the correct test location based on discovered folder structure
4. Identify shared fixtures/sessions that can be reused
5. Define key assertions for each test
6. Check for existing tests that might already cover scenarios
7. Note scenarios better suited for unit tests or E2E
OUTPUT FORMAT:
## API Test Plan
### Test Summary
| ID | Scenario | Category | File | Folder | Priority |
### Coverage Matrix
| Acceptance Criterion | Test(s) | Gap? |
### Test Specifications
1. **TEST.1** Create [folder/file] — [description with key assertions]
When CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is enabled, Phase 2 can use a team instead
of 4 parallel Agent calls. Benefits:
Team workflow:
TeamCreate("spec-{spec-name}-review")TeamDelete cleanupDefault: Sub-agent mode (no teams). Teams are opt-in when enabled.
After all agents return, synthesize findings into spec enrichments.
## Current Codebase State
**What EXISTS (verified):**
- `exact/path/to/file.ext` — functionName(params): ReturnType (line XX)
**What needs to be MODIFIED:**
- `exact/path/to/file.ext` — [specific change description]
**What needs to be CREATED:**
- `exact/path/to/new-file.ext` — [purpose and responsibility]
## Design Simplification Notes
1. **[Sub-task X]**: [Current approach] → [Simpler approach] — [rationale]
Each sub-task must have: File, Function, Change, Verification command, Dependencies, Estimated complexity (S/M/L).
Formatted using the project's discovered test tool conventions (Bruno .bru files,
Postman collections, plain HTTP files, or unit test specifications).
| Dimension | Score (1-5) | Notes |
|---|---|---|
| Codebase Accuracy | X | How many refs were correct vs corrected |
| Architecture Alignment | X | How many violations found |
| Design Simplicity | X | Complexity score from simplifier |
| Test Coverage | X | % of ACs mapped to tests |
| Sub-Task Completeness | X | Are all sub-tasks implementation-ready? |
| Overall Readiness | X/25 |
Readiness levels:
Present findings as a structured report with:
Ask the user whether to:
specs/reviews/review-X.Y.md)spec:create — generates story specs (this skill reviews them)context:shield — use when a spec references many external docs that need readingWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub abhattacherjee/claude-code-skills --plugin spec3 skills in this plugin
/createCreates detailed story specification files from various inputs (Claude plan, requirement file, prompt, GitHub issue). Discovers project spec conventions at runtime, brainstorms approaches with vertical splitting recommendations for large stories, generates template-compliant specs, checks for over-engineering, and optionally chains to spec:review. Was the spec-creator skill. Use when: (1) user wants to write a new story spec, (2) converting a plan or requirements into a formal spec, (3) creating specs from GitHub issues, (4) breaking a large feature into shippable vertical slices./implementImplements a previously created and reviewed story spec end-to-end: reads the spec, creates a feature branch, implements all sub-tasks with progress tracking, validates acceptance criteria, updates tracking files, and creates a PR. Optionally delegates to separately-installed brainstorming, frontend-design, and ui-from-requirements skills for complex UI work. Was the spec-implement skill. Use when: (1) user says /spec:implement (was /spec-implement) or 'implement this spec', (2) a story spec has been created and reviewed and is ready for implementation, (3) user provides a spec file path to implement.Other plugins' skills for the same job