From spectre
Runs an independent LLM subagent for comprehensive code review with severity-categorized findings (CRITICAL/HIGH/MEDIUM/LOW), scores, and prioritized action plans. Supports task-list, plan, and ad-hoc work scenarios.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spectre:spectre-code_reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded `$ARGUMENTS` value.
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
comprehensive_code_review.md, but use a scoped filename if one already exists).Optional user input to seed this workflow.
<ARGUMENTS> $ARGUMENTS </ARGUMENTS>
Review Scope Specification - Choose Appropriate Scenario:
Common File Format (All Scenarios):
**Files Modified/Created:**
- `path/to/file.ext` ({created|modified|deleted} - {purpose/what changed})
**Related Files for Review:**
- `path/to/related.ext` ({imports|dependencies|tests|config})
tasks.json exists and was followed)**Work Completed (from Task List):**
- Task 1.1: [exact parent task title + description from tasks.json phases[].parents[]]
- Task 1.2: [exact parent task title + description from tasks.json phases[].parents[]]
- Task 2.1: [exact parent task title + description from tasks.json phases[].parents[]]
[Use common file format above]
plan.md without formal tasks)**Work Completed (from Plan Implementation):**
- Implemented: [specific functionality completed, referencing plan.md sections]
- Delivered: [specific features/capabilities built]
- Completed: [specific plan items addressed]
[Use common file format above]
**Plan Context:**
- Plan Section: [specific sections of plan.md implemented]
- Plan Requirements: [requirements from plan this work addresses]
**Work Completed (Independent Implementation):**
- Implemented: [specific functionality completed]
- Purpose: [why this work was done - bug fix, feature addition, etc.]
- Scope: [what was intended to be delivered]
[Use common file format above]
**Requirements Context:**
- Original Requirements: [extract from task_summary.md, PRD, or user request]
- Acceptance Criteria: [how success is defined for this work]
- Constraints: [any technical or scope constraints that applied]
tasks.json by pulling only relevant phases[].parents[] task titles/descriptions and, when needed, their child subtask titles/descriptions. Do not use execute.md as a reviewer entrypoint, and do not extract work scope from a whole Markdown task file.plan.md/quick_task_plan.md────────────────────────────────────
Review Type: Comprehensive Analysis (All Aspects)
Work Completed for Review:[Choose appropriate format based on work origin - Scenario A, B, or C from Step 2]
Files Modified/Created:[Complete list of files touched during implementation]
path/to/file1.py (created - [brief purpose])path/to/file2.py (modified - [what was changed])path/to/file3.py (deleted - [reason])Related Files to Review:[Dependencies, tests, config files that may be impacted]
path/to/related1.py (imports/dependencies)path/to/test_file.py (test coverage)config/settings.py (configuration changes)Requirements & Context:[Specific requirements and acceptance criteria for work completed - extracted from appropriate documentation based on scenario]
Project Overview:[High‑level feature/bug description, requirements, acceptance criteria]
Documentation Context:docs/tasks/{task_name}/ (if available)
Guidelines & Preferences:[Style guides, architecture rules, naming conventions, test expectations]
FIRST: Gather Task Context
Read Task Documentation: Locate and read files in docs/tasks/{task_name}/:
scope.md or ux.md or prd.md or spec.md or any other scope artifactinitial_plan.md or plan.md or quick_task_plan.md - Implementation approachtasks.json - Specific work items and progress. For task-list reviews, use phases[].parents[] for parent task ids, titles, descriptions, and status; use child subtasks only when needed to clarify the completed work. Do not use execute.md and do not whole-read a legacy Markdown task list.Identify Code Scope: Based on task documentation:
Explore Codebase: Use codebase search tools to:
Code Review Scope Decision: Focus review on code that:
THEN: Proceed with Comprehensive Review
Severity Scale Reference:
Evidence rule: Every CRITICAL or HIGH finding MUST include (1) file:line and (2) a reproducible failure scenario or exploit path describing observable behavior. Findings without an evidence chain are auto-downgraded one severity level. "Could potentially" is not evidence.
Perform comprehensive analysis covering all aspects:
1. Compile/Run Readiness → CRITICAL if prevents execution
2. Structural Soundness → HIGH if affects maintainability
3. Implementation Completeness → HIGH if core functionality missing
4. Logic Validation → CRITICAL if breaks functionality
Input Validation & Injection Prevention → CRITICAL
Authentication & Authorization → CRITICAL for auth bypasses
Data Protection → CRITICAL for data exposure
API & Network Security → HIGH
5. Error Handling & User Safety → HIGH if affects user experience
6. Test Coverage & Quality → MEDIUM if adequate coverage exists
7. Performance Considerations → HIGH if affects UX, MEDIUM otherwise
8. Code Quality & Maintainability → MEDIUM
9. Resource Management → HIGH if causes leaks, MEDIUM otherwise
10. Infrastructure & Configuration → MEDIUM
11. Documentation & Developer UX → LOW
12. Final Polish → LOW
Critical Rule for Review Recommendations:
Structure your review report with these sections:
Work & File Scope Boundary Validation – Confirmation that review aligns with completed work and modified files
Context Collection Summary – Brief overview of task documentation reviewed and code scope identified
Files Reviewed – List of specific files and code areas examined
Summary Assessment – Overall readiness, security posture, and risk level
Detailed Findings by Severity:
🚨 CRITICAL Issues - Must fix before any deployment
[File:Line] Security/Functionality: [Description and fix]🔥 HIGH Priority - Should fix before next stage
[File:Line] Logic/Performance: [Description and fix]⚠️ MEDIUM Priority - Quality improvements
[File:Line] Code Quality: [Description and fix]💡 LOW Priority - Nice-to-have improvements
[File:Line] Polish/Documentation: [Description and fix]Comprehensive Scores (0‑10):
Prioritized Action Plan – Ordered list of fixes by severity and impact
Save the report as Markdown Document (default docs/tasks/{task_name}/reviews/comprehensive_code_review.md; if it already exists, create a scoped variant like docs/tasks/{task_name}/reviews/{task_name}_comprehensive_code_review_{timestamp}.md to avoid overwriting). Create docs/tasks/{task_name} if it does not exist.
Respond to user with summary of only high priority items and point to file. Do not perform fixes yourself.
We are a startup building an early stage product hoping to find Product Market Fit. We must avoid over-engineering like the plague. Stick to YAGNI + SOLID + KISS + DRY principles. All recommendations, while comprehensive, should not over complicate the product or architecture for the stage that we're in.
CRITICAL: DO NOT flag missing features from incomplete work or different scopes. DO NOT suggest improvements beyond what is explicitly requested in completed work. Focus only on ensuring code delivers what was specifically asked for in completed work, not entire project scope.
────────────────────────────────────
Action — CollectReview: Monitor and receive comprehensive code review analysis.
Action — ProcessFindings: Create actionable next steps.
Action — PresentSummary: Present findings to user with numbered, severity‑based summary.
🔍 Comprehensive Code Review Complete **> Overall Assessment: [Brief headline on code readiness, security posture, risk level] **> Review Report Location:
{REVIEW_FILE}Key Findings (Numbered for User Selection)
🚨 Critical Issues (Must Fix Immediately)
[Security/Functionality]: [Brief description with file/line reference]
- Impact: [Why this is critical]
- Recommendation: [Specific fix needed]
[Security/Functionality]: [Brief description with file/line reference]
- Impact: [Why this is critical]
- Recommendation: [Specific fix needed]
🔥 High Priority (Should Fix Next)
[Logic/Performance]: [Brief description with file/line reference]
- Impact: [Quality/performance impact]
- Effort: [Estimated complexity]
[Error Handling]: [Brief description with file/line reference]
- Impact: [User experience impact]
- Effort: [Estimated complexity]
⚠️ Medium Priority (Quality Improvements)
[Code Quality]: [Brief description with file/line reference]
- Benefit: [Maintainability improvement]
- Effort: [Low/Medium complexity]
[Test Coverage]: [Brief description with file/line reference]
- Benefit: [Quality assurance improvement]
- Effort: [Low/Medium complexity]
💡 Low Priority (Polish & Documentation)
- [Documentation]: [Brief description]
- Benefit: [Developer experience improvement]
- Effort: [Low complexity]
@skill-spectre:spectre-guide skill.branch_name=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)
OUT_DIR=${target_dir:-docs/tasks/$branch_name}
mkdir -p "$OUT_DIR/reviews"
npx claudepluginhub codename-inc/spectre --plugin spectreRuns a thorough code review with severity-rated feedback on security, quality, performance, and maintainability. Useful before merging PRs or after major features.
Conducts code reviews checking quality, security (OWASP Top 10), maintainability, and performance using tools like code_outline, code_search, and grep.
Performs structured code review by conditionally loading validation checklists (clean code, architecture, security, tests) based on diff scope. Produces a severity-ordered report with specific locations and fixes.