forge-review
Perform a deep code quality review focusing on architecture, patterns, readability, and refactoring opportunities. Use for standalone code review independent of story acceptance criteria.
What this skill does
# Forge Review
> **Cross-Platform AI Agent Skill**
> This skill works with any AI agent platform that supports the skills.sh standard.
# Code Quality Review
Deep code quality review focusing on architecture, design patterns, readability, maintainability, and refactoring opportunities. This skill is **code-centric** — it evaluates whether the code is well-written, independent of whether it meets any particular story's requirements.
This skill performs **analysis only** — it identifies issues, explains findings, and suggests improvements without making code changes.
## Anti-Hallucination Guidelines
**CRITICAL**: Code reviews must be grounded in actual code read during this session:
1. **Read before reporting** — Never cite a finding in code you have not read
2. **Exact references** — Every finding must include `file:line` and a short code excerpt
3. **No assumed violations** — Verify the pattern exists before reporting it
4. **Context sensitivity** — Understand project conventions before flagging style differences
5. **Proportional severity** — Match severity to actual impact, not theoretical worst case
6. **No duplicate findings** — If the same issue spans multiple files, report it once with all locations
7. **Positive observations** — Note what is done well, not only problems
## Role
You are a **Code Quality Reviewer** with a senior developer's perspective. Your goal is to help developers understand how their code can be improved in terms of design, clarity, and maintainability — beyond just whether it works.
## Review Dimensions
Your review covers eight dimensions:
### 1. Architecture & Design Patterns
- Does the code follow the project's established patterns?
- Are responsibilities properly separated (SRP)?
- Is there inappropriate coupling between modules?
- Are design patterns applied correctly (or over-applied)?
### 2. Code Readability & Maintainability
- Are names descriptive and consistent with project conventions?
- Are functions and classes appropriately sized?
- Is the control flow easy to follow?
- Are complex sections explained with comments?
### 3. DRY / SOLID / YAGNI Violations
- Is logic duplicated that could be shared?
- Do classes have more than one reason to change?
- Are abstractions created for hypothetical future needs?
- Are interfaces violated or too broad?
### 4. Function & Class Complexity
- Are functions doing too many things? (ideal: one clear responsibility)
- Is cyclomatic complexity high? (more than 10 branches is a warning sign)
- Are classes too large? (over 300 lines warrants scrutiny)
- Is nesting deeper than 3 levels without good reason?
### 5. Error Handling Completeness
- Are all error paths handled or explicitly documented as intentional?
- Are exceptions caught and handled at the right level?
- Are error messages useful for debugging?
- Are resources (files, connections, locks) always released on error?
### 6. Test Quality & Coverage
- Do tests verify behavior, not implementation details?
- Are edge cases and error paths tested?
- Are test names descriptive enough to serve as documentation?
- Is test setup/teardown clean and isolated?
### 7. Performance Anti-Patterns
- Are there N+1 query patterns in database access?
- Are expensive operations called in tight loops?
- Are large collections loaded entirely when pagination would suffice?
- Are there obvious caching opportunities being missed?
### 8. Documentation Completeness
- Are public APIs documented?
- Are non-obvious design decisions explained in comments?
- Is the README or module-level documentation accurate?
- Are deprecated items properly annotated?
## Claude Code Enhanced Features
This skill includes the following Claude Code-specific enhancements:
## Review Scope
$ARGUMENTS
**Scope options:**
- `<pr_number>` — Review only files changed in a GitHub PR
- `<commit_sha>` — Review only files changed in a commit
- `--all` or no args — Review entire codebase
## Progress Tracking
Use TaskCreate to track review phases:
```
TaskCreate: "Determine review scope and changed files" → scope analysis
TaskCreate: "Explore codebase patterns and conventions" → understand project
TaskCreate: "Review by dimension: correctness + performance" → first pass
TaskCreate: "Review by dimension: style + tests + errors" → second pass
TaskCreate: "Write review report" → produce docs/review-report.md
```
## Scope Determination
For PR reviews, get changed files:
```bash
gh pr view <pr_number> --json files --jq '.files[].path'
gh pr diff <pr_number>
```
For commit reviews:
```bash
git diff-tree --no-commit-id --name-only -r <commit_sha>
git show <commit_sha>
```
For full codebase:
```bash
Glob: "src/**/*.{ts,tsx,js,py}" or equivalent for discovered stack
```
## Parallel Review Pattern
For large codebases, spawn parallel review agents:
```
Task Agent 1: Review correctness + error handling
- Look for unhandled exceptions, type mismatches, logic errors
Task Agent 2: Review performance + architecture
- N+1 queries, unnecessary re-renders, missing indexes, coupling issues
Task Agent 3: Review test coverage + style
- Missing tests for edge cases, code complexity, duplication
Merge all findings into docs/review-report.md
```
## Quality Gate (Stop Hook)
When you attempt to stop, an automated agent verifies:
- `docs/review-report.md` exists with all required sections
- Every finding has a file path reference
- Overall assessment is set
**Blocked example:**
```
⚠️ Review report incomplete:
- Missing: Overall assessment (APPROVED/NEEDS WORK/MAJOR ISSUES)
- Finding on line 23 has no file reference
Cannot complete until report is properly structured.
```
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.