nexus: Instructions file for Claude Code

CLAUDE.md

nexus CLAUDE.md is an instructions file for Claude Code from Nexus-Router/nexus. It costs 5,592 tokens per session, scanned A, original, MPL-2.0.

Repository instructions for Nexus, an AI router that connects language models to multiple MCP servers, which are services exposing tools and data to AI systems. They define commit-message rules, project terminology, and Rust coding guidance.

In plain words
What is it for?
Use them when editing Nexus, especially when writing Rust code, describing MCP or routing behavior, and preparing commits.
Why use it?
They give coding agents the domain background and contribution conventions needed to change the router consistently.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nexus-router/nexus/claude-md"><img src="https://agentmods.dev/badge/instructions/nexus-router/nexus/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,592 This file is loaded in full into every session.
When invoked 5,592 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.05592 $0.05592
Opus 5.5 $0.02237 $0.02237
Sonnet 5.5 $0.01118 $0.01118
Haiku 4.5 $0.00559 $0.00559

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

Security

Grade A, and why

nexus 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 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.

CLAUDE.md · 694 lines

How it starts

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

LLM Code Editing Guidelines for Nexus

When editing code in this repository, you are working on Nexus, an AI router that aggregates MCP (Model Context Protocol) servers and LLMs. This system helps reduce tool proliferation by intelligently routing and indexing available tools.

Commit Messages

  • Follow the Conventional Commits 1.0.0 specification for every commit message.
  • Use recent commits (git log) as a reference for tone and formatting if you need examples.
  • Structure messages as type(issue number): subject, where
  • Common type values include feat, fix, chore, docs, refactor, test, and build; pick the one that best matches the change.
  • The issue number is a linear issue number, in the format of gb-1234. The user should give you this in the prompt, but if you don't have it, you can ask the user for it.
  • Keep the subject in the imperative mood, ≤72 characters, and avoid punctuation at the end.

Domain Context

  • MCP (Model Context Protocol): A protocol for connecting AI models with external tools and data sources
  • AI Router: Nexus acts as an intelligent intermediary between LLMs and multiple MCP servers
  • Tool Indexing: Uses Tantivy (full-text search engine) to create searchable indexes of available tools
  • Dynamic vs Static Tools: Static tools are shared across users; dynamic tools require user authentication

Key Technologies

  • Rust: The primary programming language
  • Axum: Web framework for HTTP routing and middleware
  • Tantivy: Full-text search engine for tool indexing
  • Tokio: Async runtime
  • Serde: Serialization/deserialization for JSON/TOML
  • RMCP: Rust MCP client/server implementation
  • Anyhow: Error handling with context and backtrace
  • Reqwest: HTTP client for external API calls
  • JWT-Compact: JWT token handling for authentication
  • Tower/Tower-HTTP: Middleware and service layers
  • Rustls: TLS implementation for secure connections
  • Insta: Snapshot testing framework
  • Clap: Command-line argument parsing
  • Logforth: Structured logging with tracing support
  • Docker Compose: For integration testing with Hydra OAuth2 server
  • Governor: Rate limiting with token bucket algorithm
  • Mini-moka: In-memory caching for rate limit buckets
  • Redis: Redis support for distributed rate limiting
  • Deadpool: Connection pooling
  • OpenTelemetry: Observability with metrics collection and OTLP export

Read the full file on GitHub · 694 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. 2mo ago First seen · 694 lines · 5,592 tokens per session scan A d6c1758d75cb

Subscribe to this mod's changes

nexus CLAUDE.md is an instructions file published in the GitHub repository Nexus-Router/nexus (438 stars, last pushed 7mo ago), licensed MPL-2.0. It adds 5,592 tokens to every session, about $0.0224 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

nexus CLAUDE.md compared with instructions from other repositories

nexus CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nexus CLAUDE.mdNexus-Router/nexusInstructions file4387mo agoMPL-2.0A5,592Claude 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