| name | agents |
| description | Creates and manages AGENTS.md files for AI agent integration. Use when the user asks to "에이전트해줘", "create agents", "AGENTS.md 만들어줘", "agents.md 업데이트", "agents 파일 검증", or needs to set up project guidance for AI agents. |
| allowed-tools | Read, Write, Edit, Bash(git status:*), Bash(git diff:*), Bash(test:*) |
| version | 1.0.0 |
AGENTS.md Management Skill
This skill creates and manages AGENTS.md files for universal AI agent integration.
Source of Truth
- AGENTS.md Spec: agents.md
- Guidelines: `documentation.md`, `project-integration.md`
When to Activate
This skill activates in these scenarios:
- Create request: "에이전트해줘", "create agents", "AGENTS.md 만들어줘"
- Update request: "agents.md 업데이트", "Build Commands 섹션 수정"
- Regenerate request: "AGENTS.md 다시 만들어줘", "reset agents.md"
- Validate request: "AGENTS.md 검증", "agents 파일 확인"
- Context-based: User asks about agent configuration for the project
AGENTS.md Principles
- Universal format: Works for all AI agents (Copilot, Cursor, Aider, Claude, etc.)
- Project-specific: Contains project context, not generic standards
- Flexible structure: No required fields, adapt to project needs
- Hierarchical support: Root file + subdirectory overrides (monorepo)
- Complementary to AGENTS.md: Reference Claude-specific standards via link
Instructions
Feature 1: Create New AGENTS.md
When: User requests new AGENTS.md file and none exists
Steps:
Check for existing file:
- Use
test -f <project_root>/AGENTS.mdto check existence - If exists: Ask user to choose update (Feature 2) or regenerate (Feature 3)
- Use
Detect project characteristics:
- Check for dotrc indicators:
zshrc,zshenv,starship.toml,claude/directory - For dotrc: Use dotrc-specific template (shell configs, tool settings, symlinks)
- For other projects: Read README.md, package.json, or similar to identify type
- Check for
claude/AGENTS.mdto determine if Claude-specific section should be included
- Check for dotrc indicators:
Generate template content:
- Create comprehensive template with essential sections:
- Project Overview (type, languages, platform, purpose)
- Repository Structure (directory tree, key files)
- Build & Test Commands (setup, validation)
- Development Environment (required tools, installation)
- Code Style & Conventions (language-specific guidelines)
- Git Workflow (commit format, types, examples)
- Testing Changes (pre-commit checks, safe testing)
- Common Tasks (frequent operations, examples)
- Security Considerations (secrets, sensitive files)
- Troubleshooting (common issues, diagnostics)
- If
claude/AGENTS.mdexists: Add section with link:> **For Claude Code users**: See [AGENTS.md](./claude/AGENTS.md) for Claude-specific guidelines. - Include footer: Last Updated, Maintainer, AI Agent Compatibility
- Create comprehensive template with essential sections:
Create file:
- Write to
<project_root>/AGENTS.mdusing Write tool - Confirm completion with file path and section summary
- Write to
Output Format (Korean):
## AGENTS.md 생성 완료 ✅
**위치**: `<absolute-path>/AGENTS.md`
**포함된 섹션** (<N>개):
- Project Overview
- Repository Structure
- Build & Test Commands
- ...
**다음 단계**:
- 파일을 검토하고 프로젝트에 맞게 조정
- 커밋: "커밋해줘"
Feature 2: Update Specific Section
When: User requests update to a specific section in existing AGENTS.md
Steps:
Read existing file:
- Use Read tool to load
<project_root>/AGENTS.md - If file doesn't exist: Suggest Feature 1 (Create)
- Use Read tool to load
Identify target section:
- Parse user request for section name (e.g., "Build Commands", "Code Style")
- Find section using markdown heading pattern:
## {section_name} - If section not found: Ask user if they want to add new section
Update section content:
- Extract section boundaries (from
## Sectionto next##or EOF) - Preserve all other sections unchanged
- Use Edit tool with precise string matching for the target section
- Extract section boundaries (from
Verify changes:
- Show before/after preview
- Suggest running
git diff AGENTS.mdfor full review
Output Format (Korean):
## 섹션 업데이트 완료 ✅
**수정된 섹션**: <Section Name>
**전체 diff 확인**:
\```bash
git diff AGENTS.md
\```
Feature 3: Full Regenerate with Backup
When: User requests complete regeneration of AGENTS.md
Steps:
Create backup:
- Generate timestamp:
$(date +%Y%m%d-%H%M%S) - Create backup:
cp AGENTS.md AGENTS.md.backup.<timestamp> - If file doesn't exist: Forward to Feature 1 (Create)
- Generate timestamp:
Generate new template:
- Follow Feature 1 steps (detect project, create content)
- Optionally preserve user-added custom sections
Confirm before replacing:
- Show backup location
- Ask user: "기존 파일을 백업했습니다. 새 템플릿으로 교체하시겠습니까?"
Replace file:
- Write new content using Write tool
- Confirm completion with backup path
Output Format (Korean):
## AGENTS.md 재생성 완료 ✅
**백업 위치**: `<path>/AGENTS.md.backup.<timestamp>`
**새 파일 생성**: `<path>/AGENTS.md`
**변경사항**:
- ✅ 최신 템플릿 구조 적용
- ✅ 프로젝트 특성 재분석
- ⚠️ 이전 커스텀 내용은 백업 파일에서 확인 가능
**백업과 비교**:
\```bash
diff <backup-file> AGENTS.md
\```
Feature 4: Validate AGENTS.md
When: User requests validation of existing AGENTS.md
Steps:
Check file existence:
- Use
test -f <project_root>/AGENTS.md - If not found: Suggest Feature 1 (Create)
- Use
Read and analyze:
- Parse markdown structure (count headings, check hierarchy)
- Identify all sections (scan for
##patterns) - Verify AGENTS.md link if present (check file exists at path)
Quality checks:
- Structure: Valid markdown, proper H1 → H2 → H3 hierarchy
- Completeness: Has essential sections for project type (Overview, Build Commands, etc.)
- Clarity: Sections have meaningful content (not just placeholders or "TODO")
- Specificity: Contains project-specific information (not generic template text)
Generate report:
- List found sections with status (✅ complete, ⚠️ needs improvement, ❌ missing)
- Identify missing recommended sections
- Suggest improvements
- Assign quality score: 10/10 (Excellent), 7-9/10 (Good), 4-6/10 (Needs work), 1-3/10 (Incomplete)
Output Format (Korean):
## AGENTS.md 검증 결과
**품질 점수**: <X>/10 (<Rating>)
### ✅ 구조
- 유효한 Markdown 형식
- 적절한 헤딩 계층 구조
- <N>개 섹션 발견
### 📋 발견된 섹션
- ✅ Project Overview
- ✅ Build & Test Commands
- ⚠️ Security Guidelines (내용 부족)
- ...
### 💡 개선 제안
<Specific recommendations>
**다음 단계**: 특정 섹션 업데이트는 "Security 섹션 업데이트" 요청
Template Sections Reference
When creating AGENTS.md, include these essential sections:
- Project Overview: Type, languages, platform, purpose
- Repository Structure: Directory layout, key files
- Build & Test Commands: Setup, validation, testing
- Development Environment: Required/optional tools, installation
- Code Style & Conventions: Language-specific guidelines, formatting
- Git Workflow: Commit format (reference AGENTS.md if exists), types, examples
- Testing Changes: Pre-commit checks, safe testing procedures
- Common Tasks: Frequent operations with examples
- Security Considerations: Secrets handling, sensitive file locations
- Troubleshooting: Common issues, diagnostic commands
- Related Resources: External documentation links
For dotrc projects, add specific sections:
- File Linking Strategy (symlink approach, environment variables)
- Aliases & Functions (standard aliases, modification guidelines)
- Environment Variables (core variables, adding new ones)
Response Language
- User communication: Korean (한국어)
- File content (AGENTS.md): English (for universal AI agent compatibility)
- Section headers in AGENTS.md: English
- Code examples: English (comments, variable names)
See Also
- documentation.md - Documentation standards
- project-integration.md - Codebase learning guidelines
- version-control.md - For Git workflow section in AGENTS.md