用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill agents-md命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | agents-md |
| description | > Use when this capability is needed. |
AGENTS.md is the README for AI coding agents — it gives tools like GitHub Copilot, Cursor,
and Claude Code the context they need to produce code that fits your project, without
constant back-and-forth correction.
This is the most important principle. Before adding any line, ask: "Could an agent figure this out by reading the code or config files?"
If yes — skip it. Agents can read package.json, pyproject.toml, *.csproj, directory
structures, imports, and existing code. AGENTS.md is for the things that aren't visible there:
Redundant content actively degrades quality — it wastes the agent's context window and dilutes real signal with noise it already has.
AGENTS.md (repo root)Covers the whole project: stack, layout, cross-cutting rules, major patterns, and a doc index.
Aim for ≤ 150 lines. Link to existing guides rather than duplicating them.
Include a short maintenance note telling agents to update related AGENTS.md files and
relevant SKILL.md files when a new non-obvious pattern is introduced or existing guidance is
stale, but to ask the user for permission before editing those guidance files.
AGENTS.md (subdirectory)Scoped to one module, package, or concern (e.g., src/Api/, tests/).
Create one when:
Don't create a component AGENTS.md just for completeness. An empty or trivially short file adds nothing — it just adds noise to the file tree.
# <Project Name> — Agent Instructions
## Quick Reference
- **Stack**: List of key technologies
- **Solution/Entry point**: Main file or solution
- **Common commands**: `build`, `test`, `run`, `format` — exact, copy-paste ready
- **Docs**: Links to key guides
## Repository Map
Folder → one-line purpose. Skip folders whose purpose is obvious from the name.
## Major Patterns
Bullet list of architectural decisions agents must know:
- Why a pattern is used (not just that it's used)
- Any non-obvious integration approaches
## Code Rules (MUST follow)
✅/❌ table — see format below.
## Common Mistakes
Concrete anti-patterns agents get wrong in this codebase. Not generic advice.
## Quick Troubleshooting
"Symptom → fix" pairs for problems agents are likely to hit.
# <Component Name> — Agent Instructions
## Quick Reference
- **Scope**: `path/to/component/**`
- **Stack**: Techs specific to this component (only if different from root)
- **Commands**: Commands specific to this component
## Key Rules (MUST follow)
✅/❌ table — see format below.
## Common Mistakes
What agents get wrong specifically inside this component.
## Project Layout
Table: path → purpose. Skip obvious paths.
## Quick Troubleshooting
Symptom → fix pairs.
## Documentation Index
Table: topic → guide path. Don't repeat links from root AGENTS.md unless critical.
Rules work best as a short code block with ✅ for the right pattern and ❌ for the wrong one, side-by-side. This format is instantly scannable and makes the do/don't unambiguous:
✅ Guid.CreateVersion7() ❌ Guid.NewGuid()
✅ DateTimeOffset.UtcNow ❌ DateTime.Now
✅ record EventPastTense(...) ❌ record VerbCommand(...)
✅ [LoggerMessage(...)] ❌ _logger.LogInformation(...)
Rules that belong here:
Rules to skip:
Run every candidate line through this filter before including it:
| Question | If YES | If NO |
|---|---|---|
| Would an agent deduce this from reading the files? | Skip | Include |
| Does a linter or analyzer already enforce this? | Skip | Include |
| Is this generic advice true of any codebase? | Skip | Include |
| Would an agent without this make a real mistake here? | Include | Skip |
| Is this specific to this codebase's conventions? | Include | Skip |
Don't duplicate content from README, wikis, or existing docs. Link to them:
## Documentation Index
| Topic | Guide |
|-------|-------|
| Architecture | `docs/architecture.md` |
| Testing patterns | `docs/guides/testing-guide.md` |
This keeps AGENTS.md focused and avoids stale duplication. If two files say the same thing and one gets updated, they immediately diverge.
Update AGENTS.md in the same PR as the change it documents. If tests now require a
specific flag, a linter is added, or a pattern changes — the AGENTS.md update belongs in
that diff. If the change also makes a scoped AGENTS.md or a related SKILL.md stale,
update those guidance files too. Ask the user for permission before editing any guidance file.
Reviewers should check AGENTS.md freshness as part of code review.
Source: aalmada/BookStore — distributed by TomeVault.