Technical Reference

Frontmatter specs, compatibility matrices, MCP tool naming, and debugging playbook

Discovery

File Discovery Matrix

Which platform reads which files.

File / FolderClaude CodeVS Code Copilot
.claude/agents/*.mdYesYes
.github/agents/*.agent.mdNoYes
.claude/skills/*/SKILL.mdYesYes
.claude/rules/*.mdYesYes
.github/instructions/**/*.instructions.mdNoYes (recursive since v1.111)
CLAUDE.mdYesYes (via setting)
AGENTS.mdNoYes
.mcp.jsonYesNo
.vscode/mcp.jsonNoYes

Cross-Platform Rule

VS Code reads Claude’s formats. Claude does NOT read VS Code’s formats. Shared agents go in .claude/agents/. Shared skills go in .claude/skills/.

Frontmatter

Skill Frontmatter Spec

Every field a skill can use, with platform compatibility.

FieldRequiredClaude CodeCopilot CLI
nameYesSlash command nameSlash command name
descriptionYesAuto-invocation matchingHelp text
argument-hintNoUI placeholderUI placeholder
context: forkNoIsolated subagentIgnored (runs inline)
agentNoSubagent type for forkIgnored
disable-model-invocationNoPrevent auto-invokeSupported
Frontmatter

Agent Frontmatter Spec

Full field comparison across both platforms.

FieldClaude CodeCopilot
namekebab-casePascalCase
toolsComma string: Read, Glob, BashYAML list: [read, search, execute]
modelAlias: sonnet, opusFull string or array (fallback chain)
memoryproject / user / localNot supported
isolationworktreeNot supported
agentsN/ASubagent restriction list
handoffsN/AWorkflow navigation buttons
hooksSupported (settings.json + frontmatter)Frontmatter only (v1.111+ preview)
user-invocableN/AControls visibility in agent picker
maxTurnsNumberIgnored
permissionModeStringIgnored
Max bodyNo limit30,000 characters
MCP

MCP Tool Naming

Getting tool names right is critical -- wrong prefixes cause silent failures.

ContextFormatExample
Claude Code (project-level)mcp__<server>__<tool>mcp__ado__wit_get_work_item
Claude Code (plugin)mcp__plugin_<plugin>_<server>__<tool>mcp__plugin_dx-aem_AEM__getNodeContent
Copilot<server>/<tool>ado/wit_get_work_item

Plugin MCP Prefix

MCP servers in a plugin’s .mcp.json get the full prefix: mcp__plugin_<plugin-name>_<server>__<tool>. Using the shorthand (mcp__AEM__ instead of mcp__plugin_dx-aem_AEM__) causes “tool not found” failures.

Copilot Tool Alias Mapping

Copilot AliasClaude Code Equivalent
execute / shellBash
readRead
editEdit, Write
searchGrep, Glob
agentTask (Agent tool)
webWebSearch, WebFetch
Hooks

Hook System

Platform-separated hook architecture -- no overlap, no double-firing.

Hook SourceActive In
Plugin hooks/hooks.jsonClaude Code CLI only
.github/hooks/hooks.jsonCopilot CLI only (v1.0.10+)
Agent frontmatter hooks:VS Code Chat only (v1.111+)

Hook Events

Pre-Tool Hooks

PreToolUse fires before any tool invocation. Use to block dangerous operations or modify input. The branch-guard hook blocks commits on protected branches.

Post-Tool Hooks

PostToolUse fires after tool completion. Use for auto-formatting, logging, or result processing. PostToolUseFailure fires on tool errors.

All Supported Events

EventWhenUse Cases
PreToolUseBefore tool invocationBlock dangerous ops, modify input
PostToolUseAfter tool completesFormatters, logging
UserPromptSubmitUser submits promptAudit, inject context
SessionStartSession beginsContext setup
SubagentStart / StopSubagent lifecycleTracking, result processing
StopAgent finishesCleanup
Debug

Debugging Playbook

Common issues and how to fix them.

Skill Not Found

  1. Check file is at correct skills path
  2. Verify name: in frontmatter matches what you are typing
  3. Check description: contains trigger phrases for auto-invocation
  4. Verify no trailing spaces on --- delimiters

MCP Tools Not Available

  1. Check server is running
  2. Verify config in .mcp.json or .claude/settings.json
  3. If agent, check that tools: is NOT set (blocks MCP inheritance)
  4. Run ToolSearch(“+servername”) to load deferred tools

Copilot Agent Not Appearing

  1. File must have .agent.md extension
  2. Must be in .github/agents/ directory
  3. Check user-invokable: is not false
  4. Restart VS Code after adding new agents
  5. Use /troubleshoot to inspect loaded customizations

Deferred vs Pre-loaded MCP

  1. If tools: is omitted, MCP tools are deferred — must ToolSearch before calling
  2. If tools: lists MCP tools explicitly, they are pre-loaded — ToolSearch returns nothing
  3. Always try calling the tool directly first, fall back to ToolSearch

The #2 Gotcha: ToolSearch False Negatives

If an agent has MCP tools explicitly listed in tools:, those tools are pre-loaded and ToolSearch will return nothing for them. This leads agents to wrongly conclude MCP is unavailable. Always try calling the tool directly first.

Settings

Settings Reference

Configuration file hierarchy and key fields.

File Hierarchy (highest priority first)

PriorityLocation
1 (highest)Enterprise managed settings
2~/.claude/settings.json (user)
3.claude/settings.json (project)
4 (lowest).claude/settings.local.json (local, gitignored)

Permission Modes

ModeBehavior
defaultPrompts on first use of each tool
acceptEditsAuto-accepts file edits, prompts for other tools
planRead-only, no modifications allowed
dontAskAuto-denies unless pre-approved via permissions
bypassPermissionsSkips all prompts (isolated environments only)
Docs

External References

Official documentation for both platforms.

Claude Code

KAI by Dragan Filipovic