code-review
Review code changes with parallel detection agents and smart fixing
What this skill does
Language-agnostic code review with dynamic agent planning. Adapts to any language, framework, and project size. ## Usage ```bash /code-review # Interactive — asks what to review /code-review --full # Review entire codebase /code-review all # Same as --full /code-review --files src/api tests/ # Review specific paths /code-review <issue-id> # Review changes for a beads issue /code-review --quick # Fast mode: lint/build check only ``` ## How It Works ``` SELECT → DISCOVER → SCOPE → PLAN → SCAN (parallel) → AGGREGATE → FIX (if needed) → REPORT ``` ### 0. Select If no flags given, asks what to review (diff, full codebase, specific paths, beads issue, or quick check). ### 1. Discover Auto-detects languages, frameworks, linters, and build tools by scanning the project. ### 2. Scope Determines what to review based on invocation mode: - **No args**: uncommitted changes (`git diff HEAD`) - **`--full`**: entire codebase (prioritizes recently changed files for large projects) - **`--files`**: specific paths - **`<issue-id>`**: changes for a beads issue (MCP `show` or `bd show`) ### 3. Plan Dynamically decides how many scanner agents (2-8) and what each focuses on, based on: - Project language(s) and frameworks - Scope size (lines changed / files to review) - Available linters and build tools - Whether CLAUDE.md exists ### 4. Scan Launches all planned agents **in parallel**: - **scanner** agents (Sonnet) — each with a focused prompt crafted from the language pattern library - **claude-md-scan** (Haiku) — CLAUDE.md compliance, if applicable ### 5. Aggregate Merges findings from all agents, deduplicates, filters by confidence (>= 80%). ### 6. Fix (conditional) Only if issues found: launches **fixer** (Opus) with the project's build/lint commands for verification. - Auto-fixes >= 90% confidence - Adds TODO comments for 80-89% - Verifies fixes with project's native tools ### 7. Report Clear pass/fail report with categorized findings. ## Agents | Agent | Purpose | Model | |-------|---------|-------| | scanner | Generic scanner, invoked N times with different focus prompts | Sonnet | | claude-md-scan | CLAUDE.md compliance check | Haiku | | fixer | Apply fixes for high-confidence issues | Opus | ## Supported Languages Works with any language. Built-in pattern libraries for: - **Go** — error handling, nil deref, goroutine leaks, SQL injection - **Python** — bare except, mutable defaults, eval(), import cycles - **TypeScript/JavaScript** — empty catch, floating promises, XSS, type coercion - **Rust** — unwrap(), unsafe blocks, deadlocks For unlisted languages, the orchestrator infers patterns from the project structure and CLAUDE.md. ## Cost Optimization | Scenario | Agents Used | Cost | |----------|-------------|------| | Clean code (small diff) | 2-3 Sonnet | $ | | Clean code (large/full) | 5-8 Sonnet | $$ | | Issues found | N Sonnet + 1 Opus | $$$ (only when needed) | | Quick mode | 0 agents | Free | ## Confidence Scoring | Score | Action | |-------|--------| | 0-79 | Skip | | 80-89 | Flag + TODO comment | | 90-100 | Auto-fix | ## Integration with Beads Prefer MCP tools when available, fall back to CLI: ``` # Get issue context (MCP preferred) mcp__beads__show(issue_id="<issue-id>") # CLI fallback: bd show <issue-id> --json /code-review <issue-id> # If passed (MCP preferred) mcp__beads__update(issue_id="<issue-id>", status="reviewed") # CLI fallback: bd update <issue-id> --status=reviewed ``` ## Notes - All scanner agents run in parallel (single message, multiple Task calls) - Opus fixer only runs when issues are found - Scanner prompts are crafted dynamically — no hardcoded language assumptions - Use `--quick` for trivial changes (docs, config) - Use `--full` for comprehensive codebase review
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.