Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/adw-19/build_a_product_agent/claude-mdgit clone --depth 1 https://github.com/ADW-19/build_a_product_agentWhat 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 | $0.01422 | $0.01422 |
| Opus 5 | $0.00711 | $0.00711 |
| Sonnet 5 | $0.00284 | $0.00284 |
| Haiku 4.5 | $0.00142 | $0.00142 |
Grade A, and why
build_a_product_agent 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 yesterday.
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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
项目本质(README 概览之外)
这是一个纯文档项目——没有源码、没有依赖、没有构建/测试/静态检查命令,无需安装任何东西。内容是一份面向开发者的中文技术手册,主题是"如何从零构建生产级 AI Agent 后端"。所有内容在 docs/ 下,全部为简体中文 Markdown。
因此,本项目中的"开发任务"几乎都是写/改 Markdown 文章,而非写代码。代码块只是文章内容的一部分(示例代码)。
- 作者:Andy Yanqi Wang (ADW-19),上海
- 许可:MIT
- 提交信息使用中文(如
增加AI Infra章节) - 英文版:根目录和
docs/01-首页/下有README-en.md落地页;正文英文版暂未发布(TBD)。新增正文无需同步英文。
目录与编号规范
docs/ 下共 4 个一级目录,按"第 N 章"连续编号展开(一章一个二级目录):
docs/
├── 01-首页/ # 落地页 README(中英各一份)
├── 02-生产级开发-通用知识/ # 第1~4章
│ ├── 第1章:技术选型/ # 技术栈 / 中间件 / 协议与架构模式 / 运维架构
│ ├── 第2章:开发基本要求/ # 开发习惯(.env、Redis、async、日志、异常处理、类型注解)
│ ├── 第3章:模块开发/ # 对话接口 / 记忆 / 工具 / 工作流 / RAG
│ └── 第4章:Agent通路/ # 单Agent / Multi-Agent(A2A)
├── 03-生产级测试-系统测试/ # 第5章:系统测试
└── 04-生产级AI Infra-基座与运维/ # 第6章:AI Infra基础知识
命名规则:
- 一级目录:
NN-中文主题名(01-首页、02-生产级开发-通用知识…) - 章目录:
第N章:主题名 - 文章文件:
NN-标题.md,章内序号从 01 开始 - 章内 H1 编号在每个章目录内重置:每个章目录下的文章各自用
# 第一章/第二章/…,与全局章号无关(例如"第3章:模块开发"内的文件标题是# 第一章:对话接口、# 第二章:长期记忆与短期记忆)。不要想当然地把 H1 的"第N章"当作全局章号。 - 文件系统目录名(含冒号
:、空格、括号)是真实路径,编写/引用时原样保留,不要改写。
文章写作规范(新增/修改文章时必须遵循)
每一篇独立成文,遵循统一模板与叙事线 工业界标准 → 为什么课堂不教 → 你应该怎么写:
- 开头:H1
# 第N章:主题名,紧接一行> **核心论点**:…引言块(用一两句话概括本章最核心的判断)。 - 正文:小节标题
## 1.1 小节标题、## 1.2…(章内小节号从 1.1 递增)。 - 叙事结构:每个主题按
问题场景(学生/课堂典型错误代码)→ 本质原因 → 正确做法(带完整可运行代码)→ 对比表格 → 一句话总结展开。先给错误示范再给正确做法是强约定。 - 表达手段:大量使用对比表格(错误做法 vs 正确做法、维度对比)、ASCII 示意图(时序/架构图)、错误代码 vs 正确代码并置。每条关键结论通常以
**一句话…:**加粗短句收束。 - 示例代码:均为 Python 3.13+。Web 层用 FastAPI(async def 路由),Agent 编排用 LangGraph(
StateGraph/astream_events/checkpointer),工具层用 LangChain(@tool),数据校验用 Pydantic v2,Redis 一律用redis.asyncio,LLM 客户端用AsyncOpenAI。关键 SDK 版本要求:FastAPI ≥ 0.136、LangGraph ≥ 1.2、LangChain ≥ 1.3、Pydantic ≥ 2.13。 - 收尾:章末通常有
常见踩坑清单(表格:坑/现象/原因/解法)和本章小结(表格:要点/核心原则/一句话记住)。新文章建议沿用。 - 全章示例代码假设统一的项目骨架:
core/(config、llm、cache、database、agent、logger、middleware 单例封装)+routes/+services/+models/+tools/+main.py。各章代码示例互相引用这个结构(如from core.llm import call_llm_with_retry),写新文章时保持该骨架一致,不要引入与已有章节冲突的目录约定。
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.
- yesterday First seen · 56 lines · 1,422 tokens per session scan A 5e1eb98fdf47
build_a_product_agent CLAUDE.md is an instructions file published in the GitHub repository ADW-19/build_a_product_agent (107 stars, last pushed 2d ago), licensed MIT. It adds 1,422 tokens to every session, about $0.0071 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
kungfu AGENTS.md
Instructions for kungfu-systems/kungfu, covering agents.md, start from the person's objective, rules that always apply, load bounded context before changing the repository and execute and verify through shifu.
kungfu CLAUDE.md
Instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before working in this repository. It routes both product use and contribution work to the repository sources of truth, including the requirement that development and build tasks enter through Shifu.
kungfu copilot-instructions.md
Instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before proposing or running changes. It is the shared agent router for this repository, including the canonical Shifu development and build entrypoint.
BuildersGate CLAUDE.md
Instructions for Thepizzapie/BuildersGate, covering setting up builders gate for a user, ask two things first, install, point it at a game and keys.
growmos AGENTS.md
Instructions for codician-team/growmos: This repository keeps a knowledge graph in .growmos/ (entities, typed relations, provenance, profiles, a journal). It is the shared world model that survives context windows. Treat it as memory you read at the start of work and write to as you develop. Zero-config commands.
awesome-agent-infrastructure CLAUDE.md
Instructions for backblaze-labs/awesome-agent-infrastructure, covering claude.md — awesome-agent-infrastructure, what this list is, scope and files, schema, workflow, rules.