skill-creation-guide
Guide for creating Agent Skills: structure, best practices, and SKILL.md format for Claude Code, Codex, Gemini CLI, and other AI agents.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Skill Creation Guide
Scope
Use this skill when:
- Creating new Agent Skills
- Understanding SKILL.md format and conventions
- Learning best practices for skill authoring
Skill Structure
skill-name/
├── SKILL.md # Required: Instructions and metadata
├── scripts/ # Optional: Helper scripts
├── templates/ # Optional: Document templates
└── resources/ # Optional: Reference files
SKILL.md Format
Required Frontmatter
---
name: my-skill-name
description: A clear description of what this skill does and when to use it.
---
Body Structure
# Skill Name
Detailed description of the skill's purpose.
## When to Use This Skill
- Use case 1
- Use case 2
## Instructions
[Detailed instructions for the agent]
## Examples
[Real-world examples]
Best Practices
- Keep descriptions exhaustive: The frontmatter description helps agents decide when to trigger the skill.
- Focus on execution: The body should contain clear, actionable steps.
-
Use progressive disclosure: Put detailed references in
references/folder. - Include scripts for automation: Use helper scripts for deterministic operations.
- Keep SKILL.md under 500 lines: For optimal performance.
- Test across platforms: Verify skills work with Claude Code, Codex, etc.
Token Efficiency
Skills employ progressive disclosure architecture:
- Metadata loading (~100 tokens): Agent scans available skills
- Full instructions (<5k tokens): Load when skill is activated
- Bundled resources: Only load as needed
Platform-Specific Paths
| Platform | Project Path | Global Path |
|---|---|---|
| Claude Code | .claude/skills/ |
~/.claude/skills/ |
| Codex | .codex/skills/ |
~/.codex/skills/ |
| Cursor | .cursor/skills/ |
~/.cursor/skills/ |
| Gemini CLI | .gemini/skills/ |
~/.gemini/skills/ |
| GitHub Copilot | .github/skills/ |
~/.copilot/skills/ |
Quality Checklist
- Clear, actionable instructions
- Includes real-world examples
- Written for AI agents, not end users
- Documents prerequisites and dependencies
- Includes error handling guidance
- Tested on target platform(s)
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-02-02
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!