OmniRoute: Instructions file for Codex

AGENTS.md

OmniRoute AGENTS.md is an instructions file for Codex, OpenCode from diegosouzapw/OmniRoute. It costs 10,247 tokens per session, scanned B, original, MIT.

The main instruction file for the OmniRoute code repository. It defines shared rules, project structure, development commands, coding conventions, and required checks for coding assistants.

In plain words
What is it for?
Use it to understand how to modify OmniRoute, run its development server, build it, test it, check types, and meet repository quality rules.
Why use it?
It gives every assistant one source of truth and makes routine work easier to verify with documented build, lint, type-check, test, and coverage commands.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

This is diegosouzapw/OmniRoute's own configuration. It tells Codex and OpenCode how to work on OmniRoute itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything OmniRoute configures →

About the project

OmniRoute is an AI gateway that gives coding agents one endpoint for accessing models from many providers, with quota-aware fallback between them. It is for people using Claude Code, Codex, Cursor, OpenCode, Cline, Copilot, and similar tools who want a single route to their available AI models.

diegosouzapw/OmniRoute · 80,849 stars · on GitHub · omniroute.online

Reuse

Borrowing it

Nothing to install: this file belongs to diegosouzapw/OmniRoute. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/diegosouzapw/OmniRoute/release/v3.8.53/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/diegosouzapw/OmniRoute

Made for: Codex, OpenCode.

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 OmniRoute AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/diegosouzapw/omniroute/agents-md/github.svg)](https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md"><img src="https://agentmods.dev/badge/instructions/diegosouzapw/omniroute/agents-md/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 OmniRoute AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md"><img src="https://agentmods.dev/badge/instructions/diegosouzapw/omniroute/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10,247 This file is loaded in full into every session.
When invoked 10,247 The same file — it is already loaded in full.
Security scan B 1 finding. 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.10247 $0.10247
Opus 5.5 $0.04099 $0.04099
Sonnet 5.5 $0.02049 $0.02049
Haiku 4.5 $0.01025 $0.01025

Measured 6d ago against content hash 1ebb9ad5ebf9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

OmniRoute AGENTS.md scanned grade B with 1 finding 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 6d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **(b) Never merge, push, rebase, or force-push a PR / branch / worktree that another session is actively working** — including a PR whose head is a live fix worktree in `.claude/worktrees/` you did **not** create, even
AGENTS.md · 448 lines

How it starts

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

OmniRoute agent guide

Single source of truth. This file holds ALL project rules, conventions, architecture notes and Hard Rules for every AI assistant working this repository (Claude Code, Gemini, Codex, Copilot, and any other agent). CLAUDE.md and GEMINI.md only add assistant-specific deltas and point back here. When a rule needs to change, change it HERE — never re-fork it into an assistant-specific file.

Quick Start

npm install                    # Install deps (auto-generates .env from .env.example)
npm run dev                    # Dev server at http://localhost:20128
npm run build                  # Production build (Next.js 16 standalone)
npm run build:release          # Release build
npm run lint                   # ESLint (0 errors expected; warnings are pre-existing)
npm run typecheck:core         # TypeScript check (should be clean)
npm run typecheck:noimplicit:core  # Strict check (no implicit any)
npm run test:coverage          # Unit tests + coverage gate (67.33 / 67.33 / 72.02 / 65.08 — statements/lines/functions/branches, enforced by the blocking ratchet in config/quality/quality-baseline.json; test:coverage itself hardcodes 60)
npm run check                  # lint + test combined
npm run check:cycles           # Detect circular dependencies (advisory — lists the SCCs)
npm run check:cycles:ratchet   # Same scan, blocking above the quality-baseline ceiling
npm run check:docs-all         # Run after changing documentation (includes fabricated-docs validation)

Running tests: see Testing below (run the most focused test for changed code first).


Project at a Glance

OmniRoute — unified AI proxy/router. One endpoint, 375 LLM providers, auto-fallback.

  • API Routes — src/app/api/v1/ (Next.js App Router entry points)
  • Handlers — open-sse/handlers/ (request processing: chat, embeddings, etc)
  • Executors — open-sse/executors/ (provider-specific HTTP dispatch)
  • Translators — open-sse/translator/ (format conversion OpenAI↔Claude↔Gemini)
  • Transformer — open-sse/transformer/ (Responses API ↔ Chat Completions)
  • Services — open-sse/services/ (combo routing, rate limits, caching, etc)
  • Database — src/lib/db/ (SQLite domain modules, 209 migrations)
  • Domain/Policy — src/domain/ (policy engine, cost rules, fallback logic)
  • MCP Server — open-sse/mcp-server/ (110 tools: 45 canonical + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules; 3 transports: stdio / SSE / Streamable HTTP; 33 scopes)
  • A2A Server — src/lib/a2a/ (JSON-RPC 2.0 agent protocol)
  • Skills — src/lib/skills/ (extensible skill framework); Memory — src/lib/memory/ (persistent conversational memory)

Read the full file on GitHub · 448 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. 6d ago Changed · -345 lines · -5,388 tokens per session 1ebb9ad5ebf9
  2. 7d ago Changed · +2 lines · +38 tokens per session 0ef93eee3cbd
  3. 8d ago Changed 6c6314362280
  4. 15d ago Changed 11f594633e5d
  5. 17d ago Changed · +6 lines · +459 tokens per session d27b9bad1ece
  6. 23d ago Changed · +1 lines · +30 tokens per session ea703be88fa1
  7. 26d ago Changed a598133547a2
  8. 27d ago Changed 28cf63ddbbc0
  9. 1mo ago Changed 16d8013114d3
  10. 1mo ago First seen · 784 lines · 15,108 tokens per session scan B 104065b760ed

Subscribe to this mod's changes

OmniRoute AGENTS.md is an instructions file published in the GitHub repository diegosouzapw/OmniRoute (80,849 stars, last pushed yesterday), licensed MIT. It adds 10,247 tokens to every session, about $0.0410 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens