codex-router

codex-router is a skill for Codex from PracticalSwan/agent-skills. It costs 157 tokens per session (1,584 once invoked), scanned A, original, MIT.

A guide for using Codex with custom models through the codex-router proxy, which relays the app's tools to the model.

In plain words
What is it for?
It is for orienting custom-model sessions, calling routed app tools correctly, and selecting the right instructions for threads, browser work, or computer use.
Why use it?
It explains how the available tools are exposed and which companion instructions to read before using browser, computer, thread, or navigation features.

Skill for Codex

Written for Codex: reads $CODEX_HOME. Also seen: mentions subagents; mentions Claude Code; reads ~/.codex paths.

Good fit It is for orienting custom-model sessions, calling routed app tools correctly, and selecting the right instructions for threads, browser work, or computer use.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/codex-router
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill codex-router
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

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 codex-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/codex-router/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/codex-router)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/codex-router"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/codex-router/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 codex-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/codex-router"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/codex-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,584 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.00157 $0.01584
Opus 5.5 $0.00063 $0.00634
Sonnet 5.5 $0.00031 $0.00317
Haiku 4.5 $0.00016 $0.00158

Measured 2mo ago against content hash 8212591ca7b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-router 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 2mo 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.

codex-router/SKILL.md · 132 lines

How it starts

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

Codex Router (custom models in the Codex app)

You are a custom model. The Codex app routes your traffic through codex-router.

How your tools work

  • The app's native tools appear in your tool list with flattened names: codex_app__create_thread, codex_app__list_threads, mcp__node_repl__js, mcp__peekaboo__create_task, and so on.
  • Call them with exactly those names. The router restores the original namespace (for example create_thread in codex_app) before the app sees the call, so the app executes it natively.
  • The router never executes an app tool. It only relays definitions and results. If a call fails, fix your arguments; do not try to run the tool yourself.
  • Never spawn a side-channel driver. Do not start your own node_repl process, do not fake MCP metadata, do not write driver scripts. The tools you need are already in your tool list.

Before each kind of work, read the matching skill

  • Threads, automations, navigation: read codex-app-threads.
  • In-app browser: read codex-in-app-browser.
  • Computer use: read codex-computer-use.

When a tool rejects your arguments

The app answers received invalid arguments. when you missed a required field. Stop guessing. Read the matching skill for the exact shape, then retry once with the correct arguments. Repeated guessing burns tokens and turns.

Golden rules

  1. Use the tools you were given. Do not build workarounds.
  2. Read the companion skill before the relevant work.
  3. When a call fails, fix the arguments from the skill, then retry.
  4. A turn with no tool call ends the task. After a tool result, if more work still needs a tool, call it in the same turn. Do not only announce the next step. Text-only is for when the user's request is fully done.

Spawned threads and model inheritance

For a new local Codex thread, omit the model field unless the user explicitly requested one. The router selects the parent routed model, while an explicit model remains a separate user-visible task choice. In-session subagents are always pinned to the routed parent's model because their tool arguments are model-generated and must not silently cross a provider or billing boundary. Follow-up messages retain the target thread's settings, and cloud tasks choose their model outside this relay.

Read the full file on GitHub · 132 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed 8212591ca7b8
  2. 2mo ago Changed · +3 lines 7298767df65e
  3. 2mo ago Changed 00b848dc0220
  4. 3mo ago First seen · 129 lines · 157 tokens per session scan A 4e374b066310

Subscribe to this mod's changes

codex-router is a skill published in the GitHub repository PracticalSwan/agent-skills (25 stars, last pushed 15d ago), licensed MIT. It adds 157 tokens to every session and 1,584 once invoked, about $0.0006 per session on Opus 5.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-30.

Related

codex-router compared with skills from other repositories

codex-router next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-routerPracticalSwan/agent-skillsSkill2515d agoMITA157Codex
accounting-audit-system-buildersickn33/agentic-awesome-skillsSkill51ktodayMITA41Claude Code
frontmcp-configagentfront/frontmcpSkill154todayApache-2.0A187Claude Code
frontmcp-observabilityagentfront/frontmcpSkill154todayApache-2.0A198Claude Code, Codex
frontmcp-developmentagentfront/frontmcpSkill154todayApache-2.0A270Claude Code
frontmcp-testingagentfront/frontmcpSkill154todayApache-2.0A175Claude Code
frontmcp-deploymentagentfront/frontmcpSkill154todayApache-2.0A244Claude Code, Codex