Customization
Custom instructions, prompt files, agents, skills, MCP, hooks, plugins, and BYOK in VS Code
title: "Customization" description: "Custom instructions, prompt files, agents, skills, MCP, hooks, plugins, and BYOK in VS Code" section: "Copilot" readTime: "5 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 Agent Customizations Editor
Select the Configure Chat (gear icon) in the Chat view, or run Chat: Open Customizations from the Command Palette (Ctrl+Shift+P). To create a file, run Chat: New followed by the customization type.
Customization Scenarios
1. Define Coding Standards
Use custom instructions to share project-wide rules:
| File | Scope |
|---|---|
.github/copilot-instructions.md | Always-on, repository-wide |
.github/instructions/*.instructions.md | File-based; use applyTo globs in the frontmatter (comma-separate multiple patterns) |
AGENTS.md | Agent instructions; the nearest file in the directory tree takes precedence |
CLAUDE.md or GEMINI.md | Alternative to AGENTS.md, a single file in the repository root |
---
applyTo: "**/*.ts,**/*.tsx"
---
Use strict TypeScript. Prefer named exports.Add excludeAgent: "code-review" or excludeAgent: "cloud-agent" to the frontmatter to keep a file away from that agent. Path-specific instructions are, on GitHub.com, currently supported by the cloud agent and Copilot code review.
2. Automate Repetitive Tasks
Create prompt files (.github/prompts/*.prompt.md) for tasks you run often, such as scaffolding a component or preparing a PR. Prompt files are not applied automatically; invoke them in chat with /<name>. Use agent skills (SKILL.md) for multi-step workflows involving scripts and external tools.
3. Specialize the AI
Create custom agents (.github/agents/*.agent.md) that adopt specific personas, such as a security reviewer or a planner. Each defines behavior, available tools, and model preferences.
4. Connect External Tools
Add MCP servers (for example in a workspace .mcp.json) to give the AI access to databases, APIs, and services. Use hooks to run shell commands at lifecycle events.
5. Install Plugins
Install agent plugins to add pre-packaged bundles of customizations in one step.
6. Bring Your Own Model Key (BYOK)
Use your own API key to add models beyond Copilot's list. BYOK models work in chat without signing in to GitHub or having a Copilot plan, but inline suggestions and semantic search still require a GitHub account.
- Open the gear icon in the language model picker, or run Chat: Manage Language Models
- Select Add Models and choose a provider, or Install Model Providers to add an extension
| Provider | Notes |
|---|---|
| Built-in providers | Azure, Anthropic, Gemini, OpenAI, and others |
| Custom Endpoint | Any endpoint using the Chat Completions, Responses, or Messages API |
| Extension providers | Installed from the Marketplace (for Ollama, use the official Ollama extension, since the built-in Ollama provider is deprecated) |
On Business and Enterprise, admins can disable Bring Your Own Language Model Key in VS Code by policy. BYOK usage is billed by your provider, not by Copilot.
Getting Started (Incremental)
/initin chat → generates workspace instructions tailored 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-instructions,/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-agent a database administrator focused on PostgreSQL query optimization
Monorepo Support
Enable chat.useCustomizationsInParentRepositories (off by default) to discover customization files from parent repositories when you open a subfolder.
Troubleshooting
If customizations are not applied: open the context menu in the Chat view and select Diagnostics to find file or frontmatter errors, and confirm your applyTo pattern matches. Run Developer: Open Agent Debug Logs to see which files were discovered. See Troubleshooting.