agents-md
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMaintaining AGENTS.md
维护AGENTS.md
AGENTS.md is the canonical agent-facing documentation. Keep it minimal—agents are capable and don't need hand-holding.
AGENTS.md是面向Agent的规范文档。请保持极简风格——Agent具备相应能力,无需手把手指导。
File Setup
文件设置
- Create at project root
AGENTS.md - Create symlink:
ln -s AGENTS.md CLAUDE.md
- 在项目根目录创建
AGENTS.md - 创建符号链接:
ln -s AGENTS.md CLAUDE.md
Before Writing
编写前准备
Discover local skills to reference:
bash
find .claude/skills -name "SKILL.md" 2>/dev/null
ls plugins/*/skills/*/SKILL.md 2>/dev/nullRead each skill's frontmatter to understand when to reference it.
发现本地技能以供参考:
bash
find .claude/skills -name "SKILL.md" 2>/dev/null
ls plugins/*/skills/*/SKILL.md 2>/dev/null阅读每个Skill的前置内容,了解何时引用它。
Writing Rules
编写规则
- Headers + bullets - No paragraphs
- Code blocks - For commands and templates
- Reference, don't duplicate - Point to skills: "Use skill. See
db-migrate".claude/skills/db-migrate/SKILL.md - No filler - No intros, conclusions, or pleasantries
- Trust capabilities - Omit obvious context
- 标题+项目符号 - 不要使用段落
- 代码块 - 用于命令和模板
- 引用而非重复 - 指向技能:“使用Skill。参见
db-migrate”.claude/skills/db-migrate/SKILL.md - 无冗余内容 - 不要添加引言、结论或客套话
- 信任Agent能力 - 省略明显的上下文信息
Required Sections
必填部分
Package Manager
包管理器
Which tool and key commands only:
markdown
undefined仅注明工具和关键命令:
markdown
undefinedPackage Manager
包管理器
Use pnpm: , ,
pnpm installpnpm devpnpm testundefined使用pnpm:, ,
pnpm installpnpm devpnpm testundefinedCommit Attribution
提交署名
Always include this section. Agents should use their own identity:
markdown
undefined必须包含此部分。Agent应使用自身身份:
markdown
undefinedCommit Attribution
提交署名
AI commits MUST include:
Co-Authored-By: (the agent model's name and attribution byline)Example:
Co-Authored-By: Claude Sonnet 4 <noreply@example.com>undefinedAI提交必须包含:
Co-Authored-By: (Agent模型的名称和署名信息)示例:
Co-Authored-By: Claude Sonnet 4 <noreply@example.com>undefinedKey Conventions
关键约定
Project-specific patterns agents must follow. Keep brief.
Agent必须遵循的项目特定模式。保持简洁。
Local Skills
本地技能
Reference each discovered skill:
markdown
undefined引用每个发现的技能:
markdown
undefinedDatabase
数据库
Use skill for schema changes. See
db-migrate.claude/skills/db-migrate/SKILL.md使用 Skill进行架构变更。参见
db-migrate.claude/skills/db-migrate/SKILL.mdTesting
测试
Use skill. See
write-tests.claude/skills/write-tests/SKILL.mdundefined使用 Skill。参见
write-tests.claude/skills/write-tests/SKILL.mdundefinedOptional Sections
可选部分
Add only if truly needed:
- API route patterns (show template, not explanation)
- CLI commands (table format)
- File naming conventions
仅在真正需要时添加:
- API路由模式(展示模板,不做解释)
- CLI命令(表格格式)
- 文件命名约定
Anti-Patterns
反模式
Omit these:
- "Welcome to..." or "This document explains..."
- "You should..." or "Remember to..."
- Content duplicated from skills (reference instead)
- Obvious instructions ("run tests", "write clean code")
- Explanations of why (just say what)
- Long prose paragraphs
需省略以下内容:
- “欢迎来到...”或“本文档解释...”
- “你应该...”或“记住要...”
- 从技能中重复的内容(改为引用)
- 显而易见的指令(如“运行测试”“编写整洁代码”)
- 解释原因(只需说明做什么)
- 冗长的段落
Example Structure
示例结构
markdown
undefinedmarkdown
undefinedAgent Instructions
Agent使用说明
Package Manager
包管理器
Use pnpm: ,
pnpm installpnpm dev使用pnpm:,
pnpm installpnpm devCommit Attribution
提交署名
AI commits MUST include:
Co-Authored-By: (the agent model's name and attribution byline)AI提交必须包含:
Co-Authored-By: (Agent模型的名称和署名信息)API Routes
API路由
[Template code block]
[模板代码块]
Database
数据库
Use skill. See
db-migrate.claude/skills/db-migrate/SKILL.md使用 Skill进行架构变更。参见
db-migrate.claude/skills/db-migrate/SKILL.mdTesting
测试
Use skill. See
write-tests.claude/skills/write-tests/SKILL.md使用 Skill。参见
write-tests.claude/skills/write-tests/SKILL.mdCLI
CLI
| Command | Description |
|---|---|
| Sync data |
undefined| 命令 | 描述 |
|---|---|
| 同步数据 |
undefined