CLI that picks Cursor, Claude Code, Codex, or OpenCode + model/effort for a task, then launches it. Powered by Jev and Herdr
# Add to your Claude Code skills
git clone https://github.com/nidhi-singh02/agent-routerSee how agent-router compares with popular alternatives.
agent-router is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by nidhi-singh02. CLI that picks Cursor, Claude Code, Codex, or OpenCode + model/effort for a task, then launches it. Powered by Jev and Herdr. It has 50 GitHub stars.
agent-router's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/nidhi-singh02/agent-router" and add it to your Claude Code skills directory (see the Installation section above).
agent-router is primarily written in TypeScript. It is open-source under nidhi-singh02 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-router against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Local-first, quota-aware routing for AI coding agents in Herdr.
router is a command-line tool that picks an AI coding agent, model, and reasoning effort
for a task, then starts that agent for you in a Herdr pane.
router run "implement the approved plan in docs/plans/billing.md"
It filters your subscriptions with fixed rules (enabled models, quota, the 40% reserve on shared accounts), asks TypeSafe to rank what is left and choose an effort, starts the chosen agent (Cursor, Claude Code, Codex, or OpenCode), and hands it the task.
Pre-release: the project is under active development. Review the security and privacy notes below before using real credentials or shared accounts.
nvm use reads .nvmrc).agent (Cursor), claude (Claude Code),
codex, or opencode. The router uses those logins; no provider API keys are needed.router run without --dry-run only launches from inside a
Herdr pane (HERDR_ENV=1).git clone https://github.com/nidhi-singh02/agent-router.git
cd model-router
npm install
npm run build
router on your PATHnpm link -w @agent-router/router
Or add an alias to ~/.zshrc:
alias router="node $HOME/Code/model-router/packages/router/dist/cli.js"
After git pull, run npm run build again.
The config lives in .model-router/ inside the repo (gitignored). Point the router at it
from ~/.zshrc, then source ~/.zshrc:
export MODEL_ROUTER_HOME="$HOME/Code/model-router/.model-router"
mkdir -p .model-router
cp config.example.json .model-router/config.json
MODEL_ROUTER_HOME overrides the location on every platform. Without it the router uses the
platform config directory:
| Platform | Default home |
|---|---|
| macOS | ~/Library/Application Support/model-router |
| Linux | $XDG_CONFIG_HOME/model-router, else ~/.config/model-router |
| Windows | %APPDATA%\model-router |
The router reads config.json from that directory. A missing file is treated as an empty
account list, so an unexpectedly empty router status usually means the home is not where you
think it is.
security add-generic-password -a "$USER" -s model-router-typesafe -w
The command prompts for the key, so it never lands in shell history. The config refers to
it with "typesafe": { "apiKeyRef": "keychain:model-router-typesafe" }. Every pane and agent
then finds the key without exporting anything, and it stays out of agents' environments. To
replace the key, add -U. If macOS asks to allow security access the first time, choose
"Always Allow". TYPESAFE_API_KEY in the environment still works as a fallback.
There is no router accounts add command. Edit the accounts array in
.model-router/config.json (hidden folder; for example code .model-router/config.json) with
one entry per agent login:
{
"id": "acct_personal_claude",
"label": "personal claude",
"provider": "anthropic",
"agent": "claude-code",
"ownership": "personal",
"collectorPreference": ["local-session"],
"enabledModels": ["anthropic:claude-sonnet", "anthropic:claude-opus"],
"enabled": true
}
| Field | Values |
|---|---|
agent |
cursor, claude-code, codex, opencode |
provider |
Matches the models: cursor, anthropic, openai |
ownership |
personal, or shared for a subscription other people also use (see below) |
reserveFloor |
Optional, 0 to 1. Shared accounts default to 0.40 and cannot go lower |
collectorPreference |
Where usage comes from: local-session, official-cli, official-api, browser-dashboard |
enabledModels |
Model IDs from the table below |
enabled |
true or false |
credentialRef |
Optional env:NAME or keychain:NAME. Never put secret values in the file |
Run router accounts to check that the file parses. docs/configuration.md has the full
schema.
The skill lets an agent route the next phase of your work (see
Phases). Link the repo copy so updates arrive with
git pull:
ln -s "$PWD/skills/model-router" ~/.claude/skills/model-router
ln -s "$PWD/skills/model-router" ~/.codex/skills/model-router
ln -s "$PWD/skills/model-router" ~/.cursor/skills/model-router
The links follow whatever branch is checked out in this repo.
Defined in packages/router/config/models.json. Add an ID to an account's enabledModels to
use it.
| Model ID | Agent | Starts as | Efforts | Quota pool |
|---|---|---|---|---|
cursor:grok-4.6 |
Cursor | agent --model cursor-grok-4.6-<effort> |
low, medium, high | spend |
cursor:grok-4.5 |
Cursor | agent --model cursor-grok-4.5-high |
high | spend |
cursor:composer-2.5 |
Cursor | agent --model composer-2.5 |
none | auto |
anthropic:claude-sonnet |
Claude Code | claude --model sonnet --effort <effort> |
low, medium, high | |
anthropic:claude-opus |
Claude Code | claude --model opus --effort <effort> |
low, medium, high | |
openai:gpt-6-astra |
Codex | codex --model gpt-6-astra -c model_reasoning_effort="<effort>" |
low, medium, high, ultra | |
openai:gpt-5.6-sol |
Codex | codex --model gpt-5.6-sol … |
low, medium, high, ultra | |
openai:gpt-5.6-terra |
Codex | codex --model gpt-5.6-terra … |
low, medium, high, ultra | |
openai:gpt-5.6-luna |
Codex | codex --model gpt-5.6-luna … |
low, medium, high | |
openai:gpt-5.5 |
Codex | codex --model gpt-5.5 … |
low, medium, high | |
openai:opencode |
OpenCode | opencode --model openai |
low, medium, high |
TypeSafe picks the effort from the model's list. ultra is only offered when your task text
contains the word "ultra". Capability, cost, and latency numbers in models.json are
estimates you can adjust.
router run "<task>" --dry-run # see which agent, model, and effort would be used
router run "<task>" # start that agent in a new Herdr pane and send the task
router status # list accounts; add --usage to show quota
router session # the latest launch; router session --list for more
--dry-run prints the decision card and the command it would start, without opening a pane
or sending anything. A real run splits a new pane next to the current one, starts the agent,
waits for it to finish starting up, sends the task, and confirms the agent began working. You
can run the router any number of times, in the same tab or different ones; each launch gets
its own agent name such as router-codex-3c356c.
Selected: cursor / composer-2.5 / none
Phase: implementation
Why: TypeSafe selected acct_personal_cursor:cursor:composer-2.5 for implementation in phase implementation
Reserve policy: personal account
Cache decision: no previous session
Usage source: estimated local-session
Quota: auto 70% left (spend 45% left)
Freshness: refreshed at 2026-09-17T12:00:00.000Z
The router routes one phase per task (planning, implementation, debugging, review, research, and so on). It does not answer your question itself; the launched agent does.
| Code | Meaning |