Why Teach Copilot New Skills?
The Power of Specialized Instructions
Want Copilot to do more than just autocomplete?
If youโre ready to teach Copilot some new tricks, Agent Skills are your answer. Built on the agentskills.io open standard, a skill is a specialized folder of instructions and tools that Copilot only opens when itโs actually relevant to what youโre working on. Itโs like having a smart assistant who knows exactly which reference book to grab off the shelf instead of dumping your entire library on the desk every time.
Smart Context Loading
Hereโs the thing: loading everything at once would slow Copilot down and clutter its โbrainโ with stuff it doesnโt need right now. Agent Skills use progressive disclosure to load targeted context only when it matters. You get faster responses that actually make sense for what youโre doing.
The Problem: Generic AI Responses
One-Size-Fits-All Limitations
Whatโs the issue?
Letโs be honest: out of the box, Copilot is helpful but pretty generic. It doesnโt know about your teamโs specific workflows, your projectโs naming conventions, or those specialized tasks you run every week. So you find yourself typing the same explanations over and over, like youโre training a goldfish.
Context Overload
When you try to explain everything upfront, two problems pop up. First, it slows everything down. Second, Copilotโs responses get muddy because itโs trying to juggle too much information at once.
Repetitive Instructions
Without skills, every new coding session feels like Groundhog Day. Youโre constantly re-explaining project-specific patterns, and it gets old fast.
The Solution: Repository-Based Agent Skills
Understanding Agent Skills
Hereโs how to fix it
Agent Skills are specialized folders sitting in your repo (or user profile). They contain instructions, scripts, and tools that Copilot can tap into when needed. This approach is portable and works across multiple agents, including GitHub Copilot in VS Code, the CLI, and the coding agent.
The 3-Level Loading System (Progressive Disclosure)
To keep things efficient, Agent Skills use a three-level loading system:
- Level 1: Skill Discovery (Always On): Copilot reads the
nameanddescriptionfrom the YAML frontmatter of every availableSKILL.md. This is lightweight and helps it decide if a skill is relevant. - Level 2: Instructions Loading: When a skill matches your prompt, Copilot loads the full body of the
SKILL.mdfile. - Level 3: Resource Access: Copilot only accesses additional files (scripts, templates, examples) in the skill directory as needed.
Persistent Knowledge
Once youโve set up your skills, they live right there in your repository. That means everyone on your team gets access to the same knowledge base through the .github/skills directory.
Setting Up Your First Skill
Step 1: Create the Skills Directory
Quick setup steps
First, you need to pick where your skills folder lives. Recommended locations include:
- Project Skills:
.github/skills/(recommended) or.claude/skills/(for backward compatibility). - Personal Skills:
~/.copilot/skills/(recommended) or~/.claude/skills/.
Letโs say you pick .github/skills. Hereโs how youโd set it up:
# Create the main skills directorymkdir -p .github/skills
# Create a specific skill foldermkdir .github/skills/image-resizerInside that main folder, create a subfolder for each specific skill you want. Name them something clear like image-resizer or webapp-testing.
Step 2: Write the SKILL.md File
This is where the magic happens
Every skill needs a SKILL.md file (must be uppercase) with YAML frontmatter at the top. The description is critical itโs what level 1 discovery uses to trigger the skill.
Hereโs a real example:
---name: 'Image Resizer'description: 'Automatically resizes and optimizes images for web use. Handles batch processing, maintains aspect ratios, and generates responsive image sets. Use this when working with image assets that need multiple sizes or optimization.'---
# Image Resizing Workflow
First, I'll check what you're starting with:
- Look at source image dimensions and format- Figure out what target sizes you need- Make sure the output directory exists
Next, I'll handle the actual work using the [optimization script](./scripts/optimize.js).
Finally, I'll verify the output quality and file sizes.Notice how the description is specific and detailed? Thatโs what ensures Copilot โpicks upโ the skill when you mention images or resizing.
Step 3: Add Scripts and Resources
What makes skills powerful
Hereโs where things get really useful. Youโre not limited to just instructions. You can bundle JavaScript scripts, templates, configuration files, whatever you need, right alongside your SKILL.md. Then reference them using relative paths.
Hereโs what your folder structure might look like:
.github/skills/image-resizer/โโโ SKILL.mdโโโ scripts/โ โโโ resize-images.jsโ โโโ optimize.jsโโโ templates/ โโโ config-template.jsonThen in your SKILL.md, you can tell Copilot about these files:
## Tools Available
To resize images, run: `./scripts/resize-images.js`
For optimization, use: `./scripts/optimize.js`
Configuration template: `./templates/config-template.json`Now when you ask Copilot to resize images, it doesnโt just give you advice. It can actually tell you to run the script thatโs already set up and tested. Thatโs way more useful than getting generic code suggestions every time.
Step 4: Enable Skills in VS Code
Activate the feature
Okay, heads up: this feature is currently in preview, so youโll need to use VS Code Insiders to try it out. Hereโs how to get it working:
- Open VS Code (or VS Code Insiders)
- Open Settings (press
Cmd+,on Mac orCtrl+,on Windows/Linux) - Search for โAgent Skillsโ
- Ensure the experimental skill support is enabled
You can also enable it via .vscode/settings.json if you prefer:
{ "chat.useAgentSkills": true}Info
Copilotโs โAgent Modeโ (Windows & Linux: Ctrl+I, Mac: Cmd+I) is highly optimized for using these skills autonomously. For the best experience, try invoking Copilot in Agent Mode when working with your custom skills.
Once itโs enabled, test it out. Open Copilot chat and ask: โWhat skills do you have?โ If everythingโs set up right, Copilot should list your new skill and give you a quick rundown of what it does.
Real-World Skill Examples
Documentation Generator
Letโs say your team has a specific style guide for docs. You can create a skill that knows all your conventions and writes documentation that matches your standards every time.
---name: 'Documentation Generator'description: "Generates API documentation following the team's style guide. Includes TypeScript examples, parameter descriptions, and usage patterns. Use when documenting new functions or API endpoints."---
## Documentation Format
Each function should include:
1. Brief description (one sentence)2. Parameter table with types and descriptions3. Return value explanation4. Code example showing typical usage5. Common gotchas or edge cases
Example template is in `./templates/api-doc.md`Test Suite Builder
Tired of writing the same boilerplate test code? Build a skill that understands your testing patterns and can scaffold complete test suites.
---name: 'Test Suite Builder'description: 'Generates comprehensive test suites using Jest and React Testing Library. Covers happy paths, edge cases, and error scenarios. Use when creating tests for new components or utilities.'---
## Test Structure
For each component/function, generate:
- Setup and teardown blocks- Happy path tests- Edge case coverage- Error handling tests- Mock setup when needed
Refer to `./examples/sample-test.spec.ts` for the pattern.Code Review Checklist
You can even package your teamโs code review standards into a skill that helps check PRs.
---name: 'Code Review Checklist'description: 'Provides a comprehensive code review checklist based on team standards. Covers code quality, security, performance, and testing. Use when reviewing pull requests.'---
## Review Criteria
### Code Quality
- [ ] Functions are under 50 lines- [ ] No console.logs in production code- [ ] Meaningful variable names- [ ] Comments explain "why" not "what"
### Security
- [ ] No hardcoded credentials- [ ] Input validation on all external data- [ ] Proper error handling without exposing internals
### Testing
- [ ] Unit tests for new functions- [ ] Integration tests for API endpoints- [ ] Coverage above 80%Benefits of Agent Skills
Faster Workflows
Why itโs awesome
Once youโve got skills set up, youโll notice how much time you save. No more typing out the same explanations every day. No more copy-pasting from that doc you wrote six months ago. You just ask Copilot, and it already knows what to do.
Complex tasks that used to take multiple back-and-forth conversations? Now they happen in one shot because Copilot has all the context it needs ready to go.
Team Knowledge Sharing
Hereโs something cool: skills make institutional knowledge accessible to everyone. That pattern the senior dev uses? That workaround for the weird API quirk? That specific way you want commit messages formatted? Put it in a skill, and now everyone on the team can tap into it.
New team members get up to speed faster because the knowledge is right there in the codebase, not locked away in someoneโs head.
Consistent Results
With skills, you get consistency. Copilot follows your established patterns every time. No more โwell, last time it suggested this pattern, but today itโs suggesting something differentโ situations.
Scalable Automation
The real power move is bundling scripts with your instructions. Instead of Copilot just giving you advice, it can actually do things. Run your image optimizer. Generate your boilerplate. Execute your tests. Thatโs the difference between a helpful suggestion and actual automation.
Quick Reference
-
Create Skills Directory: Choose a location (
.github/skills/,.copilot/skills/, or.claude/skills/) and create a subfolder for your skill.
Terminal window mkdir -p .github/skills/my-skill -
Create SKILL.md: Inside your skill folder, create a
SKILL.mdfile with YAML frontmatter includingnameanddescription.
.github/skills/my-skill/SKILL.md ---name: 'My Skill'description: 'Brief description of what this skill does and when to use it.'--- -
Add Resources: Include any scripts, templates, or additional files your skill needs in the same folder.
Terminal window mkdir .github/skills/my-skill/scripts -
Reference Assets: Use relative paths in
SKILL.mdto point to your scripts or templates.
.github/skills/my-skill/SKILL.md To run the script, use: `./scripts/my-script.js` -
Enable in VS Code: Turn on Agent Skills in VS Code settings by enabling
chat.useAgentSkills.
.vscode/settings.json {"chat.useAgentSkills": true} -
Verify Setup: Open Copilot Chat and ask, โWhat skills do you have?โ to confirm your skill is recognized.
Next Steps
Start small and build up
Donโt try to create the perfect skill right away. Start with something simple that solves a task you do all the time. Maybe itโs generating test files in your teamโs format, or maybe itโs a checklist for deploying to production.
Get that working first. See how Copilot uses it. Then you can add more complexity: bundle in some scripts, create templates, add multiple workflow stages.
As you build out your skills library, Copilot stops feeling like a generic code autocomplete tool. It starts feeling more like a specialized team member who actually knows your codebase, your patterns, and your teamโs preferences.
And the best part? Once youโve built a skill, itโs there for everyone. Your whole team benefits from the time you spent documenting and automating that pattern.