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.
npx agentmods add instructions/animeshkundu/github-router/claude-mdgit clone --depth 1 https://github.com/animeshkundu/github-routerWrote 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.
[](https://agentmods.dev/instructions/animeshkundu/github-router/claude-md)<a href="https://agentmods.dev/instructions/animeshkundu/github-router/claude-md"><img src="https://agentmods.dev/badge/instructions/animeshkundu/github-router/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.30706 | $0.30706 |
| Opus 5 | $0.15353 | $0.15353 |
| Sonnet 5 | $0.06141 | $0.06141 |
| Haiku 4.5 | $0.03071 | $0.03071 |
Grade C, and why
github-router CLAUDE.md scanned grade C with 2 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 4d 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
`/mcp` also exposes three **worker tools** (group `workers`: `explore` read-only, `review` read + `bash`, `implement` read+write — `explore`/`implement` were `worker_explore`/`worker_implement`) that delegate scoped work Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
bad assertion: the `node:child_process` spawn mock in How it starts
The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.
github-router
A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.
Primary deployment target
The primary deployment target for this project is Windows 11. macOS and Linux are supported and tested, but Windows is the canonical user environment — every PR must pass the windows-latest CI job before merge. A Windows CI failure is treated as a merge blocker, not as flake. If Windows behavior diverges from POSIX, the Windows path is the authoritative one to fix; do not POSIX-skip a Windows failure to land a change.
The canonical end-user setup is Windows 11 + Claude Code (the CLI client) + a GitHub Copilot Enterprise license. The enterprise license is load-bearing for feature decisions: it unlocks catalog models gated restricted_to: ["enterprise"] and the 1M-context Opus variants — claude-opus-5 (the spawned-Claude-Code default, stand_in's Opus row, and opus_critic's model; the single base slug already advertises max_context_window_tokens: 1_000_000 — no -1m sibling needed). When choosing models or windows, assume the enterprise catalog is present (prefer the 1M variants), but always gate on the live catalog with a non-enterprise fallback so the proxy still works on lesser tiers.
Design docs
docs/peer-mcp-design.md— current architecture and phased migration plan for the peer-model MCP integration (codex_critic gpt-5.6-sol, codex_reviewer gpt-5.3-codex, gemini_critic gemini-3.1-pro), plus the deployed-state section covering auto-invocation triggers, allowedEfforts, the latency-by-effort matrix, and the predictedTooLong cap. Read this before changing anything insrc/routes/mcp/,src/lib/peer-mcp-personas.ts, orsrc/lib/codex-mcp-config.ts.docs/first-mate-design.md— shipped--agentsfirst-mate design: deterministic controller, dual-token GitHub write auth, durable ledgers/decisions, cloud-agent service layer, the deny-by-defaultGH_ROUTER_FM_SCAFFOLD_REPOSwrite allowlist forscaffold_repo, and human-bound merge gate. Read before touchingsrc/lib/first-mate/,src/lib/agent/, or theagentsMCP gate.docs/research/peer-mcp-investigation.md— multi-stage adversarial-review log behind the design: GitHub-issue refs (#50289 etc.), peer-critic verdicts at each iteration, the 7-batch sweep that proved decomposition works, and the concurrency-cap investigation. Read this when you want to know why a particular Phase ordering or specific value (cap=8, retention=30min, partial-buffer cap=1MB) was chosen.docs/research/stage-c-perf-spikes.md— measured request-prologue and startup-path spikes. Read before proposing a/v1/messagesprologue optimization or moving startup work off the pre-listen path: the current verdict is defer/reclassify pending shutdown body-size percentiles and a readiness-safe split.docs/research/shim-prompt-fidelity.md— measured A/B of Claude Code's verbatim system prompt against gpt-5.6-sol and gemini-3.1-pro-preview through the shim, withFILE_TOOL_GUIDANCEon vs off. Records which task shapes discriminate (appending to a file; the read/grep cases do not), that the steering block is what stops both models writing files through the shell, the residual geminiwc -lpreference, and the gpt identity-capture artifact. Read before adding per-model prompt steering — the evidence says don't.docs/publishing.md— npm/Docker release flow (OIDC trusted publishing), upgrade procedure for a running proxy, and theUPSTREAM_FETCH_TIMEOUT_MS/UPSTREAM_INACTIVITY_TIMEOUT_MStunables.docs/beta-headers.md—anthropic-betaallowlist (3 stealth vs 20 leverage prefixes), theEXPLICITLY_STRIPPED_BETA_PREFIXESdeny-list, body-field strips (budget,output_config.schema,betas,eager_input_streaming), and the stealth-vs-leverage policy rationale.docs/gateway-error-contract.md— Claude Code'scapability_rejected: <class>gateway contract: how the proxy tells the client WHY an upstream 400/413 happened so the client runs its own recovery instead of stranding. Covers the two classes emitted today (prompt_too_long,max_tokens_context_overflow), the verified dual matcher (IZ(e) = wording || token), why Copilot's "exceeds the context window" wording on a 400 used to classify as nothing and brick a long session, and the classes we still hand-roll. Read before changingforwardError/classifyOverflowinsrc/lib/error.ts.docs/claude-env-injection.md— the five experimentalCLAUDE_CODE_*env varsgithub-router claudeauto-enables (presence-based guard), per-feature opt-out, the catalog-derivedCLAUDE_CODE_AUTO_COMPACT_WINDOWinteger (all profiles), and howCLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERYis now CONDITIONALLY enabled (cache-seeded) while its network-fetch path stays closed.docs/anthropic-translation-shim.md— the/v1/messagestranslation shim that runs Claude Code's main loop on non-Claude Copilot models (gpt-5.5, gpt-5.3-codex via/responses; gemini-3.5-flash, gemini-3.1-pro-preview via/chat/completions): the classifier routing table + fail-closed Claude guard, the shared provider-neutral IR, the Responses vs Chat egress, the C1 buffer-tools-emit-atomically streaming model (and the parallel-tool-args-lost bug it fixes), the stream-ordering contract dependency + Phase 5 E2E backstop, thestop/parallel_tool_callsfield forwarding, the inherent Copilot model gaps, and the Phase 3 gateway-cache-seed native-selection mechanism. Read before touchingsrc/lib/anthropic-translate/, the/v1/messagesbranch insrc/routes/messages/handler.ts, or the Phase 3 helpers insrc/lib/server-setup.ts.docs/multimodal.md— how images reach a model (producers → MCPtext|imageresult union → the tool-result follow-up message → the single outbound vision preflight), the measured token cost of getting it wrong (base64 is ~1.46 chars/token, so a 200 KB screenshot is ~187k tokens versus ~1.5k as a native image block), the image-level replacement policy for malformed or unsupported inputs, upstream-ceiling prune-and-learn retry behaviour, peerimagePathsand why it takes paths rather than base64, the per-result image byte budget, and the capability register + scheduled drift alert that catch the next advertised-but-unplumbed capability. Read this before touchingsrc/lib/attachments.ts,src/lib/vision-preflight.ts,src/lib/peer-attachments.ts, orsrc/lib/catalog-capability-register.ts.docs/unsupported-features.md— Files API 404, ADVISOR Phase I server-side wiring,mcp_serversfail-fast 400, Bridge/CCR strip, and other Anthropic surfaces with no Copilot equivalent.docs/default-models.md—claude→claude-opus-5(Anthropic dashed slug, NOT the Copilot dotted slug —/modelUI registry mismatch),codex→gpt-5.6-sol, fallback chain led bygpt-5.5, the dual-signal[1m]detector (sibling-slug regex OR base-slugmax_context_window_tokens), and theANTHROPIC_SMALL_FAST_MODELdefault. Fast profile (shipped in this change): a Luna-led-m fastlaunch profile distinct from budget mode, three Luna effort aliases, a replaced 4-row gateway picker (Sol/Luna/Gemini 3.7 Flash/Grok 4.6), Grok's conservative context accounting, and a Gemini 3.7 Flash Advisor that remains primary-lead-only across every fixed/modelselection — see the "Fast launch profile" section of that doc. Context-window safety (all profiles): Claude Code's[1m]budgets against the advertised TOTAL window while Copilot enforces a smallermax_prompt_tokens(Luna 922K, Opus 5 936K), putting the client's own compaction threshold ABOVE the ceiling; every launch now injects a catalog-derived decimal-integerCLAUDE_CODE_AUTO_COMPACT_WINDOW, minimizingfloor(prompt*0.85)+min(output,20_000)+13_000across every reachable[1m]lead/tier/custom/gateway model (deriveAutoCompactWindowTokensinsrc/lib/grok-context.ts)./modelcannot mutate it; Claude Code appliesmin(locallyRecognizedModelWindow, launchValue), and native subagents inherit the same env. It MUST be an integer — that env path isparseInt-based, so"1m"becomes1, floors to 100,000, and compacts a 1M session every ~52K tokens.docs/auth-isolation.md—STRIPPED_PARENT_ENV_KEYSparent-env sanitize,CLAUDE_CONFIG_DIRsnapshot mirror (ISOLATED / SHARED / MIRRORED policy), syntheticclaudeAiOauthcredential schema, synthetic.claude.jsononboarding-skip injection (hasCompletedOnboarding/bypassPermissionsModeAccepted/ syntheticoauthAccount— required so fresh-machine launches don't trigger Claude Code's first-launch OAuth wizard), keychain isolation, no-401 invariant, agent-teams fix, and trade-offs.docs/web-search.md— Copilot/mcpwire flow withX-MCP-Toolsets: web_search, GitHub PAT auth, model-agnostic out-of-band fulfilment, and theCOPILOT_HOST_ALLOWLISTPAT-exfiltration safeguard.docs/pi-vendor-sync.md— vendor-sync protocol forsrc/vendor/pi/(Pi agent runtime backingworker_explore/worker_implement): how to refresh from upstream, which files MUST stay in sync, which slices were deliberately omitted, and the MIT-attribution invariant.docs/browser-mcp-design.md— architecture for the--browseflag'sbrowser_*tool suite (15 tools driving Chrome/Edge via a from-scratch MV3 extension + native-messaging bridge). Covers the install-detection / auto-install /install_requiredflow, the dual-layer navigation block, the stable extension ID derivation, per-OS NMH paths (registry on Windows, file on POSIX), Bun-vs-Node bridge-runtime gotcha, and the Playwright E2E harness gated onGH_ROUTER_RUN_BROWSER_E2E=1. Read this before touchingsrc/lib/browser-mcp/,src/browser-bridge/, orsrc/browser-ext/.docs/semantic-search.md+docs/research/colbert-sidecar-design.md— ColBERT/PLAID semantic search (the defaultmode: "semantic"of the unifiedcodeMCP tool, via the router-managedcolgrepsidecar; there is no standalonesemantic_searchtool). Covers the on-by-default provision + background-index, the availability-basedcolbertSearchEnabled()leaf (whichsemanticSearchEnabled()delegates to), the contract split (therunnerstays no-lexical-fallback; the mergedcodetool's semantic mode DOES fall back to lexical and labelssource), the git freshness verdict (the staleness correctness guard), the CLI-per-invocation lifecycle (PID ledger + tree-kill + boot sweep), and the SHA-pinned supply chain that closes colgrep's unverified ORT/model downloads. Read before touchingsrc/lib/colbert/orsrc/lib/unified-code-search.ts.docs/process-teardown.md— deterministic child-process teardown for the launched CLI: the canonicalkillChildProcessTreehelper, the extension-conditioned Windows spawn (windowsLaunchNeedsShell— real.exespawned direct, only.cmd/.batkeepcmd.exe), POSIXdetached:true+ SIGINT/SIGTERM forwarding, and the crash-safe net: on Windows the runtime'sKILL_ON_JOB_CLOSEJob Object already reaps the tree (astartProcessGuardno-op there, asserted by a regression canary), on POSIX a detached start-time-verifiednode -ereaper insrc/lib/process-guard/(inherited-pipe-EOF parent-death signal, skip-when-uncertain). Documents which exit paths are deterministic vs best-effort. Read before touchingcleanup()insrc/lib/launch.tsorsrc/lib/process-guard/.docs/serve-control-plane.md— thegithub-router servebrowser control plane: launches CloudCLI (@cloudcli-ai/cloudcli, AGPL) as a separate arm's-length process and reverse-proxies it under github-router's own origin with zero-login (localStorage['auth-token']HTML injection). Covers the Option-B reverse-proxy architecture (src/lib/serve/), the security model (loopback bind, proxy-sideOriginenforcement CloudCLI lacks, filtered child env strippingGITHUB_TOKEN/ANTHROPIC_AUTH_TOKEN/etc., JWT-on notVITE_IS_PLATFORM), the pinned router-owned install (never global/@latest), and the MIT-vs-AGPL mere-aggregation stance (NOTICE+scripts/check-pack-no-agpl.mjsrelease guard). Read before touchingsrc/serve.tsorsrc/lib/serve/.
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.
- 4d ago First seen · 292 lines · 30,706 tokens per session scan C 0dc411a817e7
github-router CLAUDE.md is an instructions file published in the GitHub repository animeshkundu/github-router (5 stars, last pushed 4d ago), licensed MIT. It adds 30,706 tokens to every session, about $0.1535 per session on Opus 5. A static security scan graded it C with 2 findings (reaches for credential files, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
wyoming_openai AGENTS.md
Instructions for roryeckel/wyoming_openai, covering agents.md, project overview, development commands, testing and install development dependencies.
wyoming_openai CLAUDE.md
Instructions for roryeckel/wyoming_openai, a project described as: OpenAI-Compatible Proxy Middleware for the Wyoming Protocol.
mockserver-monorepo AGENTS.md
AGENTS.md instructions for mock-server/mockserver-monorepo, covering mockserver — agent instructions, instruction priority, project overview, local development environment and project documentation.
GreenTunnel CLAUDE.md
Claude Code instructions for SadeghHayeri/GreenTunnel, covering greentunnel v3, commands, running the cli, ⚠️ npm run dev changes your real system proxy and layout.
spec-kitty AGENTS.md
AGENTS.md instructions for Priivacy-ai/spec-kitty, covering spec kitty development guidelines, ⚠️ critical: load the project charter first, ⚠️ critical: template source location, ⚠️ critical: use canonical sources, never improvise and ⚠️ critical: git workflow — no direct pushes to origin/main.
AstrBot copilot-instructions.md
Copilot instructions for AstrBotDevs/AstrBot, covering astrbot development instructions, working effectively, bootstrap and install dependencies, running the application and dashboard build (vue.js/node.js).