.agents/skills/copilot-vscode/SKILL.md
VS Code Copilot platform reference: .agent.md all frontmatter fields, built-in tool names, agent types, context engineering, subagents, handoffs, MCP config, SKILL.md integration, custom instructions. Load when working with custom agents, tool lists, context strategy, or any VS Code Copilot platform feature.
npx skillsauth add alexandrsurkov/forgentframework copilot-vscodeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Load when the task concerns custom agent files (
.agent.md), tool selection, context strategy, subagents, handoffs, MCP servers in VS Code, SKILL.md configuration, or any VS Code Copilot feature.Official documentation: https://code.visualstudio.com/docs/copilot GitHub source: https://github.com/microsoft/vscode-docs/tree/main/docs/copilot Use
#fetch <url>in chat to read any page listed in the index at the bottom of this skill.
.agent.md file.vscode/mcp.jsoncopilot-instructions.md.agent.md Frontmatter — All Valid Fields---
description: <string> # shown as placeholder in Chat input; one-sentence role summary
name: <string> # agent id; VS Code may infer from file name if omitted, but this repo sets it explicitly
tools: [<tool-name>, ...] # allowed tools — see Built-in Tool Names below
agents: [<agent-name>, ...] # allowed subagents; '*' = all, [] = none
model: <string | string[]> # model name or priority list; if omitted = user's current picker
user-invokable: <bool> # show in agents dropdown (default: true)
disable-model-invocation: <bool> # prevent being called as subagent (default: false)
argument-hint: <string> # hint text in chat input field
handoffs: # guided transitions to other agents
- label: <string> # button text
agent: <agent-name> # target agent id
prompt: <string> # pre-filled prompt for target
send: <bool> # auto-submit prompt (default: false)
model: <string> # model for the handoff (format: 'Model Name (vendor)')
target: vscode | github-copilot # deployment target (default: vscode)
---
Key rules:
name: and keep it identical to the file base name (kebab-case) to avoid drift.chat.agentFilesLocations includes .github/agents). If agents don't show up, verify discovery/diagnostics.user-invokable: false hides from dropdown but still allows subagent invocationdisable-model-invocation: true blocks subagent invocation but keeps it in dropdowninfer: fieldtools: List (Framework-Aligned)This framework standardizes on the tool names used in the canonical spec (e.g. readFile, fileSearch, textSearch).
VS Code/Copilot may expose additional tools depending on version/extension; when in doubt, consult the official “Agent tools reference”.
| Tool name | What it does |
|---|---|
| readFile | Read file contents |
| editFiles | Edit existing files |
| createFiles | Create new files |
| fileSearch | Search files by name/glob |
| textSearch | Full-text search across workspace |
| codebase | Optional: semantic workspace search (often invoked via #codebase) |
| usages | Optional: find symbol usages and references (if available) |
| Tool name | What it does |
|---|---|
| runTerminal | Run terminal commands |
| problems | Access Problems panel (linting, compiler errors) |
| changes | Access current source control changes |
| Tool name | What it does |
|---|---|
| fetch | Fetch URL content |
| webSearch | Web search |
| Tool name | What it does |
|---|---|
| agent | Required when using agents: field (spawn subagents) |
Tool sets: some Copilot versions support referencing predefined groups (e.g. #edit, #search). If unsupported, list tools explicitly.
MCP tools: reference as <server-name>/<tool-name> or <server-name>/* for all tools of a server.
Least-privilege rule (A1.6): give each agent only the tools required for its specific role. Critics: read-only only (
readFile,fileSearch,textSearch).
chat.tools.autoApprove)VS Code Copilot can require user confirmation for tool usage. The setting below can allow specific tools to run without prompting.
Architect guidance:
Threat model reminder (A1.6): tool auto-approval increases the blast radius of prompt injection and mis-scoped agent permissions.
toolsets.jsonc)Tool sets let you reference a named bundle of tools instead of listing each tool repeatedly.
This helps keep .agent.md files short and makes least-privilege reviews easier.
Architect guidance:
docs-readonly, repo-editor) and keep them stable.Note: some VS Code setups support a
toolsets.jsonc(or equivalent) config for named tool bundles. This ForgentFramework repo does not ship atoolsets.jsonc; treat this section as conceptual guidance. Use#fetchon the official docs index at the bottom of this skill when you need the precise schema and lookup rules.
| Type | Where it runs | When to use | |---|---|---| | Local — Agent | VS Code, interactive | Complex multi-file tasks, iterative work, needs editor/terminal context | | Local — Plan | VS Code, interactive | Breaking down complex tasks before implementation; generates structured plan | | Local — Ask | VS Code, interactive | Questions about codebase; read-only research | | Background agent | VS Code, background | Well-defined tasks while you keep working | | Cloud agent | GitHub, remote | Automated PRs, tasks requiring team collaboration, CI-style jobs | | Third-party agent | External provider / extension / service | When a non-Microsoft agent workflow is required (policy-approved), e.g., vendor-specific capabilities or integrations not available via built-in agents | | Custom agent | Local or cloud | Specialized persona: security reviewer, planner, architect, etc. |
Selection guide (architect-facing):
Pick the execution surface first:
Then pick the persona:
.agent.md)Use third-party agents only when necessary:
Quick decision checklist (copy into your recommendation):
What they are: child agents with isolated context windows. Main agent waits for result, receives only the summary — not the full subagent conversation.
When to use:
How to invoke in a prompt:
Use a subagent to research OAuth 2.0 patterns for Node.js. Return a recommendation.
In .agent.md:
tools: ['agent', 'readFile', 'fileSearch']
agents: ['forgent-docs-critic', 'forgent-process-critic'] # or '*' for all
Key properties:
user-invokable: false + subagent-only agents: used for internal pipeline stepsRef: https://code.visualstudio.com/docs/copilot/agents/subagents
Transition from one agent to another with context and a pre-filled prompt. Handoff buttons appear after a response completes.
handoffs:
- label: "Start Implementation"
agent: forgent-spec-editor
prompt: "Now implement the plan outlined above."
send: false # user reviews before submitting
- label: "Review Changes"
agent: forgent-process-critic
prompt: "Review the changes made in the previous step."
send: true # auto-submits
model: "Claude Sonnet 4.5 (copilot)"
Use for: plan → implement → review pipelines; multi-step workflows where human reviews each step.
.agent.mdcopilot-instructions.md + any *.instructions.md#-mentions — #file, #codebase, #web, #changes, etc.| #-mention | What it adds |
|---|---|
| #file:<path> | Specific file contents |
| #codebase | Semantic workspace search result |
| #changes | Current source control diff |
| #problems | Problems panel contents |
| #web | Web search result |
| #fetch <url> | URL content |
| #githubRepo <owner/repo> | GitHub repository search |
.gitignore files are excluded from index (unless opened)Ref: https://code.visualstudio.com/docs/copilot/reference/workspace-context
| | Custom instructions (copilot-instructions.md) | SKILL.md |
|---|---|---|
| Purpose | Coding standards, guidelines, always-on rules | Specialized capabilities, lazy-loaded knowledge |
| When loaded | Always (every chat interaction) | On-demand when relevant |
| Content | Instructions only | Instructions + scripts + examples + resources |
| Standard | VS Code-specific | Open standard (agentskills.io), portable |
| Location | .github/copilot-instructions.md | .github/skills/, .agents/skills/, ~/.copilot/skills/ |
Rule: keep copilot-instructions.md short (~300 words). Move domain-specific knowledge to SKILL.md.
VS Code searches for skills in:
.github/skills/<name>/SKILL.md.agents/skills/<name>/SKILL.md ← this repo's convention.claude/skills/<name>/SKILL.md~/.copilot/skills/<name>/SKILL.mdTo add more locations: configure chat.agentSkillsLocations in VS Code settings.
.vscode/mcp.json){
"servers": {
"<server-name>": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@scope/mcp-server"],
"env": { "API_KEY": "${input:api-key}" }
},
"<remote-server>": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": { "Authorization": "Bearer ${input:token}" }
}
},
"inputs": [
{ "id": "api-key", "type": "promptString", "description": "API Key", "password": true }
]
}
Key rules:
type: stdio — server runs in foreground, communicates via stdin/stdout (no -d for Docker)type: http — VS Code tries HTTP Stream transport first, falls back to SSE${input:...} — never hardcode credentials<server-name>/<tool-name> in tools: listsRef: https://code.visualstudio.com/docs/copilot/reference/mcp-configuration
.vscode/settings.json — Agent Registration{
"chat.agentFilesLocations": {
".github/agents": true // scan this folder for .agent.md files
},
"chat.agentSkillsLocations": [
".agents/skills" // additional SKILL.md search path
],
"chat.agent.enabled": true, // must be true for agent mode
"chat.tools.autoApprove": {} // per-tool auto-approval config
}
Architect guidance (minimal safe defaults):
chat.tools.autoApprove empty unless you have a clear reason and a documented safety boundary.customization/ DocsThis skill now includes explicit coverage for every page currently in:
https://github.com/microsoft/vscode-docs/tree/main/docs/copilot/customization
Upstream pages (folder contents):
overview.mdcustom-instructions.mdprompt-files.mdagent-skills.mdcustom-agents.mdhooks.mdlanguage-models.mdmcp-servers.mdDesign intent for multi-agent systems (A1.2): treat custom instructions as baseline constraints, prompt files as repeatable task macros, custom agents as tool-scoped personas, skills as portable capability packages, MCP as external tool surface, hooks as deterministic guardrails.
Use this as a decision table when designing your agent system.
| Goal | Prefer | Why |
|---|---|---|
| Enforce global repo conventions | Custom instructions | Always included; low operational overhead |
| Different rules per language/folder | File-based instructions | Scoped by applyTo patterns |
| Repeatable single task (“do X”) | Prompt file (.prompt.md) | Explicit invocation via /... |
| Multi-step capability + assets | Agent Skill (SKILL.md + resources) | Progressive disclosure + portability |
| Specialist persona + tool boundary | Custom agent (.agent.md) | Least-privilege tools per role |
| External API / DB / browser / SaaS | MCP server | Adds tool capabilities beyond VS Code built-ins |
| Deterministic enforcement / automation | Hooks | Executes code at lifecycle events; can block tools |
Prompt files vs custom agents:
/init can generate a starter .github/copilot-instructions.md tailored to the workspace; treat it as a draft to review..github/copilot-instructions.md.github/instructions/**/*.instructions.md (default)AGENTS.md (always-on instructions file supported by VS Code)
AGENTS.md is also the orchestrator repo map.CLAUDE.md (always-on for Claude-compat tooling).instructions.md frontmatter (key fields)applyTo: glob pattern relative to workspace root (use ** to apply to all)name, description: UI metadata; keep descriptions explicit so semantic matching workschat.instructionsFilesLocations — add extra folders for instructions discoverychat.useAgentsMdFile — enable/disable AGENTS.md detectionchat.useNestedAgentsMdFiles — nested AGENTS.md in subfolders (experimental)chat.includeApplyingInstructions — include pattern-matched instructions automaticallychat.includeReferencedInstructions — include instructions referenced via Markdown linksWhen multiple sources exist, higher priority generally wins:
Architect checklist (keep it effective and safe):
.prompt.md) — Slash Commands, Tools, Variables.github/prompts/**/*.prompt.mdprompts/ folderchat.promptFilesLocationsname, description, argument-hintagent: ask | agent | plan | <custom-agent-name>model: optional; falls back to pickertools: optional; can include MCP tools and <server>/*${workspaceFolder}, ${workspaceFolderBasename}${file}, ${fileBasename}, ${fileDirname}, ${fileBasenameNoExtension}${selection}, ${selectedText}${input:var} / ${input:var:placeholder}If both prompt + agent specify tools, effective tools follow:
Architect checklist:
SKILL.md (required) and optional resources/scripts./.name + description metadata is consideredSKILL.md is loaded when relevantuser-invokable: false → hidden from slash menu, still auto-loadabledisable-model-invocation: true → manual-only (no auto-load).github/skills/, .agents/skills/, .claude/skills/~/.copilot/skills/, ~/.agents/skills/, ~/.claude/skills/chat.agentSkillsLocationsArchitect checklist:
description like a classifier: capability + trigger phrases..agent.md) — Personas, Tools, Subagents, HandoffsThis skill already contains the complete .agent.md frontmatter field list,
agent type guidance, subagent and handoff patterns.
Add these customization-specific reminders:
.chatmode.md → .agent.md.agents: (subagents), ensure tools: includes agent.Hooks execute shell commands at lifecycle points and can block/ask/allow tool usage.
SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact,
SubagentStart, SubagentStop, Stop
.github/hooks/*.hook.jsonc.claude/settings.json, .claude/settings.local.json~/.claude/settings.jsonStop/SubagentStop “block” behavior, guard against infinite loops by respecting stop_hook_active.Agent mode may restrict model availability to tool-capable models.
Design implications:
model: in a custom agent when output consistency matters.Also relevant knobs:
inlineChat.defaultModel.This skill already includes a baseline .vscode/mcp.json schema example.
Add these operational/security essentials (A1.3 / LLM06):
mcp.json for team-shared config; user profile for personal tools.Use #fetch <url> to read any page for deep dives:
| Topic | URL |
|---|---|
| Core concepts (agent loop, context, models) | https://code.visualstudio.com/docs/copilot/core-concepts |
| All agent types overview | https://code.visualstudio.com/docs/copilot/agents/overview |
| Local agents (Agent/Plan/Ask) | https://code.visualstudio.com/docs/copilot/agents/local-agents |
| Subagents | https://code.visualstudio.com/docs/copilot/agents/subagents |
| Agent tools reference | https://code.visualstudio.com/docs/copilot/agents/agent-tools |
| Customization overview | https://code.visualstudio.com/docs/copilot/customization/overview |
| Custom agents (.agent.md) | https://code.visualstudio.com/docs/copilot/customization/custom-agents |
| Agent Skills (SKILL.md) | https://code.visualstudio.com/docs/copilot/customization/agent-skills |
| Custom instructions | https://code.visualstudio.com/docs/copilot/customization/custom-instructions |
| Prompt files (.prompt.md) | https://code.visualstudio.com/docs/copilot/customization/prompt-files |
| Hooks | https://code.visualstudio.com/docs/copilot/customization/hooks |
| Language models | https://code.visualstudio.com/docs/copilot/customization/language-models |
| MCP servers | https://code.visualstudio.com/docs/copilot/customization/mcp-servers |
| MCP config reference | https://code.visualstudio.com/docs/copilot/reference/mcp-configuration |
| Workspace context / #codebase | https://code.visualstudio.com/docs/copilot/reference/workspace-context |
| Context engineering guide | https://code.visualstudio.com/docs/copilot/guides/context-engineering-guide |
| Cheat sheet | https://code.visualstudio.com/docs/copilot/reference/copilot-vscode-features |
testing
TODO: one line describing the domain + explicit trigger phrases
development
Frontend skill pack: UI conventions, testing, build, and performance constraints
development
DevOps skill pack: CI/CD, environments, IaC, secrets policy, and observability
development
Backend skill pack: architecture, conventions, testing, and ops for the backend component