Spread coding work across several AI subscriptions and harnesses (Claude Code, Codex, Cursor, Antigravity, Kiro) from one orchestrating agent, with workers in herdr panes, in tabs of the Herdr app, or headless; workers size their own subagents. Use when the user asks to orchestrate, fan out, or delegate work across panes, harnesses, or subscriptions; when your launch prompt says you are a routr worker; before a routr worker, a lead or any other agent spawns a subagent of its own harness; or w...
4 stars
0 votes
0 copies
0 views
Added November 6, 2026
ai-agentsrustgoshellnodegit
Works with
claude code
cursor
terminal
Security analysis
C71/100
criticalPipes output to a shell interpreter
mediumUses curl or wget to download content
criticalDownloads and executes remote scripts — classic supply chain attack
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Routr?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sirkirby-routr)
---
name: routr
description: Spread coding work across several AI subscriptions and harnesses (Claude Code, Codex, Cursor, Antigravity, Kiro) from one orchestrating agent, with workers in herdr panes, in tabs of the Herdr app, or headless; workers size their own subagents. Use when the user asks to orchestrate, fan out, or delegate work across panes, harnesses, or subscriptions; when your launch prompt says you are a routr worker; before a routr worker, a lead or any other agent spawns a subagent of its own harness; or when asked to set up, configure, or check routr.
metadata:
version: "0.0.0-dev"
---
# routr
routr gives you a quick, calibrated read at the moment you hand out work. The first answering decision model in
the user's ordered list (TypeSafe's Jev by default, Cloudflare's Clef, or OpenAI's GPT-6 Luna) reads the brief you are about to give and
answers a fixed set of questions: facts about
what the brief says, what kind of work it is, how costly a mistake would be, and an overall level. Code adds the
live usage of each subscription. **You make the decision**: how much intelligence and reasoning the work needs, and
so which model and effort. You know the codebase and the purpose of the work; routr does not. It gives you the same
consistent starting point every time, so the decision is not made from habit.
routr is one standalone command, `routr`, normally at `~/.local/bin/routr` (`routr.exe` on Windows). If it is not on
your PATH, call it by that full path.
**If `routr` is not installed:** tell the user routr needs its command, ask whether you may install it, and run the
installer for their system. It needs no Node or Bun, verifies the download's checksum, and installs to `~/.local/bin`.
```sh
curl -fsSL https://raw.githubusercontent.com/sirkirby/routr/main/install.sh | sh
```
```powershell
irm https://raw.githubusercontent.com/sirkirby/routr/main/install.ps1 | iex
```
Then run `routr doctor`; if it reports no key or no config, read `references/setup.md`. Someone working on routr
itself can run it from their checkout with Bun instead: `bun src/routr.mjs doctor`.
The advice commands change nothing of the user's and never fail: if no configured model answers, they still print
advice, with a `no reading` headline and one entry per failed decision model in `unavailable`. Matching fallback advice is valid for
launch: read `unavailable`, tell the user in the launch line that the advice was a fallback and what was unavailable,
and judge that part yourself.
## Which part applies to you
- Your launch prompt says you are a **routr worker** → read `references/worker.md`; it covers sizing your subagents.
You judge each spawn; the lead judges your worker assignment and your reported `SUBAGENTS` decisions.
- You have no routr worker launch prompt and are **about to spawn a subagent of your own harness** for a piece of
your own work, as a lead or as any agent → read only "Before you spawn a subagent" in `references/worker.md`: the
rest is for routr workers. Handing work to another account is the orchestrator's job (next).
- You are the **orchestrator**: you plan the work, hand it out, judge what comes back, and send it back when it
falls short → follow "The orchestrator's loop" below, and read `references/harnesses.md`: "For every harness" before your first launch, and a harness's own entry before you launch a worker on it. A user
can start a session this way by typing `/routr-orchestrate <plan>` (`$routr-orchestrate` in Codex). In the
Herdr app, `routr launch` starts each worker's real harness in a tab of its own (`references/herdr-app.md`). Anywhere else outside herdr, it starts Claude Code, Codex, Cursor, Antigravity and Kiro workers headless (`references/headless.md`).
A routr worker is a pane worker in herdr, a terminal worker in the Herdr app, a headless one elsewhere. Your
harness's own subagents and teams are the other route: "First, which of two routes" in
`references/deciding.md` says which is for what, and each subagent is sized first (the bullet above).
Every worker starts with `routr launch` (in a git repository with `--worktree <branch>`, and `--base <ref>` to start from another
branch or commit) and ends with `routr cleanup`, the command in its launch result’s `next`. Never close a worker's pane to
finish it: that leaves its worktree behind.
- The user wants routr **set up, configured, or checked**, or **a setting changed** (a model, an effort, a reserve,
turning a subscription off) → read `references/setup.md` to set routr up, or `references/settings.md` to change or
explain one setting.
## The orchestrator's loop
You are the lead agent. In herdr, workers run in panes; in the Herdr app, in tabs; anywhere else, Claude Code, Codex,
Cursor, Antigravity and Kiro workers run headless. Your job is to get the user's work done across the subscriptions
they pay for, without running any one of them hot, and to keep the user informed without making them watch panes.
routr says where you are: `dispatch`, `launch`, `wait` and `workers` each carry `where` (where you run, and how a
worker runs there). You do not test for it. A worker is followed by its name, the same way wherever it runs:
`routr wait --name <worker> --timeout <duration>` until its turn ends or it needs input,
`routr send --name <worker> --task-file <file>` to give it a message, `routr stop --name <worker>` to end it (in a
pane that closes the pane, and its screen with it), and `routr cleanup --worker <worker>` to finish it. Each
answer's `next` names the command that reads its screen (a pane with herdr, a tab with `hc`) or its report file. For
anything else in a pane, use the herdr skill. In the Herdr app also read `references/herdr-app.md`; outside herdr and
the app, `references/headless.md`. They say what else differs.
Each step names the reference that holds its detail. Read it when you reach the step, and again the next time you
reach it or pick a step up part-way: after a harness shortens a long session, a reference you read earlier may be
gone.
1. **Decide whether to launch at all** (`references/deciding.md`). It opens with two rules to read there, not
here: "First, which of two routes" (a routr worker, or your harness's own subagents) and "Size a piece by what
one worker can carry, and be ambitious". The rest of this loop is for a piece that goes to a routr worker. For
such a piece `routr dispatch` advises first, in its `worker` field. Research, exploration and reviews can go to
a worker like any other piece.
2. **Ask for the facts, then decide** (`references/deciding.md`). Write the task to a file first
(`references/task.md` says what it holds), then `routr dispatch --task-file <the task file you will launch with>`,
word for word, and save its stdout. If `states_check` or `standalone` reads `no`, fix the brief and ask again.
Check the brief each time against three rules in `references/task.md`: "Say what the worker may touch as a rule,
not as a list of files", "A fix brief says how its cause is known" and "A fix brief quotes the finding it
closes".
Then follow "Deciding" below. Before launch, state the advised and chosen level, model, effort and account, with
a short reason for each, and the `ROUTR:` line ("Deciding" below).
3. **Launch** (`references/launch.md`; the task's parts are in `references/task.md`). In a git repository, every
worker gets its own worktree (`--worktree <branch>`). The work goes in `--task-file` and your process rules in
`--rules-file`; `--model` is required, and `--advice` takes the advice you saved for that exact task. Read the
JSON launch prints and follow its `next`. `needs_input` is yours to decide.
4. **Judge, send back, escalate** (`references/judging.md`: read it before you wait). Never wait without a
timeout. Get the worker's full report, take a first read with `routr check --brief <file> --report <file>`, then
run your own check: a `VERDICT` is the worker's claim. Work that falls short goes back to the same worker with
the specific points when its approach is sound. When the approach is wrong, corrections repeat or the worker
thrashes, correct missing context or changed requirements first, then use the evidence to change model, effort
or harness. Before any send-back, read two rules in `references/judging.md` again: "One send-back for one
review" and "Stop at the second round that finds the same kind of problem in the same place".
5. **Record** (`references/recording.md`). After checking the work, fill launch's record template with the verdict,
your check, the level and the cause. Keep its `--launch` and any `--ledger` so your judgement reaches that run.
If record cannot find the launch row, use the full form in the recording guide.
6. **Integrate and clean up** (`references/cleanup.md`). Once you have verified a worker's work and it has nothing
left to do, finish it with `routr cleanup`, the command in its launch result's `next`; never close its pane
instead. Work that failed your check stays where it is until the user decides. Before you finish,
`routr cleanup --cwd <repo>` lists the worktrees still there: remove the ones your session left.
Before your first dispatch, read `references/handoff.md` once: what every answer holds, how to follow `next`, and
when to pass `--lead-session` (a harness may give routr no session id to read). With OpenTelemetry export on,
`workers`, `wait` and `cleanup --dry-run` may queue records and start its sender (`references/cleanup.md`). What to do
with each harness: `references/harnesses.md`.
## Reading the advice
Every run command starts with `ok`, `headline`, `unavailable`, `warnings` and `next`. `ok` says whether the command
produced what it is for; a stopped command also carries `error`. Follow `next` for instructions.
`routr subagent "<brief>"` and `routr dispatch "<brief>"` print one JSON object: `headline` (the advice in one line:
read it first), `unavailable` (what routr could not read: read it before deciding), `worker` (whether the work is
worth handing out at all), `facts`, `level`, `notes`, `warnings` and, from `dispatch`, `subscriptions`.
`references/advice.md` says what each field holds and how to read it. Two facts are about your brief, not the work:
`states_check` and `standalone`. When either reads `no`, fix the brief before you send it. routr never names a model
for the work.
## Deciding
**Quality first; efficiency among suitable options.** The usual pattern: the lead is the strongest model in the
session, and each piece goes to the smallest model and effort you trust to deliver it, in a lane narrow enough for
that model. A worker sizes its own subagents the same way, and each spawn's model is the choice of the agent that
spawns it. Choose a model and effort you have reason to trust to deliver a verified result. Include the time and usage spent correcting work when judging efficiency. Costly or hard-to-detect
failures can justify stronger initial execution; a larger model needs a reason tied to the work or relevant experience.
1. **Work level:** start with the advised level, facts and uncertainty. Weigh the user's preferences and concrete
repository context, including facts the brief did not give routr. Explain any change to the level. If you change it,
refresh eligible accounts for that level before choosing one (see `references/deciding.md`).
2. **Model and effort:** identify suitable options on eligible normal accounts. `your_default` is an everyday
preference, not a mapping from difficulty to model. Consider smaller models when you trust them to meet the
quality requirements. Choosing a larger model does not itself change the work's level. Judge effort separately:
an unknown cause or a long chain of dependent changes may call for more reasoning; size alone does not.
3. **Account:** among suitable options, weigh usable capacity and its age, user preferences, and known time or
spending constraints. Use fallback accounts when normal options lack suitability or capacity. Respect disabled
accounts, sign-in requirements, `hardest_work` and reserves. Configured normal/fallback use already supplies
permission in those circumstances. Weigh unknown capacity or budget alongside explicit spending limits; unknown room is uncertainty, not a measurement. Headroom does not estimate whether a task fits.
Among suitable accounts in the launch ratio, prefer `share_due` unless the work has a reason to go elsewhere, and say why in
the launch line when you don't.
You own the final choice within those boundaries. Before launch, state the advised and chosen level, model, effort
and account, with separate reasons for model and effort; keep those reasons in the record's `--note`. After inspecting
the result, you may change model, effort or harness when the evidence warrants it. The orchestrator guide covers
verification, recovery and recording.
At every launch, say the level where the user will see it, also when you took the advised one:
ROUTR: <advised> → <chosen> because <reason>
When the line is printed only on a change, a missing line can mean no change or a skipped line. Record
the chosen level explicitly so the original assessment and your decision remain distinguishable.