Borrowing it
Nothing to install: this file belongs to sabernagato/Context-Engineering-Intro-ZH. 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/sabernagato/Context-Engineering-Intro-ZH/master/CLAUDE.mdgit clone --depth 1 https://github.com/sabernagato/Context-Engineering-Intro-ZHWrote 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/sabernagato/context-engineering-intro-zh/claude-md)<a href="https://agentmods.dev/instructions/sabernagato/context-engineering-intro-zh/claude-md"><img src="https://agentmods.dev/badge/instructions/sabernagato/context-engineering-intro-zh/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.1 | $0.00854 | $0.00854 |
| Opus 5 | $0.00427 | $0.00427 |
| Sonnet 5 | $0.00171 | $0.00171 |
| Haiku 4.5 | $0.00085 | $0.00085 |
Grade A, and why
Context-Engineering-Intro-ZH 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 8d 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.
What it actually says
🔄 项目意识和上下文
- 在新对话开始时始终阅读
PLANNING.md,以了解项目的架构、目标、风格和约束。 - 在开始新任务之前检查
TASK.md。如果任务未列出,请添加简要描述和今天的日期。 - 使用
PLANNING.md中描述的一致命名约定、文件结构和架构模式。 - 执行 Python 命令时使用 venv_linux(虚拟环境),包括单元测试。
🧱 代码结构和模块化
- 永远不要创建超过 500 行代码的文件。 如果文件接近此限制,请通过将其拆分为模块或辅助文件来重构。
- 将代码组织成清晰分离的模块,按功能或职责分组。
对于代理,看起来像这样:
agent.py- 主代理定义和执行逻辑tools.py- 代理使用的工具函数prompts.py- 系统提示
- 使用清晰、一致的导入(在包内优先使用相对导入)。
- 使用 python_dotenv 和 load_env() 处理环境变量。
🧪 测试和可靠性
- 始终为新功能创建 Pytest 单元测试(函数、类、路由等)。
- 更新任何逻辑后,检查现有单元测试是否需要更新。如果需要,请执行更新。
- 测试应位于
/tests文件夹中,镜像主应用程序结构。- 至少包括:
- 1 个预期使用测试
- 1 个边缘情况
- 1 个失败情况
- 至少包括:
✅ 任务完成
- 完成任务后立即在
TASK.md中标记已完成的任务。 - 将开发过程中发现的新子任务或待办事项添加到
TASK.md的"工作中发现"部分。
📎 风格和约定
- 使用 Python 作为主要语言。
- 遵循 PEP8,使用类型提示,并使用
black格式化。 - 使用
pydantic进行数据验证。 - 如果适用,使用
FastAPI用于 API,使用SQLAlchemy或SQLModel用于 ORM。 - 使用 Google 风格为每个函数编写文档字符串:
def example(): """ 简要摘要。 Args: param1 (type): 描述。 Returns: type: 描述。 """
📚 文档和可解释性
- 在添加新功能、依赖项更改或修改设置步骤时更新
README.md。 - 注释非显而易见的代码,并确保一切对中级开发人员都是可以理解的。
- 编写复杂逻辑时,添加内联
# 原因:注释,解释为什么,而不仅仅是什么。
🧠 AI 行为规则
- 永远不要假设缺失的上下文。如果不确定,请提出问题。
- 永远不要臆造库或函数 – 仅使用已知的、经过验证的 Python 包。
- 在代码或测试中引用文件路径和模块名称之前,始终确认它们存在。
- 永远不要删除或覆盖现有代码,除非明确指示或作为
TASK.md中任务的一部分。
重要指令提醒
做被要求的事情;不多不少。 除非对实现目标绝对必要,否则永远不要创建文件。 始终优先编辑现有文件而不是创建新文件。 永远不要主动创建文档文件(*.md)或 README 文件。只有在用户明确请求时才创建文档文件。
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.
- 8d ago First seen · 63 lines · 854 tokens per session scan A 24b1c6510118
Context-Engineering-Intro-ZH CLAUDE.md is an instructions file published in the GitHub repository sabernagato/Context-Engineering-Intro-ZH (56 stars, last pushed 1y ago), licensed MIT. It adds 854 tokens to every session, about $0.0043 per session on Opus 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.