Customize AI in Visual Studio Code
Visual Studio Code gives you several ways to teach the AI about your codebase, coding standards, and workflows. This article introduces the customization options and helps you get started.
Learn about the different customization types and when to use each one.
To access customizations, select the Configure Chat (gear icon) in the Chat view.
Customization scenarios
The following sections describe common customization scenarios and which options to use for each one.
Define coding standards
Use custom instructions to share project-wide rules and conventions with the AI. Always-on instructions apply to every request, while file-based instructions target specific file types or folders. For example, enforce ESLint rules across all files and apply React patterns only in .tsx files.
Automate tasks and workflows
Create prompt files for repeatable tasks you run often, like scaffolding a component or preparing a pull request.
For more complex multi-step workflows that involve scripts and external tools, package them as agent skills.
Specialize the AI
Create custom agents that adopt specific personas, such as security reviewer, database admin, or planner. Each agent defines its own behavior, available tools, and language model preferences. Choose different language models for different tasks, or bring your own API key to access additional models.
Discover and install plugins
Install agent plugins (preview) to add pre-packaged bundles of customizations from plugin marketplaces. A single plugin can provide slash commands, skills, custom agents, hooks, and MCP servers.
Connect external tools and data
Add MCP servers to give the AI access to databases, APIs, and other services through the Model Context Protocol. Use hooks to run shell commands at key lifecycle points, such as running a formatter after every file edit or enforcing security policies.
Get started
Implement AI customizations incrementally. Start with the basics and add more as needed. For a hands-on walkthrough, see the Customize AI for your project guide.
-
Initialize your project: type
/initin chat to generate a.github/copilot-instructions.mdfile with coding standards tailored to your codebase. -
Add targeted rules: create file-based
*.instructions.mdfiles for specific parts of your codebase, such as language conventions or framework patterns. -
Automate repetitive tasks: create prompt files for common workflows and add MCP servers to connect external services.
-
Create specialized workflows: build custom agents for specific roles. Package reusable capabilities as agent skills to share across tools.
-
Generate customizations with AI: type
/create-prompt,/create-instruction,/create-skill,/create-agent, or/create-hookin chat to generate customization files with AI assistance.
Parent repository discovery
In monorepo setups, you might open a subfolder of a repository in VS Code rather than the repo root. By default, Visual Studio Code only discovers customization files within your open workspace folder(s). Enable the chat.useCustomizationsInParentRepositories setting to also discover customizations from the parent repository.
When this setting is enabled, VS Code walks up the folder hierarchy from each workspace folder until it finds a .git folder. If found, it collects customizations from all folders between the workspace folder and the repository root (inclusive). This applies to all customization types: always-on instructions (copilot-instructions.md, AGENTS.md, CLAUDE.md), file-based instructions, prompt files, custom agents, agent skills, and hooks.
For example, consider the following monorepo structure:
my-monorepo/ # repo root (has .git folder)
├── .github/
│ ├── copilot-instructions.md
│ ├── instructions/
│ │ └── style.instructions.md
│ ├── prompts/
│ │ └── review.prompt.md
│ └── agents/
│ └── reviewer.agent.md
├── packages/
│ └── frontend/ # opened as workspace folder
│ └── src/
If you open only packages/frontend/ in VS Code and enable the setting, VS Code discovers the customization files at the repo root, such as copilot-instructions.md, style.instructions.md, review.prompt.md, and reviewer.agent.md.
Conditions for parent repository discovery:
- The workspace folder does not contain a
.gitfolder (it is not itself a repository root). - A parent folder contains a
.gitfolder. - The parent repository folder is trusted. VS Code prompts you to trust the parent folder when the workspace is opened.
The chat.useCustomizationsInParentRepositories setting is disabled by default.
Chat Customizations editor
The Chat Customizations editor is currently in preview.
The Chat Customizations editor provides a centralized UI for discovering, creating, and managing all your customizations in one place. From the editor, you can browse customization categories (agents, skills, instructions, prompts, hooks, MCP servers, plugins), create new items with optional AI-guided generation, and edit existing customizations in an embedded code editor. The Plugins page lists your installed agent plugins and lets you install new plugins from source with the + button. You can also enable or disable MCP servers and plugins directly from the editor. Disabled items appear with a dimmed style and a status indicator.
To open the Chat Customizations editor, run Chat: Open Chat Customizations from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).

Troubleshoot customization issues
If your customizations aren't being applied or cause unexpected behavior, select Configure Chat (gear icon) > Show Agent Debug Logs in the Chat view to troubleshoot agent issues.