Qwen Code is an open-source AI coding agent that runs in a terminal and helps developers work with code through language models. It supports multiple model providers and can also be used through IDEs, desktop software, SDKs, and messaging bots.
Borrowing it
Nothing to install: this file belongs to QwenLM/qwen-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/QwenLM/qwen-code/main/AGENTS.mdgit clone --depth 1 https://github.com/QwenLM/qwen-codeWrote 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/qwenlm/qwen-code/agents-md)<a href="https://agentmods.dev/instructions/qwenlm/qwen-code/agents-md"><img src="https://agentmods.dev/badge/instructions/qwenlm/qwen-code/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.
<a href="https://agentmods.dev/instructions/qwenlm/qwen-code/agents-md"><img src="https://agentmods.dev/badge/instructions/qwenlm/qwen-code/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.04344 | $0.04344 |
| Opus 5.5 | $0.01738 | $0.01738 |
| Sonnet 5.5 | $0.00869 | $0.00869 |
| Haiku 4.5 | $0.00434 | $0.00434 |
Grade A, and why
qwen-code AGENTS.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 16d 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.
How it starts
The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Working Principles
Simplicity First
Minimum code that solves the problem. Nothing speculative. (This is the principle we care about most.)
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
Core Infrastructure Is Maintainer-Only (triage gate, two-tier rule)
Core modules — packages/core/src/**, packages/*/src/auth/**,
packages/*/src/providers/**, packages/*/src/models/**,
packages/*/src/config/**, packages/*/src/tools/**,
packages/*/src/services/**, cross-package changes — are the architectural
backbone. External PRs touching them face a two-tier gate (maintainer-authored
PRs are exempt):
- Large-scope
refactorchanges (500+ production logic lines in core, excluding test and generated/schema files) → hard block. Skip evaluation entirely — the maintainer exemption above is the sole exception. Large-scale core refactors must be maintainer-initiated. When counting lines, exclude files matching*.test.ts,*.test.tsx,*.spec.ts,*.spec.tsx,__tests__/**,*.schema.ts,*.schema.json,*.generated.ts, and**/generated/**— only production logic counts.feat-type and other non-refactorPRs are NOT hard-blocked on size; they escalate to the maintainer for awareness instead. A non-blocking advisory also applies at 1000+ production logic lines. Breadth alone is not size — a low-risk sweep that touches 10+ files but changes a line or two each is escalated to a maintainer for awareness and otherwise judged under Tier 2's 100%-confidence bar, not auto-rejected on file count. - Small-scope changes → gate may evaluate, but must be 100% confident. Any doubt at all → escalate to maintainer. "The direction looks correct" is not confidence. The gate must name every downstream consumer; if it cannot, escalate.
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.
- 16d ago Changed · -2 tokens per session e69084e39585
- 21d ago Changed · -6 tokens per session f5f637cd75f1
- 22d ago Changed · +18 lines · +244 tokens per session b0c616ae9b67
- 1mo ago Changed · -1 lines · +5 tokens per session 77c655dcc198
- 1mo ago Changed · +3 lines · +49 tokens per session debc7d0aec42
- 1mo ago Changed · +1 lines · +103 tokens per session 0ff7902ee1a3
- 1mo ago Changed · +3 lines · +59 tokens per session 75f5eb14a7ba
- 1mo ago Changed · +8 lines · +121 tokens per session 6a8d6c80e9fc
- 1mo ago Changed · +10 lines · +154 tokens per session b6270113c6e2
- 2mo ago First seen · 327 lines · 3,617 tokens per session scan A c3a7b9451f6f
qwen-code AGENTS.md is an instructions file published in the GitHub repository QwenLM/qwen-code (29,032 stars, last pushed yesterday), licensed Apache-2.0. It adds 4,344 tokens to every session, about $0.0174 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.
qwen-code AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| qwen-code AGENTS.mdQwenLM/qwen-code | Instructions file | 29k | yesterday | Apache-2.0 | A | 4,344 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |