Context-Engineering-Intro-ZH: Instructions file for Claude Code

CLAUDE.md

Context-Engineering-Intro-ZH CLAUDE.md is an instructions file for Claude Code from sabernagato/Context-Engineering-Intro-ZH. It costs 854 tokens per session, scanned A, original, MIT.

A set of Chinese instructions for coding agents working in a Python project. It covers project context, code structure, testing, task tracking, documentation, and coding style.

In plain words
What is it for?
Use it to guide Python feature work, tests, refactoring, environment setup, documentation updates, and task tracking in repositories that follow its conventions.
Why use it?
It gives the agent shared rules for understanding the repository and completing work consistently. This reduces missed tests, undocumented changes, oversized files, and unclear task status.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is sabernagato/Context-Engineering-Intro-ZH's own configuration. It tells Claude Code how to work on Context-Engineering-Intro-ZH 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 Context-Engineering-Intro-ZH configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sabernagato/Context-Engineering-Intro-ZH/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/sabernagato/Context-Engineering-Intro-ZH

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 Context-Engineering-Intro-ZH CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sabernagato/context-engineering-intro-zh/claude-md.svg)](https://agentmods.dev/instructions/sabernagato/context-engineering-intro-zh/claude-md)
Your own site
<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>
Per session 854 This file is loaded in full into every session.
When invoked 854 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.00854 $0.00854
Opus 5 $0.00427 $0.00427
Sonnet 5 $0.00171 $0.00171
Haiku 4.5 $0.00085 $0.00085

Measured 8d ago against content hash 24b1c6510118, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

CLAUDE.md · 63 lines

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,使用 SQLAlchemySQLModel 用于 ORM。
  • 使用 Google 风格为每个函数编写文档字符串
    def example():
        """
        简要摘要。
    
        Args:
            param1 (type): 描述。
    
        Returns:
            type: 描述。
        """
    

📚 文档和可解释性

  • 在添加新功能、依赖项更改或修改设置步骤时更新 README.md
  • 注释非显而易见的代码,并确保一切对中级开发人员都是可以理解的。
  • 编写复杂逻辑时,添加内联 # 原因: 注释,解释为什么,而不仅仅是什么。

🧠 AI 行为规则

  • 永远不要假设缺失的上下文。如果不确定,请提出问题。
  • 永远不要臆造库或函数 – 仅使用已知的、经过验证的 Python 包。
  • 在代码或测试中引用文件路径和模块名称之前,始终确认它们存在
  • 永远不要删除或覆盖现有代码,除非明确指示或作为 TASK.md 中任务的一部分。

重要指令提醒

做被要求的事情;不多不少。 除非对实现目标绝对必要,否则永远不要创建文件。 始终优先编辑现有文件而不是创建新文件。 永远不要主动创建文档文件(*.md)或 README 文件。只有在用户明确请求时才创建文档文件。

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. 8d ago First seen · 63 lines · 854 tokens per session scan A 24b1c6510118

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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

microsoft/vscode · 6,785 tokens

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

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens