Agent SkillsAgent Skills
xinbenlv

codereview-orchestrator

@xinbenlv/codereview-orchestrator
xinbenlv
7
0 forks
Updated 4/29/2026
View on GitHub

Triage and orchestrate code reviews. Analyzes PR intent, identifies touched surfaces, assesses risk, and routes to specialist skills. Does NOT perform detailed review - delegates to specialists. Supports full pipeline with "Review PR <number>" command.

Installation

$npx agent-skills-cli install @xinbenlv/codereview-orchestrator
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Pathskills/codereview-orchestrator/SKILL.md
Branchmain
Scoped Name@xinbenlv/codereview-orchestrator

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: codereview-orchestrator description: Triage and orchestrate code reviews. Analyzes PR intent, identifies touched surfaces, assesses risk, and routes to specialist skills. Does NOT perform detailed review - delegates to specialists. Supports full pipeline with "Review PR <number>" command. metadata: author: Zainan Victor Zhou version: "3.0" persona: Review Coordinator

Code Review Orchestrator Skill

The coordinator for code reviews. This skill only triages and routes - it does NOT perform detailed code review. All actual review work is delegated to specialist skills.

Quick Start: Full Pipeline

Trigger a complete review by saying:

Review PR 123
Review PR owner/repo#123
Review PR https://github.com/owner/repo/pull/123

This will:

  1. Retrieve the PR diff via GitHub API
  2. Triage and assess risk
  3. Route to appropriate specialist skills
  4. Review the code
  5. Submit the review to GitHub

Role

  • Triage: Classify the PR and assess risk level
  • Route: Select appropriate specialist skills
  • Summarize: Generate high-level PR summary
  • Delegate: Hand off to specialists for actual review
  • Orchestrate: Manage the full review pipeline (input β†’ review β†’ output)

What This Skill Does NOT Do

❌ Find bugs
❌ Check security
❌ Review performance
❌ Validate tests
❌ Check style

All of the above are delegated to specialist skills.

Full Pipeline Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         INPUT SKILLS                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  retrieve-diff-from-github-pr  β”‚  retrieve-diff-from-commit     β”‚
β”‚  (GitHub PRs via API)          β”‚  (Local git commits)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
                                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    codereview-orchestrator                       β”‚
β”‚                   (Triage & Route - this skill)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό       β–Ό       β–Ό                       β–Ό       β–Ό       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”
β”‚security β”‚ β”‚ api β”‚ β”‚data β”‚    ...      β”‚  perf   β”‚ β”‚test β”‚ β”‚styleβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜
     β”‚       β”‚       β”‚                       β”‚       β”‚       β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
                                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        OUTPUT SKILLS                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    submit-github-review                          β”‚
β”‚                 (Post review to GitHub API)                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Inputs

