centaur-review
Collaborative code review: you narrate, Claude tracks, challenges your ideas, then we generate a friendly GitHub review together
What this skill does
Human-AI collaborative code review. You lead the review by narrating your thoughts as you read the code. Claude tracks your comments, runs background analysis, and when you're done, challenges your suggestions and helps craft a polished GitHub review. > **jj workspace note:** You may be in a non-default jj workspace with no `.git` directory. If `gh` commands fail, set `GIT_DIR` to point to the default workspace: `GIT_DIR=/path/to/default/.git gh pr view ...` --- ## Phase 1: Setup **1. Parse PR argument** (required): - The user must provide a PR URL or number as an argument - If missing, ask: "Which PR should we review? Please provide the URL or number." **2. Fetch PR context:** ```bash gh pr view <pr> --json number,title,body,url,headRefName,baseRefName,additions,deletions,changedFiles,files gh pr diff <pr> ``` **Store the file list and diff in memory** - you'll use this constantly to understand what the user is referring to. **3. Fetch existing reviews and comments:** ```bash # Get repo info REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner') # Get all reviews gh api repos/$REPO/pulls/<number>/reviews # Get all review comments (line-level) gh api repos/$REPO/pulls/<number>/comments # Get conversation comments (top-level) gh pr view <pr> --comments ``` **Summarize the review history:** For re-reviews, this is critical context. Analyze and categorize: - **๐ด Your unaddressed change requests** - Changes you requested that don't appear to be fixed yet - **โ Open questions for you** - Questions from author or other reviewers awaiting your response - **๐ฌ Unresolved threads** - Discussion threads not marked resolved - **โ Resolved threads** - What's been addressed since your last review - **๐ Other reviewers' concerns** - Issues raised by others you should be aware of **Detect if this is a re-review:** - Check if you have any previous reviews on this PR - If yes, note what changed since your last review (commits after your review timestamp) **4. Extract linked issues from PR body:** - GitHub issues: Look for patterns like `Fixes #123`, `Closes #456`, `Resolves #789` - Linear issues: Look for `linear.app` URLs (e.g., `https://linear.app/team/issue/TEAM-123`) **5. Fetch issue details:** - For GitHub issues: `gh issue view <number> --json title,body,labels` - For Linear issues: Use Linear MCP tools if available, otherwise WebFetch the URL **6. Launch background analysis agents** (all in parallel, non-blocking): Launch five Task agents with `run_in_background: true`. **Do not present these results until Phase 3.** 1. **Bug Finder** (subagent_type: bug-finder): ``` Find bugs, edge cases, and potential failure modes in this PR: - Logic errors and incorrect assumptions - Edge cases that aren't handled - Error handling gaps - Race conditions or concurrency issues - Security vulnerabilities Focus on significant issues. If nothing notable, say "Nothing to add." PR diff: [include diff] ``` 2. **Code Simplifier** (subagent_type: code-simplifier): ``` Review this PR for unnecessary complexity: - Over-engineered solutions - Abstractions that aren't needed - Code that could be more elegant or direct - Opportunities to simplify without losing functionality Focus on significant issues, not style preferences. If nothing notable, say "Nothing to add." PR diff: [include diff] ``` 3. **Architecture Reviewer** (subagent_type: code-architect): ``` Review the structural/architectural implications of this PR: - Does it change how modules interact? - Does it introduce new patterns or deviate from existing ones? - Are there changes that affect multiple parts of the codebase? - Anything that deserves discussion before merging? If nothing notable, say "Nothing to add." PR diff: [include diff] ``` 4. **Requirements Checker** (subagent_type: general-purpose): ``` Compare this PR to the linked issue requirements. Identify: - Requirements that are implemented correctly - Requirements that are missing or incomplete - Things the PR does that weren't in the requirements (scope creep?) - Deviations that might need discussion If everything looks good, say "Nothing to add." PR diff: [include diff] Issue: [include issue body] ``` 5. **CLAUDE.md Compliance** (subagent_type: general-purpose): ``` Check if this PR follows the conventions in the repo's CLAUDE.md file: - Coding patterns and styles mentioned - Architectural guidelines - Testing requirements - Any other repo-specific rules First, read the CLAUDE.md file in the repo root (if it exists). Then check the PR against those guidelines. If compliant or no CLAUDE.md exists, say "Nothing to add." PR diff: [include diff] ``` **7. Display summary and enter review mode:** Show the user: - PR title and description - Files changed (list them with additions/deletions) - Linked issue summary - **Review history summary** (if this is a re-review): - ๐ด Your unaddressed change requests - โ Open questions awaiting your response - ๐ฌ Unresolved discussion threads - ๐ Other reviewers' concerns to be aware of - "Background analysis running... I'll track your comments as you review. ๐" **Then prompt:** "Ready when you are - start narrating your thoughts as you read through the code." --- ## Phase 2: Interactive Review Session Track the user's observations as they narrate. **Do not show background agent results unless explicitly asked.** **Maintain a comment tracker** with this structure: ``` Comments: 1. [file:line] [SEVERITY] - comment text 2. [file:start_line-end_line] [SEVERITY] - comment text (for multi-line) ... ``` **Line numbers must be actual file line numbers** (from the new version of the file for additions, old version for deletions). These will be used directly in the GitHub API call. ### Identifying File/Line Locations **Use the PR context you fetched.** When the user makes an observation: 1. **Check if they mentioned a file or line explicitly** - use it directly 2. **If they quoted code**, search the PR diff for that snippet 3. **If they mentioned a concept** (e.g., "the error handling", "the new endpoint"), check which files in the PR diff contain related code 4. **If still unclear, ask immediately.** Have a LOW bar for asking: "Which file is this about? I see changes in `api.py`, `models.py`, and `tests/test_api.py`" **Never silently guess wrong.** It's much better to ask than to track a comment on the wrong file. ### Interaction Cadence - **Brief acknowledgment** after each observation: "Got it - tracking on `api.py:45` as a suggestion ๐" - **If the user is in flow** (rapid observations), batch: "Tracking all three! ๐" - Keep it brief - don't interrupt the user's flow with lengthy responses ### User Commands During Review - Say a severity word to tag the last comment: "blocking", "important", "suggestion", "question", "nitpick" - "show comments" or "what do you have" - display current comment list - "show analysis" - check background agent results (only if explicitly requested) - "drop last" or "nevermind" - remove the last tracked comment - "ready" or "done reviewing" - move to Phase 3 ### Severity Mapping - BLOCKING - "blocking", "must fix", "can't merge" - IMPORTANT - "important", "should fix", "concern" - SUGGESTION - "suggestion", "idea", "could", "maybe" - QUESTION - "question", "wondering", "curious", "why" - NITPICK - "nitpick", "minor", "tiny", "small thing" --- ## Phase 3: Consolidation When the user says "ready" or "done": **1. Verify comment locations:** - For each comment, confirm it's associated with a specific file and line range - If any are unclear, ask now: "A few comments need locations - which file/lines for [comment]?" **2. Launch Red Teamer:** Use the **red-teamer** agent (subagent_type: red-teamer) to challenge the user's comments: ``` The user has reviewed this PR and made the following obse
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.