Guide for creating new Agent Skills with proper structure, frontmatter, bundled assets, and validation. Includes templates, best practices, and examples for building reusable skill resources.
This skill provides comprehensive guidance for creating new Agent Skills in the awesome-copilot repository. Use this when you need to create a self-contained, reusable skill with instructions and optional bundled assets.
Create a skill when you need:
Don't create a skill if:
.prompt.md) would suffice for a one-off task.instructions.md) is more appropriate for coding standardsEvery skill is a folder containing:
skills/
your-skill-name/
SKILL.md # Required: Main skill definition with frontmatter
script.py # Optional: Bundled scripts
template.txt # Optional: Code templates
reference.json # Optional: Reference data
assets/ # Optional: Additional resources
npm run skill:create -- --name your-skill-name --description 'Your skill description here'
This will:
SKILL.md template with valid frontmatterCreate the folder: skills/your-skill-name/
Create SKILL.md with proper frontmatter:
---
name: 'your-skill-name'
description: 'A clear, concise description of what this skill does and when to use it.'
---
# Your Skill Title
[Skill content here]
The SKILL.md file must include markdown frontmatter with these fields:
name'web-testing', 'skill-creation')Example:
name: 'api-testing-toolkit'
descriptionExample:
description: 'Comprehensive toolkit for testing REST APIs with sample requests, response validation, and debugging utilities.'
---
name: 'database-migration'
description: 'Guide for creating and managing database migrations with schema versioning, rollback procedures, and best practices for multiple database systems.'
---
After the frontmatter, structure your SKILL.md with these sections:
Brief overview of what the skill does.
# Database Migration Toolkit
This skill provides comprehensive guidance for creating, managing, and executing database migrations.
Clear criteria for when this skill should be invoked.
## When to Use This Skill
Use this skill when you need to:
- Create new database schema migrations
- Version control database changes
- Rollback problematic migrations
- Migrate between different database systems
List any required tools, dependencies, or setup.
## Prerequisites
- Database access credentials
- Migration tool installed (e.g., Alembic, Flyway, Liquibase)
- Backup of production data before running migrations
Detail what the skill can help accomplish.
## Core Capabilities
### Schema Management
- Create tables, indexes, and constraints
- Alter existing schema structures
- Drop deprecated objects
### Data Migration
- Transform data between schema versions
- Bulk data imports/exports
- Data validation and cleanup
Provide concrete examples with code snippets.
## Usage Examples
### Example 1: Create a Migration File
\`\`\`bash
alembic revision -m "add users table"
\`\`\`
### Example 2: Apply Migration
\`\`\`bash
alembic upgrade head
\`\`\`
Best practices and recommendations.
## Guidelines
1. **Always backup before migrating** - Create backups of production databases
2. **Test migrations locally** - Verify migrations work on development data first
3. **Use transactions** - Wrap migrations in transactions when possible
4. **Document changes** - Include clear comments in migration files
Reusable code patterns and solutions.
## Common Patterns
### Pattern: Reversible Migration
\`\`\`python
def upgrade():
op.add_column('users', sa.Column('email', sa.String(255)))
def downgrade():
op.drop_column('users', 'email')
\`\`\`
Known constraints or edge cases.
## Limitations
- Cannot handle cross-database migrations automatically
- Large data migrations may require manual chunking
- Some database-specific features may not be portable
Skills can include bundled files to support the instructions:
Scripts (.py, .js, .sh, etc.)
Templates (.txt, .md, .json, etc.)
Reference Data (.json, .yaml, .csv, etc.)
Documentation (.md, .pdf, etc.)
skills/api-testing/
SKILL.md
scripts/
test-runner.py
validate-response.js
templates/
request-template.json
test-suite-template.yaml
examples/
sample-api-test.md
reference/
http-status-codes.json
## Using the Test Runner Script
This skill includes a test runner script located at `scripts/test-runner.py`.
To use it:
\`\`\`bash
python scripts/test-runner.py --config config.json
\`\`\`
See `examples/sample-api-test.md` for a complete example.
Run the validation command:
npm run skill:validate
This checks:
name field matches folder namename is lowercase with hyphens (max 64 chars)description is 10-1024 charactersname and descriptionname matches folder name exactlydescription is clear and informative (10-1024 chars)npm run build)mkdir skills/code-review
---
name: 'code-review'
description: 'Automated code review toolkit with checklists, linting rules, and best practice guidelines for multiple programming languages.'
---
# Code Review Toolkit
This skill provides comprehensive code review guidance and automation tools.
## When to Use This Skill
Use this skill when you need to:
- Perform thorough code reviews
- Apply language-specific best practices
- Check for common code smells
- Ensure coding standards compliance
## Prerequisites
- Access to the codebase being reviewed
- Linting tools installed (optional but recommended)
## Core Capabilities
### Review Checklists
- Security vulnerability checks
- Performance optimization opportunities
- Code maintainability assessment
- Documentation completeness
### Automated Analysis
- Static code analysis
- Complexity metrics
- Test coverage evaluation
## Usage Examples
### Example 1: Basic Review
Review a pull request for common issues and suggest improvements.
### Example 2: Security Audit
Focus on security vulnerabilities and potential exploits.
## Guidelines
1. **Be constructive** - Provide actionable feedback
2. **Check context** - Understand the purpose before critiquing
3. **Prioritize issues** - Focus on critical problems first
4. **Suggest solutions** - Don't just point out problems
## Common Patterns
### Pattern: Checklist-Based Review
Use the bundled `checklists/python-review.md` for Python code reviews.
## Limitations
- Automated tools may miss context-specific issues
- Human judgment still required for architecture decisions
Create skills/code-review/checklists/python-review.md:
# Python Code Review Checklist
## Style & Formatting
- [ ] Follows PEP 8 style guide
- [ ] Docstrings present for all public functions
- [ ] Type hints used appropriately
## Functionality
- [ ] Error handling implemented
- [ ] Edge cases covered
- [ ] No code duplication
npm run skill:validate
npm run build
bash scripts/fix-line-endings.sh
❌ "This skill helps with testing" ✅ "This skill provides Playwright-based browser automation for testing web applications with screenshot capture and console log inspection"
Always provide runnable code examples that demonstrate the skill's usage.
List all required tools, dependencies, and setup steps upfront.
Use subdirectories for multiple asset types:
skills/your-skill/
scripts/
templates/
examples/
reference/
Don't just bundle files—explain when and how to use them in SKILL.md.
Before committing:
npm run buildThis repository follows the Agent Skills specification for maximum compatibility.
❌ Forgetting quotes in frontmatter
name: skill-name # Wrong
name: 'skill-name' # Correct
❌ Mismatched folder and name
skills/web-testing/
SKILL.md with name: 'webapp-testing' # Wrong
❌ Description too short
description: 'Testing tool' # Only 12 chars, needs 10+ but should be descriptive
❌ Uppercase in folder name
skills/WebTesting/ # Wrong
skills/web-testing/ # Correct
❌ Not referencing bundled assets
Including script.py but never mentioning it in SKILL.md.
❌ Skipping validation
Not running npm run skill:validate before committing.
npm run skill:create or create manuallynpm run skill:validatenpm run build to update READMEbash scripts/fix-line-endings.shThis skill itself follows all the guidelines it recommends. It demonstrates:
name and descriptionUse this as a reference template when creating your own skills.