grok-routing

grok-routing is a skill for Claude Code from xzawed/claude-grok-build-plugin. It costs 64 tokens per session (1,264 once invoked), scanned A, original, MIT.

Guidance for deciding whether Claude or Grok Build should handle a coding task. Grok Build is used as a separate worker for bulk edits, test backfill, migrations, boilerplate, or exploratory prototypes.

In plain words
What is it for?
Use it to assess delegation, plan work that needs human approval, choose Grok tools, and review changes after Grok edits the code.
Why use it?
It helps prevent unsuitable tasks from being delegated and provides a route for checking the task before any work begins.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the grok plugin — 4 skills, 27 commands, 1 agent, 1 hook, 1 MCP server shipped together

Good fit Use it to assess delegation, plan work that needs human approval, choose Grok tools, and review changes after Grok edits the code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add xzawed/claude-grok-build-plugin
Claude Code
/plugin install grok

Made for: Claude Code.

Or install grok, the plugin that ships this one along with the rest of its 4 skills, 27 commands, 1 agent, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-routing

README.md
[![agentmods](https://agentmods.dev/badge/skills/xzawed/claude-grok-build-plugin/grok-routing/github.svg)](https://agentmods.dev/skills/xzawed/claude-grok-build-plugin/grok-routing)
Your own site
<a href="https://agentmods.dev/skills/xzawed/claude-grok-build-plugin/grok-routing"><img src="https://agentmods.dev/badge/skills/xzawed/claude-grok-build-plugin/grok-routing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grok-routing

Your own site · 80×15
<a href="https://agentmods.dev/skills/xzawed/claude-grok-build-plugin/grok-routing"><img src="https://agentmods.dev/badge/skills/xzawed/claude-grok-build-plugin/grok-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01264
Opus 5 $0.00032 $0.00632
Sonnet 5 $0.00013 $0.00253
Haiku 4.5 $0.00006 $0.00126

Measured 5d ago against content hash f00312073cdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

grok-routing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/grok-routing/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grok routing (Claude orchestrates, Grok executes)

You are in a session where the grok plugin can run Grok Build via MCP. Product goal: help the user use Grok well, feel Grok’s strength, and enjoy Claude ↔ Grok collaboration — not replace Claude.

Default posture

When a task is a good fit for Grok, propose delegation first (brief why + tool), then run it if the user agrees or already asked to use Grok. Do not dump every coding task on Grok.

Delegate to Grok when

Fit Examples
Bulk / repetitive Same pattern across many files, renames, import fixes
Low-risk volume Test backfill, docs sync, boilerplate CRUD/DTO/scaffold
Narrow independent scope Single module, clear acceptance criteria, little monorepo coupling
Exploratory prototype Try an approach fast; user will review

Tools (prefer this order):

  1. Route first (no side effects): grok_build_route or /grok:route — read nextAction (handle_with_claude | call_mcp_tool + tool/flags). Do not re-derive the plan.
  2. If nextAction.requiresHumanGateBeforeDelegate: plan (grok_build_plan / /grok:plan) then wait for approval before any edit tool.
  3. Execute: grok_build_delegate / /grok:delegate or verify /grok:verify as nextAction.tool says.
  4. Review gate: /grok:review — diff + billing; never auto-commit.
  5. Multi-turn: /grok:resume using usage.lastSession.sessionId or the last result’s sessionId.
  6. Presets: /grok:tests, /grok:migrate, /grok:boilerplate
  7. Auth / ready: grok_build_status (or grok_auth_check) or /grok:setup. If status reports billingMismatch, stop and warn that the server is in subscription mode while past delegations were recorded as metered — check GROK_BUILD_AUTH_MODE before delegating anything.

Always pass absolute cwd. Prefer English prompts for the prompt field.

Do not make coding edits through grok_cli / /grok:cli. Passthrough runs are not gated by the pre-delegate auth hook and are not recorded in delegation history, so the edit has no provenance. /grok:cli stays the escape hatch for non-editing subcommands (models, sessions, memory, …); use grok_build_delegate / grok_build_verify for anything that changes files.

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed f00312073cdb
  2. 7d ago Changed · +2 lines cf3a0d2bec43
  3. 12d ago First seen · 91 lines · 64 tokens per session scan A ffe11574eba9

Subscribe to this mod's changes

grok-routing is a skill published in the GitHub repository xzawed/claude-grok-build-plugin (1 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 1,264 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.