# Visual Studio Code

Microsoft's code editor with GitHub Copilot chat and agent mode built in — configured via .vscode/mcp.json, settings.json, instructions files, prompt files, skills, and hooks.

Schema: 1.0 · Data: ee5de863c30bdbe4fe7dd3e07c7e22ea9bf4ab2248dbc7c35cdbf60bc28be1db

## Configuration

### MCP

Status: supported

Configure MCP servers in mcp.json under the servers key (not mcpServers). Supports stdio, Streamable HTTP, and legacy SSE, plus an MCP server gallery in the Extensions view and optional sandboxing for local servers.

- project: `.vscode/mcp.json` (json) — key: servers — Check into source control to share servers with your team.
- global: `<VS Code profile>/mcp.json` (json) — key: servers — Open with the MCP: Open User Configuration command; lives in the VS Code user-profile folder (e.g. ~/Library/Application Support/Code/User/mcp.json on macOS). Each profile can have its own servers.
- `type`: "stdio" | "http" | "sse" — Server transport. stdio for local command servers, http (Streamable HTTP) or sse (legacy) for remote servers.
- `command`: string — Command to start a local (stdio) server.
- `args`: string[] — Arguments passed to the command.
- `env`: record<string, string> — Environment variables for the server. Avoid hardcoding secrets; use input variables or environment files.
- `url`: string — Endpoint URL for a remote server.
- `headers`: record<string, string> — HTTP headers for a remote server.
- `sandboxEnabled`: boolean — Run a local stdio server in an isolated sandbox (macOS and Linux). Tool calls from sandboxed servers are auto-approved.
- transports: stdio, http, sse
- auth: headers
- Tools: supported
- Prompts: supported — Invoke server prompts by typing / in the chat input.
- Resources: supported — Attach via Add Context > MCP Resources or the MCP: Browse Resources command.
- Sampling: supported — Models exposed to servers are controlled by the chat.mcp.serverSampling setting.
- Apps: supported — Interactive UI components rendered inline in chat (chat.mcp.apps.enabled).
- Servers live under the servers key (not mcpServers).
- Servers can also be installed from the MCP gallery (search @mcp in the Extensions view), added via MCP: Add Server, or via the code --add-mcp CLI flag.
- MCP servers can be configured in devcontainer.json under customizations.vscode.mcp.servers.
- chat.mcp.discovery.enabled can auto-discover MCP configs from other apps (e.g. Claude Desktop).
- New or changed servers require an explicit trust confirmation before they start.
- On macOS and Linux, local stdio servers can be sandboxed with sandboxEnabled plus a top-level sandbox object (filesystem/network rules).

Remote and local servers
```json
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp"
    },
    "playwright": {
      "command": "npx",
      "args": ["-y", "@microsoft/mcp-server-playwright"]
    }
  }
}

```


Sandboxed local server
```json
{
  "servers": {
    "myServer": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@example/mcp-server"],
      "sandboxEnabled": true
    }
  },
  "sandbox": {
    "filesystem": { "allowWrite": ["${workspaceFolder}"] },
    "network": { "allowedDomains": ["api.example.com"] }
  }
}

```

Source: https://code.visualstudio.com/docs/copilot/customization/mcp-servers
Checked: 2026-07-12

### Skills

Status: supported

SKILL.md Agent Skills (open standard) loaded on demand from project and personal skill folders, including Claude- and .agents-compatible locations. Skills double as slash commands in chat.

