agent-rules

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AGENTS.md Generator Skill

AGENTS.md生成工具Skill

Generate and maintain AGENTS.md files following the agents.md convention. AGENTS.md is FOR AGENTS, not humans.
遵循agents.md规范生成并维护AGENTS.md文件。AGENTS.md是专为AI代理设计的,而非人类。

When to Use

使用场景

  • Creating or updating AGENTS.md for new/existing projects
  • Standardizing agent documentation across repositories
  • Checking if AGENTS.md files are current with recent code changes
  • Onboarding AI agents to an unfamiliar codebase
  • 为新项目或现有项目创建或更新AGENTS.md
  • 跨仓库标准化代理文档
  • 检查AGENTS.md文件是否与最新代码变更同步
  • 让AI代理接入不熟悉的代码库

Scripts

脚本

ScriptPurpose
scripts/generate-agents.sh PATH
Generate AGENTS.md files
scripts/validate-structure.sh PATH
Validate structure compliance
scripts/check-freshness.sh PATH
Check if files are outdated
scripts/verify-content.sh PATH
Verify documented files/commands match codebase
scripts/verify-commands.sh PATH
Verify documented commands execute
scripts/detect-project.sh PATH
Detect language, version, build tools
scripts/detect-scopes.sh PATH
Identify directories needing scoped files
scripts/extract-commands.sh PATH
Extract commands from build configs
scripts/extract-ci-rules.sh PATH
Extract CI quality gates and version matrix
scripts/extract-architecture-rules.sh PATH
Extract module boundaries
scripts/extract-adrs.sh PATH
Extract architectural decision records
scripts/extract-github-rulesets.sh PATH
Extract GitHub rulesets and merge rules
See
references/scripts-guide.md
for full options.
脚本用途
scripts/generate-agents.sh PATH
生成AGENTS.md文件
scripts/validate-structure.sh PATH
验证结构是否符合规范
scripts/check-freshness.sh PATH
检查文件是否过时
scripts/verify-content.sh PATH
验证文档中记录的文件/命令是否与代码库一致
scripts/verify-commands.sh PATH
验证文档中记录的命令可执行
scripts/detect-project.sh PATH
检测项目语言、版本和构建工具
scripts/detect-scopes.sh PATH
识别需要生成范围化文件的目录
scripts/extract-commands.sh PATH
从构建配置中提取命令
scripts/extract-ci-rules.sh PATH
提取CI质量门和版本矩阵
scripts/extract-architecture-rules.sh PATH
提取模块边界
scripts/extract-adrs.sh PATH
提取架构决策记录
scripts/extract-github-rulesets.sh PATH
提取GitHub规则集和合并规则
完整选项请查看
references/scripts-guide.md

Core Principles

核心原则

  • Structured over Prose -- tables parse faster than paragraphs
  • Verified Commands -- commands that don't work waste tokens
  • Pointer Principle -- point to files, don't duplicate content
  • Auto Symlinks -- CLAUDE.md/GEMINI.md symlinks created by default (see
    ai-tool-compatibility.md
    )
  • 优先结构化而非散文式——表格比段落解析速度更快
  • 命令需验证——无法执行的命令会浪费Token
  • 指针原则——指向文件而非重复内容
  • 自动创建符号链接——默认自动创建CLAUDE.md/GEMINI.md符号链接(详见
    ai-tool-compatibility.md

References

参考资料

FileContents
verification-guide.md
Verification steps, design principles
scripts-guide.md
Script options, validation checklist
ai-tool-compatibility.md
16-agent compatibility matrix
output-structure.md
Root/scoped sections
git-hooks-setup.md
Hook framework detection and setup
examples/
Complete examples
文件内容
verification-guide.md
验证步骤、设计原则
scripts-guide.md
脚本选项、验证检查清单
ai-tool-compatibility.md
16种AI代理兼容性矩阵
output-structure.md
根目录/范围化文件章节说明
git-hooks-setup.md
Hook框架检测与设置
examples/
完整示例

Templates

模板

Root:
assets/root-thin.md
(default),
root-verbose.md
. Scoped:
assets/scoped/
--
backend-go.md
,
backend-php.md
,
python-modern.md
,
typo3.md
,
symfony.md
,
skill-repo.md
,
cli.md
,
frontend-typescript.md
,
oro.md
.
根目录模板:
assets/root-thin.md
(默认)、
root-verbose.md
。范围化模板:
assets/scoped/
下的
backend-go.md
backend-php.md
python-modern.md
typo3.md
symfony.md
skill-repo.md
cli.md
frontend-typescript.md
oro.md

Supported Projects

支持的项目类型

Go, PHP (Composer/Laravel/Symfony/TYPO3/Oro), TypeScript (React/Next/Vue/Node), Python (pip/poetry/ruff/mypy), Skill repos, Hybrid (multi-stack with auto-scoping).
Go、PHP(Composer/Laravel/Symfony/TYPO3/Oro)、TypeScript(React/Next/Vue/Node)、Python(pip/poetry/ruff/mypy)、Skill仓库、混合栈项目(支持自动范围划分的多栈项目)。