agents-md
它能做什么
这个工具可以帮助创建或改进一个名为 AGENTS.md 的文件。该文件包含 AI 智能体如何在编程项目中正确做出修改的指令,这些指令基于项目本身的信息。
适用场景
- ✓你想创建一个新的 AGENTS.md 文件时。
- ✓AGENTS.md 中现有的指令已经过时时。
- ✓你想确保智能体的指令符合项目规则时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/agents-md/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为这个项目创建一个 AGENTS.md,重点写构建和测试说明。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会读取项目文件,了解项目的运作方式。然后,它会根据这些信息编写或调整 AGENTS.md,确保指令准确,并对 AI 智能体有用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Maintain AGENTS.md from repository evidence
Overview
Create or improve agent instructions that help a coding agent change the repository correctly without rediscovering its workflow. Base every repository-specific command, path, and rule on evidence in the current checkout.
Prefer a focused diff over a wholesale rewrite. There is no universal line limit, required section list, symlink layout, or commit-attribution policy; follow the repository's own needs and maintainer intent.
When to Use
- The user asks to create, update, shorten, or audit
AGENTS.md. - A monorepo needs root instructions plus narrower package-level overrides.
- Existing agent instructions contain stale commands, duplicated policy, or unsupported claims.
- The user wants to reconcile
AGENTS.mdwithCLAUDE.md,.github/copilot-instructions.md, or other repository instruction files.
Use @agents-generator instead when the task specifically calls for its
packaged generation modes, assets, or backup workflow. Use this skill when a
maintainer-readable, evidence-first edit is the primary goal.
How It Works
1. Preserve existing intent
Before writing, read every instruction file that applies to the target path,
including existing AGENTS.md files and relevant tool-specific files such as
CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, and
.github/instructions/*.instructions.md.
- Improve an existing
AGENTS.mdin place when possible. - Preserve accurate maintainer-authored rules and repository-specific policy.
- Do not replace another tool's instruction file with a symlink unless the user requests it and repository evidence shows identical content is desired.
- Do not silently choose between conflicting instructions. Follow the higher-priority applicable rule, or ask when the intended policy cannot be established from the repository.
2. Build a bounded evidence map
Inspect only enough of the repository to establish how work is actually done:
- Read the project overview and contribution guidance, such as
README*,CONTRIBUTING*, and relevant docs. - Read manifests, lockfiles, workspace files, task runners, and build config to identify supported tools and exact commands.
- Read CI workflows to learn required checks. Do not assume every CI or deployment job is safe or appropriate to run locally.
- Inspect representative source and test files for naming, layout, and test conventions.
- Identify generated files, migrations, vendored code, large fixtures, secrets boundaries, and production-only operations.
Prefer rg --files and rg for discovery when available. Track the source of
each non-obvious command or rule so unsupported claims do not enter the final
file.
3. Choose the instruction scope
Use the root AGENTS.md for repository-wide guidance. Add or revise a nested
AGENTS.md only when a subtree has materially different commands,
architecture, conventions, or safety boundaries.
Keep shared rules at the root and only differences in nested files. For tools that implement the public AGENTS.md convention, apply root/ancestor guidance and narrower subtree instructions according to the target host's precedence. The nearest file does not silently erase unrelated ancestor rules. Do not copy the full root file into every package.
4. Write high-signal guidance
Choose headings that fit the repository instead of forcing a fixed template. Include the following only when supported by evidence:
- Repository map: the few directories and boundaries an agent must know.
- Setup and commands: exact install, development, build, lint, type-check, and test commands, with the working directory when it is not obvious.
- Focused validation: targeted checks for a small change and broader checks required before handoff.
- Change rules: generated-file ownership, migrations, schemas, APIs, dependencies, and cross-package coordination.
- Safety boundaries: secrets, production data, destructive commands, deployments, and operations that require explicit authorization.
- Contribution rules: repository-specific naming, formatting, commit, or pull-request requirements that affect implementation or handoff.
Write direct, testable statements. Prefer:
- From the repository root, run `npm test -- path/to/file.test.ts` for a focused test.
over:
- Make sure tests pass and follow best practices.
…
常见问题
什么是 AGENTS.md?
它是一个包含 AI 智能体具体指令的文件,告诉智能体如何与编程项目互动并对其进行修改。
为什么 AGENTS.md 需要保持更新?
更新后的 AGENTS.md 能确保 AI 智能体遵循项目正确的规则和命令,避免出错和返工。
这个工具会取代程序员的工作吗?
不会。它帮助编写清晰的指令,让 AI 智能体按照项目指南协助程序员工作。
详情
作者的原始描述
Create, revise, or audit AGENTS.md files from repository evidence, verified commands, and correctly scoped instructions without overwriting maintainer intent.
热度
- GitHub 星标
- 48k
- 排名
- #3690
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。