InputDescription
pr_referencePR number, short ref (owner/repo#123), or full URL
diff/PRThe code changes to review (or retrieved automatically)
repo_contextLanguage, framework, architecture patterns
focus_areasOptional: security, performance, correctness, etc.
auto_submitWhether to automatically submit review to GitHub (default: false)

Outputs

OutputDescription
summaryPlain-English description of changes
touched_surfacesWhat parts of the system are affected
risk_assessmentOverall risk level with justification
review_planWhich specialists to invoke and why
questionsClarifying questions for the author (if any)

Step 1: Understand Intent

Ask these questions (do NOT review the code):

  • What behavior change is intended?
  • Does the PR description explain the purpose?
  • Is this a feature, bugfix, refactor, or infrastructure change?

Step 2: Identify Touched Surfaces

Categorize modified files into surfaces:

SurfaceFile PatternsRisk Indicator
Auth**/auth/**, **/login/**, **/session/**πŸ”΄ High
API**/api/**, **/routes/**, **/handlers/**🟑 Medium
Database**/migrations/**, **/models/**, **/schema/**πŸ”΄ High
Business Logic**/services/**, **/domain/**🟑 Medium
InfrastructureDockerfile, *.yaml, terraform/**🟑 Medium
Configuration**/config/**, .env*, *.json🟑 Medium
Tests**/test/**, **/spec/**, **/*.test.*🟒 Low
Documentation*.md, **/docs/**🟒 Low
Dependenciespackage.json, requirements.txt, go.mod🟑 Medium

Step 3: Assess Risk

Rate overall risk based on:

FactorHigh RiskLow Risk
SurfacesAuth, DB, paymentsDocs, tests
ScopeMany files, cross-cuttingSingle file, isolated
ComplexityNew algorithms, state machinesSimple CRUD
ReversibilityDB migrations, API changesInternal refactors

Step 4: Generate Review Plan

Select specialists based on touched surfaces:

review_plan:
  # Always run
  always:
    - codereview-correctness   # Logic bugs
    - codereview-style         # Readability
  
  # Conditional based on surfaces
  conditional:
    - skill: codereview-security
      trigger: auth, input handling, secrets, external APIs
      
    - skill: codereview-api
      trigger: routes, endpoints, schemas, contracts
      
    - skill: codereview-data
      trigger: migrations, models, queries
      
    - skill: codereview-concurrency
      trigger: async, workers, queues, locks
      
    - skill: codereview-performance
      trigger: loops, queries, caching, I/O
      
    - skill: codereview-observability
      trigger: logging, metrics, tracing
      
    - skill: codereview-testing
      trigger: test files modified or missing
      
    - skill: codereview-config
      trigger: config files, env vars, feature flags
      
    - skill: codereview-architect
      trigger: core utilities, shared libraries, breaking changes

Output Format

## PR Summary

[2-3 sentence description of what this PR does]

## Touched Surfaces

| Surface | Files | Risk |
|---------|-------|------|
| Auth | `auth/login.ts`, `auth/session.ts` | πŸ”΄ High |
| API | `routes/users.ts` | 🟑 Medium |
| Tests | `tests/user.test.ts` | 🟒 Low |

## Risk Assessment

**Overall Risk: 🟑 MEDIUM**

- πŸ”΄ Touches authentication flow
- 🟑 Modifies public API
- 🟒 Has test coverage

## Review Plan

| Priority | Skill | Files | Reason |
|----------|-------|-------|--------|
| 1 | `codereview-security` | `auth/*` | Auth changes require security review |
| 2 | `codereview-api` | `routes/*` | API contract changes |
| 3 | `codereview-correctness` | All | Standard logic check |
| 4 | `codereview-testing` | `tests/*` | Verify coverage |
| 5 | `codereview-style` | All | Final readability pass |

## Questions for Author

1. [Only if something is genuinely unclear about intent]

Specialist Skills Reference

SkillInvoke When
codereview-securityAuth, input parsing, secrets, external APIs
codereview-correctnessAll PRs - logic bugs, error handling
codereview-apiAPI routes, schemas, contracts
codereview-dataDatabase migrations, models, queries
codereview-concurrencyAsync code, workers, distributed systems
codereview-performanceLoops, queries, caching, memory
codereview-observabilityLogging, metrics, tracing
codereview-testingTest files or code needing tests
codereview-configConfig, env vars, feature flags
codereview-architectCore libs, shared code, breaking changes
codereview-styleAll PRs - final readability pass

Quick Reference

β–‘ Understand Intent
  β–‘ What does this PR do?
  β–‘ Feature / bugfix / refactor / infra?

β–‘ Identify Surfaces
  β–‘ Which areas are touched?
  β–‘ What's the risk level of each?

β–‘ Assess Risk
  β–‘ Overall risk rating?
  β–‘ Key risk factors?

β–‘ Generate Plan
  β–‘ Which specialists needed?
  β–‘ In what priority order?
  β–‘ Why each specialist?

Important

This skill is only for triage and routing. Once the review plan is generated, invoke the specialist skills to perform the actual review.


Full Pipeline Execution

When triggered with "Review PR <number>", execute the full pipeline:

Phase 1: Input (Retrieve Diff)

# For GitHub PRs
skill: retrieve-diff-from-github-pr
inputs:
  owner: <from PR reference>
  repo: <from PR reference>
  pull_number: <from PR reference>
outputs:
  - pr_info
  - files
  - diff
  - commit_id  # Needed for submit phase

Phase 2: Triage (This Skill)

Execute Steps 1-4 above to generate the review plan.

Phase 3: Review (Specialist Skills)

Execute each specialist skill in the review plan:

for each skill in review_plan:
  invoke: <skill>
  inputs:
    diff: <from phase 1>
    files: <relevant files for this skill>
  collect: findings[]

Phase 4: Output (Submit Review)

skill: submit-github-review
inputs:
  owner: <from phase 1>
  repo: <from phase 1>
  pull_number: <from phase 1>
  commit_id: <from phase 1>
  findings: <aggregated from phase 3>
  review_event: <determined by findings severity>
outputs:
  - review_url

Pipeline Output

## Review Complete

**PR**: owner/repo#123
**Review URL**: https://github.com/owner/repo/pull/123#pullrequestreview-12345

### Summary

| Severity | Count |
|----------|-------|
| πŸ”΄ Blocker | 1 |
| 🟑 Major | 2 |
| πŸ”΅ Minor | 3 |
| βšͺ Nit | 2 |

**Action**: REQUEST_CHANGES

View the full review on GitHub: [PR #123](https://github.com/owner/repo/pull/123)

Input/Output Skills Reference

SkillTypePurpose
retrieve-diff-from-commitInputGet diff from local git commits
retrieve-diff-from-github-prInputGet diff from GitHub PR via API
submit-github-reviewOutputPost review to GitHub PR