agentleFS
sonichisonichi/sutando/skills/claude-router/SKILL.md

claude-router

Skill396 starsChanged 6 months agoMITView on GitHub

Choose between the local Codex CLI, Gemini CLI, and Pi CLI from Claude Code. Use for automatic model selection when the user wants the best local delegate for code review, repo-wide analysis, planning, or implementation.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the request explicitly names codex, gemini, or pi, honor that directly.

    line 32
  2. Very specific:

    If you don't see /codex:* slash-commands, install the plugin via the 4 commands documented in skills/claude-codex/SKILL.md ("When NOT to …

    line 38
  3. Distinctive:

    Default review-oriented prompts to Codex.

    line 42
  4. Very specific:

    Default broad analysis prompts to Gemini in plan approval mode.

    line 43
  5. Distinctive:

    Keep execution in the current workspace unless the user requested a different directory.

    line 44
  6. Distinctive:

    If ARGUMENTS is empty, explain the route rules and suggest a plain prompt.

    line 73
  7. Distinctive:

    If ARGUMENTS is present, run:

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Claude Router

Route a task from Claude Code to local codex, gemini, or pi using simple, explicit rules. This skill assumes the dedicated claude-codex, claude-gemini, and claude-pi skills are installed from this repo.

Usage: /claude-router [prompt]

ARGUMENTS: $ARGUMENTS

Routing Rules

  • Route to codex for:
    • code review
    • bug hunting in a small or medium code slice
    • implementation requests
    • patch validation on current changes
  • Route to gemini for:
    • repo-wide scans
    • architecture and dependency tracing
    • large-context summarization
    • multimodal or structured JSON output requests
  • Route to pi when:
    • the request names pi or kimi
    • the user wants a Kimi-family second opinion

If the request explicitly names codex, gemini, or pi, honor that directly.

When NOT to Use

  • Interactive code review or task hand-off from this Claude Code session → use the /codex:* plugin commands directly (/codex:review, /codex:adversarial-review, /codex:rescue, /codex:status). The router is for programmatic delegation from scripts, cron, and bridges — it goes through the claude-codex skill's bash wrapper, not the plugin.

    If you don't see /codex:* slash-commands, install the plugin via the 4 commands documented in skills/claude-codex/SKILL.md ("When NOT to Use" section).

Default Behavior

  • Default review-oriented prompts to Codex.
  • Default broad analysis prompts to Gemini in plan approval mode.
  • Keep execution in the current workspace unless the user requested a different directory.

Quick Checks

bash "$SKILL_DIR/scripts/route-ai.sh" --check

Common Commands

# Auto-route based on prompt
bash "$SKILL_DIR/scripts/route-ai.sh" -- "Review the current diff for regressions"

# Force Codex
bash "$SKILL_DIR/scripts/route-ai.sh" --engine codex -- "Inspect src/task-bridge.ts for races"

# Force Gemini
bash "$SKILL_DIR/scripts/route-ai.sh" --engine gemini -- "Trace task flow across the entire repo"

# Force Pi (Kimi)
bash "$SKILL_DIR/scripts/route-ai.sh" --engine pi -- "Second opinion on this design"

# Dry-run the route decision without executing
bash "$SKILL_DIR/scripts/route-ai.sh" --dry-run -- "Summarize architecture risks in this repo"

If Invoked As A Slash Command

  • If ARGUMENTS is empty, explain the route rules and suggest a plain prompt.
  • If ARGUMENTS is present, run:
bash "$SKILL_DIR/scripts/route-ai.sh" -- "$ARGUMENTS"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.