Create Agent Skill
Purpose
Assist in creating new Agent Skills that follow the Agent Skills open standard specification and VS Code conventions.
When to Use
Use this skill when:
- •Creating a new Agent Skill for the repository
- •Need guidance on Agent Skills structure and format
- •Updating or refactoring existing skills
Agent Skills Structure
Directory Layout
code
.github/skills/{skill-name}/SKILL.md
Requirements:
- •Skills must be in
.github/skills/directory - •Each skill gets its own subdirectory with a descriptive kebab-case name
- •Skill content must be in a file named
SKILL.md(all caps)
File Format
YAML Frontmatter (required):
yaml
--- name: Human-Readable Skill Name description: Brief one-line description of what the skill does ---
Markdown Content:
- •Clear heading with skill name
- •Purpose/overview section
- •When to use this skill
- •Step-by-step instructions
- •Examples and code blocks
- •Success criteria
- •Related resources
Content Guidelines
Writing Style
- •Clear and actionable: Each instruction should be unambiguous
- •Command-focused: Include actual commands that can be run
- •Context-aware: Explain when and why to use each step
- •Complete: Don't assume prior knowledge
Structure Best Practices
- •Purpose: One sentence explaining what the skill does
- •When to Use: Specific triggers or scenarios
- •Prerequisites: What needs to be in place first (if any)
- •Steps: Numbered or sectioned workflow
- •Expected Results: What success looks like
- •Troubleshooting: Common issues and solutions
- •Quick Reference: Copy-paste friendly commands
Code Blocks
- •Use proper syntax highlighting (
bash,python, etc.) - •Include expected output when helpful
- •Provide full commands, not fragments
- •Add comments for complex operations
Example Structure
markdown
--- name: My Skill Name description: What this skill accomplishes in one line --- # My Skill Name ## Purpose Brief explanation of what this skill does and why it exists. ## When to Use - Scenario 1 - Scenario 2 - Scenario 3 ## Prerequisites - Requirement 1 - Requirement 2 ## Steps ### 1. First Action \```bash command --with-flags \``` **Expected Result**: What should happen ### 2. Second Action \```bash another-command \``` **Expected Result**: What should happen ## Success Criteria - ✅ Criterion 1 - ✅ Criterion 2 ## Troubleshooting **Issue**: Common problem **Solution**: How to fix it ## Quick Reference \```bash # All commands in sequence command1 && command2 && command3 \```
Validation Checklist
Before committing a new skill, verify:
- • Located in
.github/skills/{skill-name}/SKILL.md - • Has YAML frontmatter with
nameanddescription - • Name is clear and descriptive
- • Description is concise (one line)
- • Purpose section explains the "why"
- • "When to Use" section lists specific scenarios
- • Instructions are step-by-step and actionable
- • Code blocks have proper syntax highlighting
- • Success criteria are explicit
- • No typos or formatting issues
- • Skill is focused on one clear task
References
Quick Start Template
bash
# Create new skill directory
mkdir -p .github/skills/{skill-name}
# Create SKILL.md with frontmatter
cat > .github/skills/{skill-name}/SKILL.md << 'EOF'
---
name: Skill Name
description: One-line description
---
# Skill Name
## Purpose
[What this skill does]
## When to Use
- [Scenario 1]
- [Scenario 2]
## Steps
### 1. [First Action]
\```bash
[command]
\```
### 2. [Second Action]
\```bash
[command]
\```
## Success Criteria
- ✅ [Criterion 1]
- ✅ [Criterion 2]
EOF
Post-Creation
After creating a skill:
- •Test the instructions manually to verify accuracy
- •Review frontmatter formatting
- •Commit with message:
docs: add {skill-name} agent skill - •Skills are automatically discovered by GitHub Copilot - no registration needed