- project: `.github/skills/<name>/SKILL.md` (markdown)
- project: `.claude/skills/<name>/SKILL.md` (markdown) — Claude-compatible project location.
- project: `.agents/skills/<name>/SKILL.md` (markdown) — Cross-agent project location.
- global: `~/.copilot/skills/<name>/SKILL.md` (markdown)
- global: `~/.claude/skills/<name>/SKILL.md` (markdown) — Claude-compatible personal location.
- global: `~/.agents/skills/<name>/SKILL.md` (markdown) — Cross-agent personal location.
- `name`: string (required) — Unique identifier. Lowercase letters, numbers, and hyphens only; must match the parent directory name; max 64 characters.
- `description`: string (required) — What the skill does and when to use it (drives automatic loading). Max 1024 characters.
- `argument-hint`: string — Hint shown in the chat input when the skill is invoked as a slash command.
- `user-invocable`: boolean — Whether the skill appears in the / menu. Default true.
- `disable-model-invocation`: boolean — When true, the agent cannot auto-load the skill; it must be invoked via slash command. Default false.
- `context`: "fork" — Experimental. Run the skill in a dedicated subagent context; only the final result returns to the parent agent. Requires github.copilot.chat.skillTool.enabled.
- invocation: /skill-name
- Enabled via chat.useAgentSkills (default true); extra locations via chat.agentSkillsLocations.
- Progressive loading: only name/description at startup, the SKILL.md body when activated, and bundled files only when referenced.
- Extensions can contribute skills via the chatSkills contribution point in package.json.
- In monorepos, chat.useCustomizationsInParentRepositories discovers skills from the parent repository root.

SKILL.md
```markdown
---
name: webapp-testing
description: Guide for testing web applications using Playwright. Use this when asked to create or run browser-based tests.
---

# Web Application Testing with Playwright

1. Review the [test template](./test-template.js) for the standard test structure
2. Create a new test file in the `tests/` directory
3. Use role-based locators and add assertions

```

Source: https://code.visualstudio.com/docs/copilot/customization/agent-skills
Checked: 2026-07-12

### Rules

Status: supported

Always-on instructions via .github/copilot-instructions.md, AGENTS.md, and CLAUDE.md, plus file-based *.instructions.md files that apply conditionally via applyTo glob patterns.

- project: `.github/copilot-instructions.md` (markdown) — Single always-on file applied to all chat requests in the workspace.
- project: `AGENTS.md` (markdown) — Always-on, cross-agent instructions in the workspace root; subfolder AGENTS.md files are experimental.
- project: `CLAUDE.md` (markdown) — Claude-compatible always-on instructions (also .claude/CLAUDE.md and CLAUDE.local.md).
- project: `.github/instructions/**/*.instructions.md` (markdown) — File-based instructions applied via applyTo glob or semantic match of the description.
- project: `.claude/rules/*.md` (markdown) — Claude Rules format; uses a paths glob array instead of applyTo.
- global: `~/.copilot/instructions/*.instructions.md` (markdown) — Personal instruction files; user-profile instructions can also live in VS Code user data and sync via Settings Sync.
- `name`: string — Display name shown in the UI (.instructions.md frontmatter). Defaults to the file name.
- `description`: string — Short description shown on hover in the Chat view; also used for semantic matching.
- `applyTo`: string — Glob pattern (relative to the workspace root) that auto-applies the instructions to matching files. Use ** for all files; omit to require manual attachment.
- AGENTS.md support is controlled by chat.useAgentsMdFile (default true); nested AGENTS.md in subfolders is experimental (chat.useNestedAgentsMdFiles).
- CLAUDE.md support (workspace root, .claude/CLAUDE.md, ~/.claude/CLAUDE.md, CLAUDE.local.md) is controlled by chat.useClaudeMdFile.
- .claude/rules instruction files use a paths array (Claude Rules format) instead of applyTo.
- GitHub organization-level instructions are discovered when github.copilot.chat.organizationInstructions.enabled is set.
- Priority when instructions conflict: personal (user) > repository > organization.
- Extra locations configurable via chat.instructionsFilesLocations; instruction folders are searched recursively.
- Custom instructions are not used for inline completions as you type.

Path-scoped instructions file
```markdown
---
name: 'Python Standards'
description: 'Coding conventions for Python files'
applyTo: '**/*.py'
---
# Python coding standards
- Follow the PEP 8 style guide.
- Use type hints for all function signatures.

```

