Agent md 编写
- 作者仓库星标 0
- 作者仓库 skills-registry
agents-md-author
Generate cross-vendor project instruction files: AGENTS.md for Codex (and most other tools), CLAUDE.md for Claude Code, or both kept in sync. Load references/agents-md-spec.md if you need the cross-vendor convention details.
When to activate
- User asks to "write AGENTS.md", "create CLAUDE.md", or "set up project instructions for AI"
- User wants the same project doc to work in Codex, Claude Code, Cursor, or any tool that follows the AGENTS.md convention
- User mentions onboarding a new AI tool to an existing repo and wants conventions captured
Procedure
1. Detect project context (always do this first)
Read the project root and determine:
- Project name — from
package.jsonname,pyproject.toml[project].name,go.modmodule,Cargo.toml[package].name, or fallback to repo dir name - Language & runtime —
package.json(Node + lockfile flavor),requirements.txt/pyproject.toml(Python),go.mod(Go),Cargo.toml(Rust),pom.xml/build.gradle(JVM),*.csproj(.NET) - Common scripts — Node
scripts.{dev,build,test,lint,typecheck}; Pythontox.ini/Makefile; Go/Rust task tools - Test framework — vitest, jest, pytest, go test, cargo test, etc.
- Repo conventions — existing
.editorconfig,.prettierrc,eslint.config.*,pre-commit-config.yaml
If the user provided context (e.g., "this is a Next.js + Prisma app"), use it; otherwise infer from files. Don't ask questions you can answer from disk.
2. Decide the target file(s)
| User wants | Write |
|---|---|
| Codex / OpenAI tools only | AGENTS.md |
| Claude Code only | CLAUDE.md |
| Both, kept in sync | AGENTS.md + CLAUDE.md (identical content), or AGENTS.md plus a one-line CLAUDE.md that says "See AGENTS.md" |
| Single source (recommended) | AGENTS.md + CLAUDE.md symlink → AGENTS.md |
Default to "both, identical content" unless the user specifies — it's the lowest-risk option and works everywhere.
3. Compose content
Use this canonical structure (load references/agents-md-spec.md if you need the field-by-field rationale or cross-vendor details):
# <Project name>
<one-sentence description>
## Tech stack
- <language + version>
- <framework + version>
- <database / runtime / deployment>
## Dev commands
- Install: `<command>`
- Dev server: `<command>`
- Build: `<command>`
- Test: `<command>` (unit) / `<command>` (e2e)
- Lint / typecheck: `<command>`
## Code conventions
- <indent + line length>
- <import style>
- <naming conventions>
- <test colocation>
- <commit style>
## Architecture notes
<2-5 bullets on layout — where routes live, where business logic lives, what's shared>
## Out of scope for AI agents
<deliberate "don't touch" list — generated files, secrets, migrations, etc.>
Keep it under ~150 lines. AI agents skim — verbose docs are skipped or ignored.
4. Write files
- Use canonical line endings for the OS (LF on macOS/Linux)
- Don't add a trailing summary or "generated by" footer — the file is now the user's
- If a file already exists, read it first, propose a diff, and ask the user before overwriting
5. Verify
- Print the relative paths written
- If both
AGENTS.mdandCLAUDE.mdwere written, confirm they're byte-identical (or show the symlink) - Suggest the user commit the files
References
references/agents-md-spec.md— full cross-vendor convention summary (Anthropic, OpenAI, Cursor, etc.) — load on demand for spec details, vendor matrix, and the AGENTS.md ≠ SKILL.md distinction- Anthropic Agent Skills spec: https://github.com/anthropics/skills
- OpenAI Codex AGENTS.md guide: https://developers.openai.com/codex/guides/agents-md
- agents.md cross-vendor standard: https://agents.md
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: anton-abyzov/vskill — distributed by TomeVault.
- 流狐分类
- 文档
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux
- 底层运行要求
- Node.js · Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 User asks to "write AGENTS.md", "create CLAUDE.md", or "set up project instructions for AI" User wants the same project doc to work in Codex, Claude Code, Cursor, or any tool that follows the AGENTS.md convention User mentions onboarding a new AI tool to an…
Procedure
Read the project root and determine: Project name — from package.json name, pyproject.toml [project].name, go.mod module, Cargo.toml [package].name, or fallback to repo dir name Language & runtime — package.json (Node + lockfile flavor), requirements.txt /…
User wants · Write Codex / OpenAI tools only · AGENTS.md Claude Code only · CLAUDE.md
Use this canonical structure (load references/agents-md-spec.md if you need the field-by-field rationale or cross-vendor details):
<language + version> <framework + version> <database / runtime / deployment>
# agents-md-author
Generate cross-vendor project instruction files: `AGENTS.md` for Codex (and most other tools), `CLAUDE.md` for Claude Code, or both kept in sync. Load `references/agents-md-spec.md` if you need the cross-vendor convention details.
## When to activate
- User asks to "write AGENTS.md", "create CLAUDE.md", or "set up project instructions for AI"
- User wants the same project doc to work in Codex, Claude Code, Cursor, or any tool that follows the AGENTS.md convention
- User mentions onboarding a new AI tool to an existing repo and wants conventions captured
## Procedure
### 1. Detect project context (always do this first)
Read the project root and determine:
- **Project name** — from `package.json` `name`, `pyproject.toml` `[project].name`, `go.mod` `module`, `Cargo.toml` `[package].name`, or fallback to repo dir name
- **Language & runtime** — `package.json` (Node + lockfile flavor), `requirements.txt` / `pyproject.toml` (Python), `go.mod` (Go), `Cargo.toml` (Rust), `pom.xml` / `build.gradle` (JVM), `*.csproj` (.NET)
- **Common scripts** — Node `scripts.{dev,build,test,lint,typecheck}`; Python `tox.ini` / `Makefile`; Go/Rust task tools
- **Test framework** — vitest, jest, pytest, go test, cargo test, etc.
- **Repo conventions** — existing `.editorconfig`, `.prettierrc`, `eslint.config.*`, `pre-commit-config.yaml`
If the user provided context (e.g., "this is a Next.js + Prisma app"), use it; otherwise infer from files. Don't ask questions you can answer from disk.
### 2. Decide the target file(s)
| User wants | Write |
|---|---|
| Codex / OpenAI tools only | `AGENTS.md` |
| Claude Code only | `CLAUDE.md` |
| Both, kept in sync | `AGENTS.md` + `CLAUDE.md` (identical content), or `AGENTS.md` plus a one-line `CLAUDE.md` that says "See AGENTS.md" |
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> When to activate → Procedure → 1. Detect project context (always do this first) → 2. Decide the target file(s) → 3. Compose content → Tech stack
要点 -> Project name · Language & runtime · Common scripts · Test framework · Repo conventions · read it first
文件/命令 -> AGENTS.md · CLAUDE.md · references/agents-md-spec.md · package.json · name · pyproject.toml · [project].name · go.mod
内容 SHA-256 -> 383554017180
原文结构
适用与边界
原文中的明确线索
AGENTS.md、CLAUDE.md、references/agents-md-spec.md、package.json、name、pyproject.toml、[project].name、go.mod