Build, test, and deploy Copilot CLI skills. Use when creating a new skill, improving an existing skill, testing skills with subagents, deploying skills to a repo, or learning skill development patterns.
Guide for building Copilot CLI skills — from inception through deployment and iteration. This is a pure knowledge skill: you orchestrate everything using your existing tools (create, edit, task, powershell, gh CLI). No wrapper scripts needed.
If this file and any reference doc conflict, this file wins.
Precedence: SKILL.md > references/*.md > agent general knowledge.
Skills share the context window with system prompts, conversation history, other skills, and the user's actual work. Every token in a skill is a token the agent can't use for reasoning.
Default assumption: the agent is already very smart. Only include context it doesn't already have. Challenge each paragraph: "Does this justify its token cost?" Prefer concise examples over verbose explanations.
Use this skill when:
| Need | Use | Not a skill | |------|-----|------------| | Reusable investigation/automation with triggers | Skill (.github/skills/) | | | Repo-wide conventions for every prompt | | copilot-instructions.md | | Path-specific rules ("all files in src/api/ must...") | | .instructions.md | | Agent with identity, tools, autonomy | | .agent.md |
If unsure: try copilot-instructions.md first. Create a skill when you need trigger-based activation, references loaded on demand, or scripts.
Evaluate first: Before writing anything, test the agent on your use case without a skill. Note where it fails — those gaps are what your skill should fix. See references/skill-lifecycle.md.
Ask the user:
| Signal | Archetype | |--------|-----------| | Needs to run scripts, call APIs, process data | Script-driven | | Teaches conventions, review patterns, domain rules | Knowledge-driven | | Both | Start knowledge-driven, add scripts only for what you can't do natively |
❌ NEVER write a script that wraps tools you already have (create, edit, gh, powershell). If you're tempted, you're over-scripting.
❌ NEVER encode reasoning into scripts. Scripts collect data; agents reason over it. If a script has
if/elseifchains producing prose recommendations, move that logic to SKILL.md guidance and have the script emit structured JSON instead. See references/skill-patterns.md.
# User-level skill
New-Item -ItemType Directory -Path ~/.copilot/skills/{name}/references -Force
# Or repo-level skill
New-Item -ItemType Directory -Path .github/skills/{name}/references -Force
# Add scripts/ only if script-driven
# Add assets/ only if the skill produces files (templates, schemas, etc.)
Use the template from references/skill-patterns.md matching the archetype. Key requirements:
name + structured description with USE FOR / DO NOT USE FOR / INVOKES routing signals (see references/skill-patterns.md)⚠️ Frontmatter fields:
nameanddescriptionare required. Cross-tool fields:argument-hint,user-invocable,disable-model-invocation,allowed-tools. Copilot CLI + Claude Code:model(v1.0.22+). Claude Code-only:effort,context,agent,hooks. Copilot CLI also supportslicense. Unknown fields are silently ignored. See references/skill-patterns.md for the full cross-tool compatibility table.
❌ NEVER restate MCP tool parameter schemas or chain tool calls into rigid step-by-step recipes — the agent has tool descriptions in its context. DO provide examples that add domain context the tool description lacks (branch ref patterns, field names, log locations). See references/anti-patterns.md.
⚠️ Context budget: An orchestrating SKILL.md should be 2K-4K tokens. A knowledge-only SKILL.md applied once per task can be larger (up to 15K tokens). Move depth to
references/.
Create references/*.md for deep content the agent loads on demand:
Follow conventions from references/skill-patterns.md:
Get-{DomainAction}.ps1❌ NEVER count API failures as success. Return "Unknown" and exclude from positive counts.
Follow references/testing-patterns.md:
task tool with model parameterFor new skills or major restructuring, use the writer-critic convergence loop instead: one agent writes, a different-model agent critiques, writer applies fixes, repeat until convergence (2-3 rounds). See references/testing-patterns.md.
Local first: Copy to ~/.copilot/skills/{name}/ and test in a real conversation.
Then to repo:
git checkout -b add-{name}-skill
# Copy files to .github/skills/{name}/
git add .github/skills/ && git commit -m "Add {name} skill"
git push origin HEAD && gh pr create --title "Add {name} skill"
Optional: Wire into .github/copilot-instructions.md for automatic invocation.
See references/testing-patterns.md for the review thread workflow. Key points:
⚠️ Automated reviewers have ~30-50% false positive rates. Don't accept suggestions uncritically. Verify each claim.
"I keep running the same API calls to diagnose X" → Step 1-7 above with script-driven archetype. Script handles API calls + data correlation. SKILL.md documents when to use, parameters, and how to interpret results.
"I keep explaining the same conventions/patterns to agents" → Mine real review comments or docs for patterns. Organize by category with severity (❌/⚠️/💡). Include real quotes as evidence. The SKILL.md IS the skill — no scripts.
→ Jump to Step 6. Give subagents a realistic task and collect feedback.
→ Jump to Step 7. Create branch, copy files, PR, handle review.
→ See references/agent-conventions.md. Agents are flat .agent.md files — simpler than skills but with cross-platform nuances (tools field, subagent spawning, companion skill pattern for reference material).
description in frontmatter must match what users actually say. Use trigger phrases, not technical jargon.~/.copilot/skills/{name}/. Repo skills go in .github/skills/{name}/.SKILL.md (case-sensitive on Linux).| Audience | Location | Notes |
|----------|----------|-------|
| Just you | ~/.copilot/skills/ | Available in all repos. Also: ~/.agents/skills/ |
| Your team/repo | .github/skills/ | Available to anyone working in that repo. Also: .agents/skills/ |
| Multiple repos | User-level, then copy to repos as needed | Or publish as a shared reference |
💡 Use
.copilot//.github/as primary. The.agents/paths provide cross-agent compatibility.
When a knowledge-driven skill grows beyond ~8K tokens in SKILL.md:
references/ files by categoryThe skill ecosystem is evolving. Periodically re-check the official docs for new supported frontmatter fields, skill discovery improvements, and best practices:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer