Agent skill

Codex CLI OmniRoute Config

by diegosouzapw in diegosouzapw/OmniRoute

A step-by-step workflow for pointing the OpenAI Codex CLI at an OmniRoute gateway on Linux, macOS or Windows, plus settings that keep multi-hour sessions alive.

MITAuto-check passedAI & LLM Engineering

Install Codex CLI OmniRoute Config

skills CLI
$ npx skills add diegosouzapw/OmniRoute --skill config-codex-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install diegosouzapw/OmniRoute config-codex-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/diegosouzapw/OmniRoute.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/config-codex-cli .claude/skills/config-codex-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
config-codex-cli
GitHub stars
74k
Token cost
~686 tokens
SKILL.md length
262 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

A step-by-step workflow for pointing the OpenAI Codex CLI at an OmniRoute gateway on Linux, macOS or Windows, plus settings that keep multi-hour sessions alive.

  • Works in 3 steps: Dashboard → Settings → Routing → Session… → OmniRoute environment → Restart OmniRoute. Leave Codex…
  • Pointing the Codex CLI at an OmniRoute gateway on a new machine
  • SKILL.md covers Overview, Quick install, Subcommands and Long-running Codex tasks (#7287)
  • Calls npm

What it does

The agent detects the operating system and shell, writes config.toml with seven named profiles, sets the environment variables and checks that the setup works, so Codex uses OmniRoute as an OpenAI-compatible backend. The Codex config itself keeps wire_api set to responses with the right base_url.

A section on long-running tasks covers two defaults that quietly break sessions lasting hours. Session affinity is off by default, so each turn can reach a different account and lose prompt-cache continuity; its TTL must be set above the expected task length, up to 24 hours. The stream idle timeout is ten minutes by default and force-closes a quiet reasoning turn, so the recipe sets STREAM_IDLE_TIMEOUT_MS and FETCH_BODY_TIMEOUT_MS to 0 and restarts OmniRoute. The shipped defaults stay unchanged, and operators opt in.

When your agent uses it

  • Pointing the Codex CLI at an OmniRoute gateway on a new machine
  • Fixing Codex sessions that die after a long quiet reasoning turn
  • Preparing Codex for overnight or multi-hour work through OmniRoute

Example prompts

  • “Configure my Codex CLI to use OmniRoute and verify that it works.”
  • “My overnight Codex run keeps failing with a stream idle timeout, so fix the OmniRoute settings.”
  • “Set the session affinity TTL for a twelve-hour Codex task.”

Requirements

  • The OpenAI Codex CLI
  • A running OmniRoute server

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Dashboard → Settings → Routing → Session affinity → Affinity TTL = 43200 (12h) or 86400 (24h max).
  2. OmniRoute environment
  3. Restart OmniRoute. Leave Codex config.toml as usual (wire_api = "responses", correct base_url).

What it can do on your machine

Read from SKILL.md and the folder at commit 8ad6b1c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codex CLI OmniRoute Config loads about 686 tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 262 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~686

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from diegosouzapw/OmniRoute at commit 8ad6b1c, republished under its MIT licence (© diegosouzapw). 262 words, ~686 tokens.

Download SKILL.mdSave it as .claude/skills/config-codex-cli/SKILL.md (or your agent's skills folder).
name
config-codex-cli
description
Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

Overview

Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.

Quick install

bash
npm install -g omniroute   # or: npx omniroute
omniroute --version

Subcommands

No CLI subcommands mapped for this family yet.

<!-- skill:custom-start -->

Long-running Codex tasks (#7287)

Two OmniRoute defaults silently break multi-hour Codex sessions. Document them whenever configuring Codex for overnight / multi-hour work. Full guide: docs/guides/CODEX-CLI-CONFIGURATION.md → Long-running tasks.

Session affinity (default off)
  • Setting: sessionAffinityTtlMs (ms; UI shows Affinity TTL (seconds) under Dashboard → Settings → Routing → Session affinity). Legacy alias: codexSessionAffinityTtlMs.
  • Default 0 = disabled. Each turn can land on a different account and break prompt-cache / session continuity.
  • Codex session keys (x-codex-session-id, x-session-id, x-omniroute-session, body prompt_cache_key / session_id) are only used for pinning when TTL > 0.
  • Max: 86400 seconds / 86400000 ms (24h). Set TTL above the expected task length (e.g. 43200 s for ~12h).
Stream idle timeout (default 10 minutes)
  • Env: STREAM_IDLE_TIMEOUT_MS (default 600000). Also consider FETCH_BODY_TIMEOUT_MS (same baseline; 0 disables).
  • Synthetic SSE heartbeats do not reset the idle clock — only real upstream chunks do.
  • A quiet reasoning turn past the idle window is force-closed (stream_idle_timeout / StreamIdleTimeoutError). Grep logs for Idle timeout: no data from.
  1. Dashboard → Settings → Routing → Session affinity → Affinity TTL = 43200 (12h) or 86400 (24h max).
  2. OmniRoute environment:
bash
STREAM_IDLE_TIMEOUT_MS=0
FETCH_BODY_TIMEOUT_MS=0
  1. Restart OmniRoute. Leave Codex config.toml as usual (wire_api = "responses", correct base_url).
Defaults decision

Do not flip ship defaults in code for this skill: sessionAffinityTtlMs stays 0 and STREAM_IDLE_TIMEOUT_MS stays 600000. Long-running operators must opt in. See Discussion #5718 and issue #7287.

<!-- skill:custom-end -->

© diegosouzapw, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/config-codex-cli of diegosouzapw/OmniRoute.

Open the folder on GitHubat commit 8ad6b1c

Compare with similar skills

Codex CLI OmniRoute Config next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codex CLI OmniRoute Config compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codex CLI OmniRoute Config this skilldiegosouzapw/OmniRoute74k—~686Automated safety check: PassMIT
9Router AI Gateway Setupdecolua/9router30k—~744Automated safety check: PassMIT
9Router Chat Completionsdecolua/9router30k—~635Automated safety check: PassMIT
Using Ccproxy Inspectorstarbaser/ccproxy348—~2.7kAutomated safety check: PassCustom licence
Afmscouzi1966/maclocal-api345—~1.2kAutomated safety check: PassMIT
Using Ccproxy APIstarbaser/ccproxy348—~4kAutomated safety check: PassCustom licence

Similar skills

  • Sets up access to the 9Router AI gateway, an OpenAI-compatible REST endpoint for chat, images, speech, embeddings, web search and web fetch, and indexes its capability skills.

    30k GitHub stars~744 tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Sends chat and code-generation requests through a 9Router gateway using OpenAI or Anthropic message formats, with streaming and auto-fallback combos.

    30k GitHub stars~635 tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy Inspector

    starbaser/ccproxy

    Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic.

    348 GitHub stars~2.7k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Afm

    scouzi1966/maclocal-api

    Maintain and extend AFM (maclocal-api), a Swift OpenAI-compatible local LLM server and CLI for Apple Foundation Models, MLX models, API gateway proxying, and Vision OCR.

    345 GitHub stars~1.2k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy API

    starbaser/ccproxy

    Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.

    348 GitHub stars~4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • ClawRouter LLM Gateway

    BlockRunAI/ClawRouter

    Describes ClawRouter, a local proxy that forwards each LLM request to the blockrun.ai gateway, which routes to a cheaper capable model, paid by USDC wallet or API key credit.

    6.6k GitHub stars~6.8k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed

More from diegosouzapw/OmniRoute

All 50 skills in this repo
  • OmniRoute Backup and Sync CLI

    diegosouzapw/OmniRoute

    Backup and restore OmniRoute data from the CLI. Trigger incremental snapshots, sync to cloud storage, manage backup schedules, and restore from archive files.

    74k GitHub stars~948 tokensUpdated today
    Auto-check passed
  • OmniRoute Settings API

    diegosouzapw/OmniRoute

    Read and update global application settings: system prompts, thinking budget, IP filters, payload rules, combo defaults, and require-login configuration.

    74k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check passed
  • Quality Scan

    diegosouzapw/OmniRoute

    Runs a scoped, read-only quality scan on a repository candidate and reports exact evidence, failures and frozen debt, without treating a static scan as release acceptance.

    74k GitHub stars~748 tokensUpdated today
    Auto-check passed
  • OmniRoute Database Backups

    diegosouzapw/OmniRoute

    Trigger system backups, restore from backup files, and manage the SQLite database lifecycle. Supports export, import, and incremental snapshot strategies.

    74k GitHub starsUsed in 1 repo~395 tokens
    Auto-check passed
  • OmniRoute Provider Management

    diegosouzapw/OmniRoute

    Manages AI provider connections, API keys, OAuth flows and connection tests through OmniRoute's REST API across its 327-provider catalog.

    74k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • OmniRoute LLM Cache

    diegosouzapw/OmniRoute

    Documents OmniRoute's cache endpoints for reading cache statistics and clearing entries, statistics or the reasoning cache, with notes on TTL and similarity settings.

    74k GitHub starsUsed in 1 repo~529 tokens
    Auto-check passed

Questions about Codex CLI OmniRoute Config

What does Codex CLI OmniRoute Config do?

A step-by-step workflow for pointing the OpenAI Codex CLI at an OmniRoute gateway on Linux, macOS or Windows, plus settings that keep multi-hour sessions alive. toml with seven named profiles, sets the environment variables and checks that the setup works, so Codex uses OmniRoute as an OpenAI-compatible backend. The Codex config itself keeps wire_api set to responses with the right base_url.

When should I use Codex CLI OmniRoute Config?

Codex CLI OmniRoute Config fits situations like: pointing the Codex CLI at an OmniRoute gateway on a new machine; fixing Codex sessions that die after a long quiet reasoning turn; preparing Codex for overnight or multi-hour work through OmniRoute.

How do I install Codex CLI OmniRoute Config in Claude Code?

Run `npx skills add diegosouzapw/OmniRoute --skill config-codex-cli -a claude-code`. Or copy the skill folder (skills/config-codex-cli in diegosouzapw/OmniRoute) into .claude/skills/config-codex-cli in your project. Claude Code loads it when a task matches its description.

How do I install Codex CLI OmniRoute Config in Codex?

Run `npx skills add diegosouzapw/OmniRoute --skill config-codex-cli -a codex`. Or copy the skill folder (skills/config-codex-cli in diegosouzapw/OmniRoute) into .agents/skills/config-codex-cli in your project. Codex loads it when a task matches its description.

Can I use Codex CLI OmniRoute Config in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diegosouzapw/OmniRoute --skill config-codex-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/config-codex-cli, .gemini/skills/config-codex-cli, .github/skills/config-codex-cli and .opencode/skills/config-codex-cli in your project.

What does Codex CLI OmniRoute Config need to run?

Going by SKILL.md and its folder, Codex CLI OmniRoute Config needs the command-line tools its instructions call (npm). Our summary lists: The OpenAI Codex CLI; A running OmniRoute server.

Does Codex CLI OmniRoute Config access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codex CLI OmniRoute Config safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codex CLI OmniRoute Config use?

Codex CLI OmniRoute Config is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codex CLI OmniRoute Config use?

About 686 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codex CLI OmniRoute Config?

Skills that share tags, products or a category with Codex CLI OmniRoute Config: 9Router AI Gateway Setup (decolua/9router, 30k stars), 9Router Chat Completions (decolua/9router, 30k stars), Using Ccproxy Inspector (starbaser/ccproxy, 348 stars) and Afm (scouzi1966/maclocal-api, 345 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codex CLI OmniRoute Config?

diegosouzapw (a GitHub user) maintains it in diegosouzapw/OmniRoute, which has 73,701 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 6, 2026.

Source: diegosouzapw/OmniRoute on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.