| name | skill-writer |
|---|---|
| description | A meta-skill for managing Agent Skills. Use when creating, editing, modifying, updating, deleting, or refactoring skills. Also triggers for SKILL.md files, ~/.copilot/skills/ directory, .github/skills/ folder, skill frontmatter, skill instructions, skill templates, or any file changes in a skills directory. Ensures all changes are committed and pushed to git. |
This skill helps you create well-structured Agent Skills for GitHub Copilot, VS Code, Copilot CLI, and the Copilot coding agent.
- Creating a new Agent Skill from scratch
- Converting existing documentation or workflows into a skill
- Improving or refactoring an existing skill
- Understanding the Agent Skills standard
⚠️ NEVER include secrets, tokens, API keys, passwords, or any sensitive credentials in skills.
Skills are stored in git repositories and may be shared publicly. Treat all skill content as public information.
Prohibited content:
- API keys or tokens (GitHub, Azure, AWS, etc.)
- Passwords or credentials
- Connection strings with embedded secrets
- Private URLs with authentication tokens
- Personal access tokens (PATs)
- Service account credentials
Safe alternatives:
- Reference environment variables:
Use $GITHUB_TOKEN from your environment - Use placeholder syntax:
<YOUR_API_KEY>or${API_KEY} - Document where to securely store credentials (e.g.,
.envfiles, secret managers) - Use MCP servers for secure API integrations
Each skill should follow this structure:
.github/skills/
└── your-skill-name/
├── SKILL.md # Required: Main skill definition
├── scripts/ # Optional: Helper scripts
│ └── example.sh
├── examples/ # Optional: Example files
│ └── sample.md
└── templates/ # Optional: Templates for output
└── template.md
| Scope | Location | Use When |
|---|---|---|
| Personal (global) | ~/.copilot/skills/ |
Skills you want available across ALL projects |
| Project-specific | .github/skills/ |
Skills specific to one repository |
Important: Personal skills at
~/.copilot/skills/are version controlled in a git repository. After creating or modifying any skill, always commit and push changes to keep them backed up and synced.
Legacy locations (for backward compatibility):
.claude/skills/(project)~/.claude/skills/(personal)
Every SKILL.md must start with YAML frontmatter:
---
name: your-skill-name
description: A clear description of what this skill does and when to use it.
---| Field | Required | Rules |
|---|---|---|
name |
Yes | Lowercase, hyphens for spaces, max 64 characters |
description |
Yes | What it does AND when to use it, max 1024 characters |
Good name examples:
webapp-testingapi-documentationdatabase-migration
Bad name examples:
WebApp Testing(no uppercase or spaces)my_skill(use hyphens, not underscores)test(too vague)
After the frontmatter, write clear markdown instructions covering:
- Purpose - What this skill accomplishes
- When to Use - Specific triggers and use cases
- Step-by-Step Procedures - Detailed workflows
- Examples - Input/output samples
- Resource References - Links to included files
❌ Bad: "Help with testing"
✅ Good: "When the user asks to create tests for a React component, generate Jest test files that cover: rendering, user interactions, edge cases, and accessibility."
## Prerequisites
- Node.js 18+
- Jest installed
## Step-by-Step Process
1. Analyze the component props
2. Create test file with naming convention: `ComponentName.test.tsx`
3. Write test cases for each prop variation## Example
**User Request**: "Create tests for the Button component"
**Expected Output**:
- File: `Button.test.tsx`
- Coverage: onClick handler, disabled state, loading stateSee the [test template](./templates/test-template.js) for the base structure.
Run the [setup script](./scripts/setup.sh) before testing.The description field is critical - it determines when Copilot loads your skill.
description: Generates comprehensive API documentation from TypeScript interfaces. Use when documenting REST APIs, creating OpenAPI specs, or generating client SDK documentation.Include terms users might say:
- Action verbs: "create", "generate", "debug", "test", "deploy"
- Domain terms: "React", "database", "CI/CD", "authentication"
- Task types: "migration", "refactoring", "optimization"
Use this template to create new skills:
---
name: your-skill-name
description: [What it does]. Use when [specific scenarios where this skill applies].
---
# [Skill Title]
Brief overview of what this skill helps accomplish.
## When to Use This Skill
- Scenario 1
- Scenario 2
- Scenario 3
## Prerequisites
- Requirement 1
- Requirement 2
## Step-by-Step Process
### Step 1: [First Step]
Detailed instructions...
### Step 2: [Second Step]
Detailed instructions...
## Examples
### Example 1: [Scenario Name]
**Input**: Description of what the user provides
**Output**: Description of what the skill produces
## Resources
- [Resource Name](./path/to/resource.ext) - Description
- [Another Resource](./path/to/another.ext) - Description
## Best Practices
- Best practice 1
- Best practice 2
## Common Issues
### Issue 1
**Problem**: Description
**Solution**: How to fix itSkills use three-level loading for efficiency:
- Level 1 (Always loaded): Only
nameanddescriptionfrom frontmatter - Level 2 (On match): Full
SKILL.mdbody when description matches user request - Level 3 (On demand): Additional files only when referenced
- Keep frontmatter description comprehensive but under 1024 characters
- Put most critical instructions at the top of the body
- Use separate files for large code examples or templates
- Reference files with relative paths:
[script](./scripts/run.sh)
Before publishing your skill, verify:
-
nameis lowercase with hyphens, max 64 chars -
descriptionexplains WHAT and WHEN, max 1024 chars - Instructions are clear and actionable
- Examples demonstrate expected input/output
- All referenced files exist in the skill directory
- Relative paths are correct
- SECURITY: No secrets, tokens, API keys, passwords, or credentials (use environment variable references or placeholders instead)
- Tested with actual prompts that should trigger it
Here's a complete example of creating a skill:
.github/skills/code-review/
├── SKILL.md
├── checklists/
│ ├── security.md
│ └── performance.md
└── templates/
└── review-comment.md
---
name: code-review
description: Performs thorough code reviews with security, performance, and maintainability checks. Use when reviewing pull requests, auditing code quality, or preparing code for production.
---
# Code Review Skill
Guides comprehensive code review following industry best practices.
## When to Use
- Reviewing a pull request
- Auditing existing code
- Pre-merge quality checks
## Review Process
### 1. Security Review
Check the [security checklist](./checklists/security.md) for:
- Input validation
- Authentication/Authorization
- Data sanitization
### 2. Performance Review
Check the [performance checklist](./checklists/performance.md) for:
- N+1 queries
- Memory leaks
- Unnecessary re-renders
### 3. Generate Feedback
Use the [review template](./templates/review-comment.md) to structure feedback.After creating a skill in ~/.copilot/skills/, VS Code automatically discovers it. To verify:
- Check skill is recognized: Right-click in the Chat view and select Diagnostics to see all loaded skills
- Test activation: Ask Copilot something that matches your skill's description
- Troubleshoot: If the skill isn't loading:
- Verify the SKILL.md has valid YAML frontmatter
- Check that
nameanddescriptionfields are present - Ensure the description clearly describes when to use the skill
Note: You can add additional skill locations using the
chat.agentSkillsLocationssetting if you want skills stored elsewhere.For example, to include both personal skills and runtime skills from dotnet/runtime:
"chat.agentSkillsLocations": [ "~/.copilot/skills", "~/.copilot/skills/runtime-skills" ]
After creating or modifying ANY skill in ~/.copilot/skills/, the agent MUST:
- Check git status in
~/.copilot/skills/ - Stage changes:
git add . - Commit with a descriptive message:
git commit -m "Add/Update {skill-name} skill" - Push to remote:
git push
If no remote is configured, prompt the user to set one up:
git remote add origin https://github.com/{username}/copilot-skills.git
git push -u origin master
⚠️ Do not skip this step. Always verify changes are committed and pushed before completing the skill creation task.