Customization
Custom instructions, agents, prompt files, MCP servers, hooks, and BYOK model keys
title: "Customization" description: "Custom instructions, agents, prompt files, MCP servers, hooks, and BYOK model keys" section: "Copilot" readTime: "6 min"
Customize AI in VS Code
Teach the AI about your codebase, coding standards, and workflows so it generates code that fits from the start.
Open the Chat Customizations Editor
Select the Configure Chat (gear icon) in the Chat view, or run Chat: Open Chat Customizations from the Command Palette (Ctrl+Shift+P).
Five Customization Scenarios
1. Define Coding Standards
Use custom instructions (copilot-instructions.md or *.instructions.md) to share project-wide rules. Always-on instructions apply to every request; file-based instructions target specific file types or folders.
2. Automate Repetitive Tasks
Create prompt files (.prompt.md) for tasks you run often — scaffolding a component, preparing a PR, running a code review. Use agent skills (.skill.md) for multi-step workflows involving scripts and external tools.
3. Specialize the AI
Create custom agents (.agent.md) that adopt specific personas — security reviewer, database admin, planner. Each defines behavior, available tools, and model preferences.
4. Connect External Tools
Add MCP servers via mcp.json to give the AI access to databases, APIs, and services. Use hooks to run shell commands at lifecycle events (e.g., run formatter after every file edit, enforce security policies).
5. Install Plugins
Install agent plugins (Preview) to add pre-packaged bundles: slash commands, skills, custom agents, hooks, and MCP servers in one install.
6. Bring Your Own Model Key (BYOK)
Copilot Business and Enterprise users can link their own API keys to use external models directly in VS Code chat. Supported providers:
| Provider | Models available |
|---|---|
| Anthropic | Claude Sonnet 4.5, Opus 4, and others |
| OpenAI | GPT-4o, o3, and others |
| Gemini 2.5 Pro/Flash | |
| Microsoft Foundry | Azure-hosted models |
| OpenRouter | 100+ models via one key |
| Ollama / Foundry Local | Locally-running models |
Copilot Free, Pro, and Pro+ users can also link keys. Admins control access via the Bring Your Own Language Model Key policy on GitHub.com.
Getting Started (Incremental)
/initin chat → generatescopilot-instructions.mdtailored to your codebase- Add
*.instructions.mdfiles for language/framework-specific rules (withapplyTopatterns) - Create prompt files for common workflows; add MCP servers for external services
- Build custom agents for specialized roles
- Use
/create-prompt,/create-instruction,/create-skill,/create-agent,/create-hookin chat to generate files with AI assistance
Generate Customizations from Natural Language
Describe what you want in plain English and Copilot drafts the customization file for you:
Create a custom agent that acts as a database administrator focused on PostgreSQL query optimization
Copilot generates a ready-to-use .agent.md file. The same works for instructions, skills, and hooks.
Control Skill Visibility with skillOverrides
The skillOverrides setting lets you change how skills appear without editing their source files — useful for shared project skills or plugin-provided skills:
// .vscode/settings.json
{
"github.copilot.chat.skillOverrides": {
"legacy-context": "name-only",
"deploy": "off"
}
}| Value | Description shown | User-invocable |
|---|---|---|
"on" (default) | Full name + description | Yes |
"name-only" | Name only | Yes |
"user-invocable-only" | Hidden from menu | Yes |
"off" | Hidden entirely | No |
Monorepo Support
Enable chat.useCustomizationsInParentRepositories to discover customization files from parent repositories when you open a subfolder. VS Code walks up the tree to the .git root and collects all instruction files, prompt files, and agents.
Troubleshooting
If customizations are not applied: Chat view ... menu → Show Agent Debug Logs to inspect which files were discovered and loaded.