aisix: Instructions file for Claude Code

CLAUDE.md

aisix CLAUDE.md is an instructions file for Claude Code from api7/aisix. It costs 11,380 tokens per session, scanned A, original, Apache-2.0.

A set of instructions for Claude Code that guides how an AI coding assistant should think and change code. It emphasizes stating assumptions, keeping solutions simple, and making only necessary edits.

In plain words
What is it for?
Use it to guide coding tasks that need careful reasoning, minimal changes, clear assumptions, and goal-focused execution.
Why use it?
It reduces common coding-agent mistakes such as guessing silently, adding unrequested features, overcomplicating code, or changing unrelated files.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/api7/aisix/claude-md"><img src="https://agentmods.dev/badge/instructions/api7/aisix/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11,380 This file is loaded in full into every session.
When invoked 11,380 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.11380 $0.11380
Opus 5.5 $0.04552 $0.04552
Sonnet 5.5 $0.02276 $0.02276
Haiku 4.5 $0.01138 $0.01138

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

Security

Grade A, and why

aisix 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 · 306 lines

How it starts

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

CLAUDE.md

Behavioral guidelines to reduce common LLM coding mistakes. Bias toward caution over speed; for trivial tasks, use judgment. Merge with project-specific instructions as needed.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

  • State assumptions explicitly; if uncertain, ask.
  • If multiple interpretations exist, present them — don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop, name what's confusing, and ask.

Scope a customer-driven issue from the requester's quoted words, not from the rest of the body. These issues are filed in api7/AISIX-Cloud (a gateway change is routinely one half of a cross-repo issue) and are drafted with AI help, and the expansion only ever runs one way — it never states the ask smaller. One customer question ("how do I tell text / image / video requests apart in api7 or SLS, and how do I query it?") arrived as AISIX-Cloud#1461: five proposed wire fields, a modality taxonomy and nine acceptance checkboxes. Working from the body as written therefore over-delivers by default — that is the failure this rule exists to prevent, not a description of what to do.

  • Find the quoted words by content, not by heading. That repo's feature_request.yml collects them under 「原始需求(逐字)」, but blank issues are enabled and gh issue create bypasses the form, so most issues never went through it and one that imitates the template titles the section however its author chose. Read for the part that quotes the requester; only when the issue genuinely carries none, ask — never reconstruct it from the body.
  • Everything else in the issue — the user story, the proposed solution, the acceptance checkboxes, the pasted industry comparison — is analysis by whoever filed it, and loses to the quoted words on conflict. Leads, not a contract. The comparison against mainstream gateways that section 7 mandates is your own, run now against upstream HEAD, never the one pasted in the issue.
  • Before writing code, state three things and get them confirmed: the quoted ask, what you will build, and what you are dropping as expansion. Dropping silently is as wrong as building it. "How much of the acceptance criteria should I do?" is the wrong question — it takes the expansion as the baseline and negotiates only its volume.
  • None of this weakens delivery once scope IS agreed: the agreed scope still ships whole, across every surface it touches.

Read the full file on GitHub · 306 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 · +8 lines · +595 tokens per session 857666186577
  2. 7d ago Changed · -2 lines · -66 tokens per session fc62c9fc316f
  3. 10d ago Changed · +20 lines · +515 tokens per session f1d5a87bf2b1
  4. 14d ago Changed · +1 lines · +57 tokens per session 539db17e9d4a
  5. 15d ago Changed · +123 tokens per session 363750fcbb94
  6. 16d ago Changed · +4 lines · +51 tokens per session 58912b891a3e
  7. 22d ago Changed · +14 lines · +216 tokens per session c1ca9bf3dd20
  8. 27d ago Changed · +65 tokens per session b912ff109a1e
  9. 1mo ago Changed · +6 lines · +597 tokens per session b2b4d642bf9d
  10. 1mo ago First seen · 255 lines · 9,227 tokens per session scan A 62b63747cbb4

Subscribe to this mod's changes

aisix CLAUDE.md is an instructions file published in the GitHub repository api7/aisix (214 stars, last pushed yesterday), licensed Apache-2.0. It adds 11,380 tokens to every session, about $0.0455 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

aisix CLAUDE.md compared with instructions from other repositories

aisix CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aisix CLAUDE.mdapi7/aisixInstructions file214yesterdayApache-2.0A11,380Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,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