ClawRouter: Instructions file for Claude Code

CLAUDE.md

ClawRouter CLAUDE.md is an instructions file for Claude Code from BlockRunAI/ClawRouter. It costs 726 tokens per session, scanned A, original, MIT.

Repository instructions for ClawRouter, a service that routes requests among many language models and handles wallet-based USDC payments. USDC is a digital currency designed to track the US dollar.

In plain words
What is it for?
Building and developing the router, running unit and resilience tests, checking types and formatting, and testing authentication, tool identifiers, Docker installation, and integrations.
Why use it?
They give contributors the project's commands, file layout, dependencies, and conventions for changing or testing the router safely.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: built for openclaw.

This is BlockRunAI/ClawRouter's own configuration. It tells Claude Code how to work on ClawRouter 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 ClawRouter configures →

About the project

ClawRouter is a local service that chooses among language models for each request and handles payment for their use. Autonomous agents use it to access multiple LLM providers through one routing and billing system.

BlockRunAI/ClawRouter · 6,652 stars · on GitHub · npmjs.com

Reuse

Borrowing it

Nothing to install: this file belongs to BlockRunAI/ClawRouter. 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/BlockRunAI/ClawRouter/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/BlockRunAI/ClawRouter

Made for: Claude Code.

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 ClawRouter CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/blockrunai/clawrouter/claude-md/github.svg)](https://agentmods.dev/instructions/blockrunai/clawrouter/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/blockrunai/clawrouter/claude-md"><img src="https://agentmods.dev/badge/instructions/blockrunai/clawrouter/claude-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 ClawRouter CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/blockrunai/clawrouter/claude-md"><img src="https://agentmods.dev/badge/instructions/blockrunai/clawrouter/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 726 This file is loaded in full into every session.
When invoked 726 The same file — it is already loaded in full.
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.00726 $0.00726
Opus 5.5 $0.00290 $0.00290
Sonnet 5.5 $0.00145 $0.00145
Haiku 4.5 $0.00073 $0.00073

Measured today against content hash a7b07ce74c4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ClawRouter CLAUDE.md 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 today.

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.

CLAUDE.md · 64 lines

How it starts

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

ClawRouter

Smart LLM router for autonomous agents. 91 models. Two ways to pay:

  • Wallet (default) — x402 USDC micropayments signed per call, against blockrun.ai/api (Base), sol.blockrun.ai/api (Solana) or arc.blockrun.ai/api (Circle's Arc, same EVM key as Base). New installs default to Solana. Per-chain facts (gateway, label, CAIP-2) live in src/payment-chain.ts.
  • API key — brk_live_… from user.blockrun.ai, billed against card-funded account credit, against api.blockrun.ai. src/api-key.ts resolves it (env → ~/.blockrun/.api-key → ~/.openclaw/blockrun/api-key); a key present anywhere wins over a wallet, and no wallet is generated or read in that mode.

Commands

npm install              # install dependencies
npm run build            # compile with tsup
npm run dev              # watch mode
npm test                 # run vitest
npm run typecheck        # type checking
npm run lint             # eslint
npm run format           # prettier
npm run test:resilience:quick   # error + lifecycle resilience tests
npm run test:resilience:full    # full resilience suite (4hr stability)
npm run test:e2e:tool-ids       # end-to-end tool ID sanitization
npm run test:docker:install     # Docker install test
npm run test:docker:edge-cases  # Docker edge case tests
npm run test:docker:integration # Docker integration tests

Project structure

src/
├── index.ts             # Library entry point
├── cli.ts               # CLI entry point
├── auth.ts              # Wallet-based authentication
├── api-key.ts           # BlockRun API-key auth (api.blockrun.ai)
├── balance.ts           # USDC balance management
├── models.ts            # Model registry and scoring
├── config.ts            # Configuration
├── errors.ts            # Error classification
├── logger.ts            # Logging
├── journal.ts           # Request journaling
├── exclude-models.ts    # Model exclusion logic
├── dedup.ts             # Request deduplication
├── fs-read.ts           # Filesystem reading
├── compression/         # Request/response compression
├── doctor.ts            # Diagnostic tool
└── partners/            # Partner integrations

Read the full file on GitHub · 64 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. today Changed a7b07ce74c4c
  2. 8d ago Changed · +40 tokens per session ae5c19945a7d
  3. 16d ago Changed 7818ce0626eb
  4. 26d ago Changed 85262a9f1b66
  5. 1mo ago Changed 448541f1ef1f
  6. 1mo ago Changed 3ae5866eca28
  7. 1mo ago Changed 33e2df8157c0
  8. 2mo ago Changed · +4 lines · +151 tokens per session 80cadee8dd68
  9. 2mo ago Changed 12f4b5e6a29f
  10. 2mo ago First seen · 60 lines · 535 tokens per session scan A 3afba690cf78

Subscribe to this mod's changes

ClawRouter CLAUDE.md is an instructions file published in the GitHub repository BlockRunAI/ClawRouter (6,652 stars, last pushed yesterday), licensed MIT. It adds 726 tokens to every session, about $0.0029 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

ClawRouter CLAUDE.md compared with instructions from other repositories

ClawRouter CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ClawRouter CLAUDE.mdBlockRunAI/ClawRouterInstructions file6.7kyesterdayMITA726Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode