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. You can manage customizations from both the Chat view and the Agents window.

Core concepts

Learn about the different customization types and when to use each one.

Choose a customization type

VS Code offers several customization options, each suited to a different goal:

To compare the options and decide which one fits your goal, see Customization concepts. The rest of this article focuses on how to set up and manage customizations.

Get started

The most effective approach is to adopt customizations incrementally. Start with project-wide instructions, then add more specific customizations as you identify recurring needs. For a hands-on walkthrough, see the Customize AI for your project guide.

  1. Set up project instructions: type /init in chat to generate a .github/copilot-instructions.md file with coding standards tailored to your codebase.

  2. Add targeted instructions: create *.instructions.md files that apply to specific languages, frameworks, or folders in your codebase.

  3. Automate repetitive tasks: create prompt files for common workflows, such as generating tests or scaffolding components.

  4. Specialize the AI for specific roles: create custom agents, and package reusable capabilities as agent skills to share across projects and tools.

  5. Connect external tools and data: add MCP servers and hooks to extend the AI with external services and custom actions.

Tip

You can generate customization files with AI. Type /create-instruction, /create-prompt, /create-skill, /create-agent, or /create-hook in chat to scaffold a new customization with AI assistance.

Manage customizations in the editor

Note

The Agent Customizations editor is currently in preview.

The Agent Customizations editor provides a centralized UI for creating and managing all your agent customizations in one place. The editor organizes the different customization types into separate tabs and provides an embedded code editor for editing customization files with syntax highlighting and validation.

You can create new customizations from scratch by editing the corresponding Markdown, or use AI to generate initial content based on your specific project.

To add MCP servers and agent plugins, you can browse the corresponding marketplace directly from the editor, install new items, and manage existing ones.

You can open the Agent Customizations editor from either chat surface:

In the Agents window, select a customization type in the Customizations panel below the sessions list.

Screenshot showing the Agent Customizations panel in the Agents window, with the list of available customizations visible.

You can configure customization for different agent types: local agents, Copilot CLI, and the Claude agent. Select the agent type from the dropdown at the top of the editor to view and manage customizations for that agent type.

Use customizations in a monorepo

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 Open in VS Code Open in VS Code Insiders 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 .git folder (it is not itself a repository root).
  • A parent folder contains a .git folder.
  • The parent repository folder is trusted. VS Code prompts you to trust the parent folder when the workspace is opened.
Note

The chat.useCustomizationsInParentRepositories Open in VS Code Open in VS Code Insiders setting is disabled by default.

Troubleshoot customization issues

If your customizations aren't being applied or cause unexpected behavior, open the Agent Debug Logs panel to troubleshoot agent issues. Run Developer: Open Agent Debug Panel from the Command Palette (โ‡งโŒ˜P (Windows, Linux Ctrl+Shift+P)), or in the Chat view select the ellipsis (...) menu and select Show Agent Debug Logs.