Explore Agentic Development -

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.

Core concepts

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 to open the Chat Customizations editor.

Screenshot of the Chat Customizations editor, showing the sidebar with customization categories and the main view listing custom agents.

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.

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

  2. Add targeted rules: create file-based *.instructions.md files for specific parts of your codebase, such as language conventions or framework patterns.

  3. Automate repetitive tasks: create prompt files for common workflows and add MCP servers to connect external services.

  4. Create specialized workflows: build custom agents for specific roles. Package reusable capabilities as agent skills to share across tools.

  5. Generate customizations with AI: type /create-prompt, /create-instruction, /create-skill, /create-agent, or /create-hook in 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 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.

Chat Customizations editor

Note

The Chat Customizations editor is currently in preview.

The Chat Customizations editor provides a centralized UI for creating and managing all your chat 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.

Screenshot of the Chat Customizations editor, showing the sidebar with customization categories and the main view listing custom agents.

To 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 (⇧⌘P (Windows, Linux Ctrl+Shift+P)).

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.

Troubleshoot customization issues

If your customizations aren't being applied or cause unexpected behavior, select the ellipsis (...) menu in the Chat view and select Show Agent Debug Logs to troubleshoot agent issues.