win4r/agent-skills-code-review-router/agent-skills-code-review-router-2
Claude Code and agent skill by win4r/agent-skills-code-review-router
- community
Checking that the SKILL.md file is still in the repository.
Intelligently routes code reviews between Gemini CLI and Codex CLI based on tech stack, complexity, and change characteristics. Use when you want an automated code review of your current changes.
Install
npx vskill@latest install win4r/agent-skills-code-review-router/agent-skills-code-review-router-2SKILL.md
Code Review Router
Routes code reviews to the optimal CLI (Gemini or Codex) based on change characteristics.
When NOT to Use This Skill
- For non-code reviews (documentation proofreading, prose editing)
- When reviewing external/third-party code you don't control
- For commit message generation (use a dedicated commit skill)
- When you need a specific reviewer (use that CLI directly)
Step 0: Environment Check
Verify we're in a git repository:
If not a git repo: Stop and inform the user: "This directory is not a git repository. Initialize with git init or navigate to a repo."
Step 1: Prerequisites Check
Verify both CLIs are available:
If neither CLI is found: Stop and inform the user they need to install at least one:
- Gemini: Check Google's Gemini CLI installation docs
- Codex: Check OpenAI's Codex CLI installation docs
If only one CLI is available: Use that CLI (no routing needed).
If both are available: Proceed with routing analysis.
Step 2: Analyze Git Diff
Run these commands to gather diff statistics:
If no changes detected: Report "Nothing to review - no uncommitted changes found." and stop.
Step 3: Calculate Complexity Score
Initialize complexity_score = 0, then add points:
| Condition | Points | Detection Method | ||
|---|---|---|---|---|
| Files changed > 10 | +2 | `git diff --name-only \ | wc -l` | |
| Files changed > 20 | +3 | (additional, total +5) | ||
| Lines changed > 300 | +2 | git diff --numstat sum | ||
| Lines changed > 500 | +3 | (additional, total +5) | ||
| Multiple directories touched | +1 | Count unique dirs in changed files | ||
| Test files included | +1 | Files matching *test*, *spec* | ||
| Config files changed | +1 | Files: *.config.*, *.json, *.yaml, *.yml, *.toml | ||
| Database/schema changes | +2 | Files: *migration*, *schema*, *.sql, prisma/* | ||
| API route changes | +2 | Files in api/, routes/, containing endpoint, handler | ||
| Service layer changes | +2 | Files in services/, *service*, *provider* |
Step 4: Detect Language & Framework
Analyze file extensions and content patterns:
Primary Language Detection
Framework Detection (check imports/file patterns)
Security-Sensitive Patterns
Detect by file path OR code content:
File paths:
Code patterns (in diff content):
Config files:
Step 5: Apply Routing Decision Tree
Routing Priority Order (evaluate top-to-bottom, first match wins):
Priority 1: Pattern-Based Rules (Hard Rules)
| Pattern | Route | Reason | |
|---|---|---|---|
| Security-sensitive files/code detected | Codex | Requires careful security analysis | |
| Files > 20 OR lines > 500 | Codex | Large changeset needs thorough review | |
| Database migrations or schema changes | Codex | Architectural risk | |
| API/service layer modifications | Codex | Backend architectural changes | |
| Changes span 3+ top-level directories | Codex | Multi-service impact | |
| Complex TypeScript (generics, type utilities) | Codex | Type system complexity | |
| Pure frontend only (jsx/tsx/vue/css/html) | Gemini | Simpler, visual-focused review | |
| Python ecosystem (py, Django, FastAPI) | Gemini | Strong Python support | |
| Documentation only (md/txt/rst) | Gemini | Simple text review |
Priority 2: Complexity Score (if no pattern matched)
| Score | Route | Reason | |
|---|---|---|---|
| ≥ 6 | Codex | High complexity warrants deeper analysis | |
| < 6 | Gemini | Moderate complexity, prefer speed |
Priority 3: Default
→ Gemini (faster feedback loop for unclear cases)
Step 6: Execute Review
Explain Routing Decision
Before executing, output:
CLI Commands
Note: Gemini receives the diff via stdin (piped), while Codex has a dedicatedreviewsubcommand that reads the git context directly. If debugging, check thatgit diff HEADproduces output before running Gemini.
For Gemini:
For Codex:
Step 7: Handle Failures with Fallback
If the chosen CLI fails (non-zero exit or error output):
- Report the failure:
`` [Primary CLI] failed: [error message] Attempting fallback to [other CLI]... ``
- Try the alternative CLI
- If fallback also fails:
``` Both review CLIs failed.
- Gemini error: [error]
- Codex error: [error]
Please check CLI installations and try manually. ```
Step 8: Format Output
Present the review results clearly:
Quick Reference
| Change Type | Route | Reason | |
|---|---|---|---|
| React component styling | Gemini | Pure frontend | |
| Django view update | Gemini | Python ecosystem | |
| Single bug fix < 50 lines | Gemini | Simple change | |
| New API endpoint + tests | Codex | Architectural | |
| Auth system changes | Codex | Security-sensitive | |
| Database migration | Codex | Schema change | |
| Multi-service refactor | Codex | High complexity | |
| TypeScript type overhaul | Codex | Complex types |
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSKILL.md
Popularity
- Repository stars
- 105
- Repository forks
- 9
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/win4r/agent-skills-code-review-router/agent-skills-code-review-router-2)