agents-md

GitHub

生成或更新项目及各子文件夹的AGENTS.md文件,确保文档准确反映代码现状。遵循渐进式披露、模块化等原则,优化Agent性能与Token效率,包含工作流、决策表及代码示例。

.agents/skills/agents-md/SKILL.md agent-substrate/substrate

Trigger Scenarios

需要创建或更新项目级AGENTS.md 需要为特定子目录生成上下文特定的AGENTS.md

Install

npx skills add agent-substrate/substrate --skill agents-md -g -y
More Options

Non-standard path

npx skills add https://github.com/agent-substrate/substrate/tree/main/.agents/skills/agents-md -g -y

Use without installing

npx skills use agent-substrate/substrate@agents-md

指定 Agent (Claude Code)

npx skills add agent-substrate/substrate --skill agents-md -a claude-code -g -y

安装 repo 全部 skill

npx skills add agent-substrate/substrate --all -g -y

预览 repo 内 skill

npx skills add agent-substrate/substrate --list

SKILL.md

Frontmatter
{
    "name": "agents-md",
    "description": "Generates or updates an AGENTS.md file"
}

Generate or update AGENTS.md files in key folders of the project. Ensure the target AGENTS.md file accurately reflects the current status of the code.

Key Requirements

There must always be an AGENTS.md file in the project root. The AGENTS.md file at the root of the project may include the following sections:

  • Project overview
  • Build and test commands
  • Code style guidelines
  • Testing instructions
  • Security considerations

AGENTS.md files in subfolders may be even more concise and specific to those subfolders.

Maximize AGENTS.md Performance

To maximize agent performance and token efficiency, adhere to the following:

Progressive Disclosure

Each AGENTS.md should be short. Approx. 100-150 lines total. Link to a handful of relevant, focused reference documents in the same repo, as needed.

Modularity

While only one AGENTS.md is allowed per folder, you can create an AGENTS.md file in any folder. Rather than putting everything in the root AGENTS.md, move highly specific advice to AGENTS.md in the most relevant folders of the project.

References

When documentation that would have helped you is missing, add references in the docs/ folder found at the project root. When these get out of date, update them.

Workflows

When references describe workflows, the tasks should be described as numbered steps. For example:

  1. Get the beep from the boop.
  2. Then bop it.

Decisions

When there are multiple ways of doing something in the codebase, use a decision table like the following:

Question Boop Bop
Is foo a bar baz? ✅
Is foo a quux? ✅

Real Code Examples

If you think they are particularly good examples, include snippets from actual code in the repo, up to approx. 10 lines in length. These should only be the most relevant examples and representative of patterns that would be good to repeat in future code. Their purpose is to improve code reuse by agents, rather than each agent reinventing the wheel.

Domain Specific Rules

If you think it would help, you can include a few simple domain specific rules. Not too many, or agents will get stuck trying to handle too many rules. A general example of a domain specific rule is "Use a finance-specific numeric type for any financial calculations."

Don't vs. Do

When adding warnings against doing something, also make a concrete suggestion for the correct approach. "Don't do X, do Y instead."

Version History

  • 7319f1a Current 2026-11-27 19:01

Same Skill Collection

.agents/skills/actor-lifecycle-triage/SKILL.md
.agents/skills/detect-flaky-tests/SKILL.md
.agents/skills/post-draft-review/SKILL.md
.agents/skills/review-crds/SKILL.md
.agents/skills/security-status-report/SKILL.md
.agents/skills/triage-issues/SKILL.md
.agents/skills/troubleshoot/SKILL.md

Metadata

Files
0
Version
7319f1a
Hash
b9effdec
Indexed
2026-11-27 19:01

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-27 19:27
浙ICP备14020137号-1