Source: https://code.visualstudio.com/docs/copilot/customization/custom-instructions
Checked: 2026-07-12

### Hooks

Status: supported

Preview: JSON hook files run shell commands at agent lifecycle events. Hooks receive event JSON on stdin and can return JSON on stdout to block tools, decide permissions, or inject context.

- project: `.github/hooks/*.json` (json) — key: hooks
- project: `.claude/settings.json` (json) — key: hooks — Claude Code compatibility (also .claude/settings.local.json).
- global: `~/.copilot/hooks/*.json` (json) — key: hooks
- global: `~/.claude/settings.json` (json) — key: hooks — Claude Code compatibility. Workspace hooks take precedence over user hooks for the same event.
- `type`: "command" (required) — Hook handler type.
- `command`: string (required) — Shell command to run. Receives event JSON on stdin; may write JSON to stdout.
- `cwd`: string — Working directory for the command.
- `env`: record<string, string> — Environment variables for the command.
- `timeout`: number — Timeout in seconds. Default 30.
- `windows | linux | osx`: string — OS-specific command overrides, selected by the extension host platform.
- events: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, SubagentStart, SubagentStop, Stop
- Preview feature; the configuration format may change.
- Same hook format as Claude Code and Copilot CLI. Claude Code configs are read but matcher values are ignored (hooks run for all tools); Copilot CLI camelCase event names and bash/powershell fields are converted.
- Exit code 0 parses stdout as JSON; exit code 2 blocks and shows stderr to the model; other codes are non-blocking warnings.
- PreToolUse hooks can return hookSpecificOutput.permissionDecision (allow/deny/ask); SessionStart hooks can return additionalContext.
- Extra locations via chat.hookFilesLocations; agent-scoped hooks in .agent.md frontmatter require chat.useCustomAgentHooks.
- Organizations can disable hooks via enterprise policy.

Format after edits
```json
{
  "hooks": {
    "PostToolUse": [
      {
        "type": "command",
        "command": "npx prettier --write ."
      }
    ]
  }
}

```


Block dangerous commands (PreToolUse output)
```json
{
  "hookSpecificOutput": {
    "permissionDecision": "deny",
    "permissionDecisionReason": "Destructive command blocked by security policy"
  }
}

```

Source: https://code.visualstudio.com/docs/copilot/customization/hooks
Checked: 2026-07-12

### Commands

Status: supported

Prompt files (.prompt.md) are reusable Markdown prompts invoked as slash commands in chat, with YAML frontmatter for agent, model, and tool selection.

