create-agentsmd
它能做什么
这个智能体会为你的项目创建一个名为 AGENTS.md 的文件。这个文件相当于一份详细的指南,供其他 AI 智能体阅读,说明项目如何运作、如何搭建环境、如何测试,以及其他重要的技术信息。
适用场景
- ✓当你需要为 AI 智能体记录项目的技术说明时。
- ✓当你开始一个新项目,并希望为今后的 AI 协作提供清晰指引时。
- ✓当你想把专门面向 AI 工具的开发信息整理并集中在一起时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/create-agentsmd/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为这个项目创建一个 AGENTS.md 文件,包括如何安装依赖、如何运行开发服务器,以及如何执行测试。”
每周 5 个新技能,1 分钟读完。
工作原理
它会分析项目的信息,比如 package.json 中的脚本和使用的工具,生成一个结构清晰的 Markdown 文件。文件中包含“项目概述”“环境配置命令”“开发流程”等章节。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create high‑quality AGENTS.md file
You are a code agent. Your task is to create a complete, accurate AGENTS.md at the root of this repository that follows the public guidance at https://agents.md/.
AGENTS.md is an open format designed to provide coding agents with the context and instructions they need to work effectively on a project.
What is AGENTS.md?
AGENTS.md is a Markdown file that serves as a "README for agents" - a dedicated, predictable place to provide context and instructions to help AI coding agents work on your project. It complements README.md by containing detailed technical context that coding agents need but might clutter a human-focused README.
Key Principles
- Agent-focused: Contains detailed technical instructions for automated tools
- Complements README.md: Doesn't replace human documentation but adds agent-specific context
- Standardized location: Placed at repository root (or subproject roots for monorepos)
- Open format: Uses standard Markdown with flexible structure
- Ecosystem compatibility: Works across 20+ different AI coding tools and agents
File Structure and Content Guidelines
1. Required Setup
- Create the file as
AGENTS.mdin the repository root - Use standard Markdown formatting
- No required fields - flexible structure based on project needs
2. Essential Sections to Include
Project Overview
- Brief description of what the project does
- Architecture overview if complex
- Key technologies and frameworks used
Setup Commands
- Installation instructions
- Environment setup steps
- Dependency management commands
- Database setup if applicable
Development Workflow
- How to start development server
- Build commands
- Watch/hot-reload setup
- Package manager specifics (npm, pnpm, yarn, etc.)
Testing Instructions
- How to run tests (unit, integration, e2e)
- Test file locations and naming conventions
- Coverage requirements
- Specific test patterns or frameworks used
- How to run subset of tests or focus on specific areas
Code Style Guidelines
- Language-specific conventions
- Linting and formatting rules
- File organization patterns
- Naming conventions
- Import/export patterns
Build and Deployment
- Build commands and outputs
- Environment configurations
- Deployment steps and requirements
- CI/CD pipeline information
3. Optional but Recommended Sections
Security Considerations
- Security testing requirements
- Secrets management
- Authentication patterns
- Permission models
Monorepo Instructions (if applicable)
- How to work with multiple packages
- Cross-package dependencies
- Selective building/testing
- Package-specific commands
Pull Request Guidelines
- Title format requirements
- Required checks before submission
- Review process
- Commit message conventions
Debugging and Troubleshooting
- Common issues and solutions
- Logging patterns
- Debug configuration
- Performance considerations
Example Template
Use this as a starting template and customize based on the specific project:
# AGENTS.md
## Project Overview
[Brief description of the project, its purpose, and key technologies]
## Setup Commands
- Install dependencies: `[package manager] install`
- Start development server: `[command]`
- Build for production: `[command]`
## Development Workflow
- [Development server startup instructions]
- [Hot reload/watch mode information]
- [Environment variable setup]
## Testing Instructions
- Run all tests: `[command]`
- Run unit tests: `[command]`
- Run integration tests: `[command]`
- Test coverage: `[command]`
- [Specific testing patterns or requirements]
## Code Style
- [Language and framework conventions]
- [Linting rules and commands]
- [Formatting requirements]
- [File organization patterns]
## Build and Deployment
- [Build process details]
- [Output directories]
- [Environment-specific builds]
- [Deployment commands]
## Pull Request Guidelines
- Title format: [component] Brief description
- Required checks: `[lint command]`, `[test command]`
- [Review requirements]
## Additional Notes
- [Any project-specific context]
- [Common gotchas or troubleshooting tips]
- [Performance considerations]
Working Example from agents.md
Here's a real example from the agents.md website:
# Sample AGENTS.md file
## Dev environment tips
…
常见问题
什么是 AGENTS.md 文件?
它是一个 Markdown 文档文件,包含供 AI 智能体在项目上工作所需的详细技术说明。你可以把它理解为给编程机器人看的“使用手册”。
为什么要用 AGENTS.md,而不是普通的 README.md?
README.md 通常是写给人看的。AGENTS.md 则专注于提供 AI 智能体理解和修改代码所需的具体技术细节,避免让面向人的文档变得臃肿。
我需要填写所有建议的章节吗?
不需要,你可以根据项目需要调整这个文件。关键是包含必要的信息,让 AI 智能体能够有效地工作。
详情
热度
- GitHub 星标
- 40k
- 排名
- #7133
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。