AgentSkillsCN

github-copilot-customizer

通过工作区指令、自定义代理、提示词以及条件性指令文件,全面定制GitHub Copilot。适用于以下场景:创建copilot-instructions.md、设置自定义代理、构建可复用的提示词、配置特定于文件的指令、整理.github/copilot文件夹结构,或进行任何GitHub Copilot的定制任务。可通过“定制Copilot”“Copilot指令”“创建代理”“提示词文件”“指令文件”“.github设置”等短语触发。

SKILL.md
--- frontmatter
name: github-copilot-customizer
description: 'Comprehensive guide for customizing GitHub Copilot through workspace instructions, custom agents, prompts, and conditional instruction files. Use when: creating copilot-instructions.md, setting up custom agents, building reusable prompts, configuring file-specific instructions, organizing .github/copilot folder structure, or any GitHub Copilot customization task. Triggers on: "customize copilot", "copilot instructions", "create agent", "prompt file", "instruction file", ".github setup".'

GitHub Copilot Customizer

Tailor GitHub Copilot through six customization methods. This skill provides navigation to detailed guides.

When to Use This Skill

Use this when you need to:

  • Create or modify .github/copilot-instructions.md
  • Build custom agents (.agent.md), prompts (.prompt.md), or instruction files (.instructions.md)
  • Configure MCP servers for external tool access
  • Choose the right customization method for your needs
  • Set up the .github/ folder structure

Quick Decision Guide

code
Need to...
├─ Apply rule to ALL code? → copilot-instructions.md
├─ Apply rule to specific file types? → .instructions.md  
├─ Create reusable workflow? → .agent.md
├─ Template a common task? → .prompt.md
├─ Package domain knowledge? → SKILL.md
└─ Add external tools? → mcp.json (+ MCP server)

Six Customization Methods

MethodExtensionWhen to UseDetails
Workspace Instructions.github/copilot-instructions.mdProject-wide baseline rulesGuide
Agents.agent.mdTask-specific workflows with toolsGuide · Examples
Prompts.prompt.mdReusable task templatesGuide
Instructions.instructions.mdFile-type conditional rulesGuide · Examples
SkillsSKILL.mdDomain knowledge packagesGuide
MCP Servers.vscode/mcp.jsonExternal tool integrationSetup Guide

Critical: Use exact file extensions or detection fails.

Prerequisites

  • VS Code with GitHub Copilot extension
  • Enable instruction files in settings:
    json
    {
      "github.copilot.chat.codeGeneration.useInstructionFiles": true,
      "chat.agent.enabled": true
    }
    

Directory Structure

code
.github/
├── copilot-instructions.md
├── agents/
│   ├── planner.agent.md
│   └── reviewer.agent.md
├── prompts/
│   └── generate-component.prompt.md
├── instructions/
│   ├── python-coding.instructions.md
│   └── typescript-coding.instructions.md
└── skills/
    └── <skill-name>/SKILL.md

.vscode/
└── mcp.json  # VS Code only

Quick Start

  1. Create workspace baseline: Copy template to .github/copilot-instructions.md
  2. Add custom agent: Use template → save as .github/agents/<name>.agent.md
  3. Create prompt: Use template → save as .github/prompts/<name>.prompt.md
  4. Add instruction file: Use template → save as .github/instructions/<name>.instructions.md
  5. Configure MCP: See MCP Setup Guide

Details and Examples

Complete Guides

  • Detailed Guides - In-depth information on all methods
    • Agent frontmatter properties (9 properties with handoffs)
    • Available models and tools
    • Prompt file properties
    • Glob patterns for instruction files
    • Skills vs Instructions comparison
    • Combining methods patterns
  • Agent Examples - Common patterns (Planner, Implementer, Reviewer)
  • Instruction Examples - Language/framework specific
  • Chat Tools Reference - Complete list of 47+ tools and tool sets
  • VS Code Settings - Essential Copilot settings organized by category
  • MCP Setup - Complete MCP server configuration guide with stdio/HTTP types

Templates

Troubleshooting

IssueSolution
Instructions not appliedEnable useInstructionFiles in settings
Agent not visibleCheck .agent.md extension, verify YAML syntax
Prompt not appearingEnsure .prompt.md extension
Instruction file ignoredVerify .instructions.md extension, test glob pattern
MCP server not startingCheck command/args, view MCP output logs
Tool not availableVerify tool in agent's tools list or MCP server running

External Resources