- project: `.github/prompts/<name>.prompt.md` (markdown)
- global: `<VS Code profile>/prompts/<name>.prompt.md` (markdown) — User prompt files live in VS Code user data (per profile); create them via the Chat: New Prompt File command.
- `description`: string — Short description of the prompt.
- `name`: string — Slash-command name. Defaults to the file name.
- `argument-hint`: string — Hint text shown in the chat input field.
- `agent`: string — Agent used to run the prompt: ask, agent, plan, or a custom agent name. Values: ask, agent, plan, <custom agent>
- `model`: string — Language model used when running the prompt. Defaults to the currently selected model.
- `tools`: string[] — Tool or tool-set names available to this prompt. Use '<server>/*' to include all tools of an MCP server; unavailable tools are ignored.
- invocation: /prompt-name
- Agent skills also appear as slash commands alongside prompt files.
- Extra workspace locations via chat.promptFilesLocations; user prompt files sync via Settings Sync.
- Bodies support Markdown links to workspace files, #tool: references, and ${input:variableName} placeholders.
- Custom agents (.github/agents/*.agent.md, formerly chat modes) are a separate mechanism; a prompt file can target one via the agent frontmatter field.
- Generate prompt files with /create-prompt or the Agent Customizations editor.

Prompt file
```markdown
---
agent: 'agent'
description: 'Generate a new React form component'
tools: ['search/codebase', 'vscode/askQuestions']
---
Your goal is to generate a new React form component based on our templates.

* Use `react-hook-form` for form state management
* Always define TypeScript types for your form data

```

Source: https://code.visualstudio.com/docs/copilot/customization/prompt-files
Checked: 2026-07-12

### Settings

Status: supported

Agent behavior is configured in settings.json via chat.* and github.copilot.* keys: agent mode, tool approvals, sandboxing, MCP access, and discovery locations for instructions, prompts, skills, and hooks.

- project: `.vscode/settings.json` (jsonc)
- global: `<VS Code profile>/settings.json` (jsonc) — e.g. ~/Library/Application Support/Code/User/settings.json on macOS.
- `chat.agent.enabled`: boolean — Enable or disable agent mode. Default true; can be managed at the organization level.
- `chat.agent.maxRequests`: number — Maximum number of requests the agent can make per turn. Default 25.
- `chat.tools.terminal.autoApprove`: record<string, boolean> — Which terminal commands are auto-approved in agent mode; supports /regex/ keys. Dangerous commands (rm, curl, chmod, ...) default to false.
- `chat.tools.edits.autoApprove`: record<string, boolean> — Glob patterns for files that require approval before edits are applied.
- `chat.tools.global.autoApprove`: boolean — Auto-approve all tools (disables critical security protections). Default false; org-manageable.
- `chat.mcp.access`: boolean — Manage which MCP servers can be used. Org-manageable.
- `chat.mcp.discovery.enabled`: boolean — Auto-discover MCP server configuration from other applications. Default false.
- `chat.mcp.serverSampling`: object — Which models are exposed to MCP servers for sampling.
- `chat.useAgentsMdFile`: boolean — Use AGENTS.md files as always-on chat context. Default true.
- `chat.useClaudeMdFile`: boolean — Use CLAUDE.md files as always-on custom instructions. Default true.
- `chat.instructionsFilesLocations`: record<string, boolean> — Folders searched (recursively) for *.instructions.md files. Default includes .github/instructions.
- `chat.promptFilesLocations`: record<string, boolean> — Folders searched for .prompt.md files. Default includes .github/prompts.
- `chat.useAgentSkills`: boolean — Enable Agent Skills support. Default true.
- `chat.agentSkillsLocations`: record<string, boolean> — Folders searched for skills. Defaults include .github/skills, .claude/skills, ~/.copilot/skills, ~/.claude/skills.
- `chat.hookFilesLocations`: record<string, boolean> — Preview. Additional hook file locations (folders of *.json or individual files).
- `chat.agent.sandbox.enabled`: "off" | "on" | "allowNetwork" — Preview. Sandboxing for agent terminal commands (macOS/Linux). Sandboxed commands are auto-approved. Org-manageable.
- `github.copilot.enable`: record<string, boolean> — Enable or disable inline suggestions per language.
- `github.copilot.chat.codeGeneration.useInstructionFiles`: boolean — Automatically add .github/copilot-instructions.md to chat requests. Default true.
- `chat.disableAIFeatures`: boolean — Disable and hide all built-in AI features and the Copilot extensions.
- Standard VS Code settings precedence applies: user settings, then workspace .vscode/settings.json.
- Several agent settings (e.g. chat.agent.enabled, chat.mcp.access, chat.tools.global.autoApprove) can be managed centrally by organization policy.
- settings.json supports comments (JSONC).

Agent-related settings
```jsonc
{
  "chat.agent.maxRequests": 50,
  "chat.tools.terminal.autoApprove": {
    "npm test": true,
    "/^git (status|diff)/": true
  },
  "chat.useAgentsMdFile": true,
  "chat.instructionsFilesLocations": {
    ".github/instructions": true
  }
}

```

Source: https://code.visualstudio.com/docs/copilot/reference/copilot-settings
Checked: 2026-07-12

## Search, browser & identification

Not researched. Unknown does not mean unsupported.
