| name | copilot-agent-chat-implementation |
| description | Set up and validate GitHub Copilot Agent Chat files for VS Code. Use when creating or reviewing .github/copilot-instructions.md, .github/instructions/*.instructions.md, .github/prompts/*.prompt.md, .github/agents/*.agent.md, or .github/skills/<name>/SKILL.md. Covers correct paths, frontmatter schemas, naming conventions, discovery behaviour, and diagnostic checks for all five VS Code Copilot file types. |
Copilot Agent Chat Implementation
Use this skill when setting up repository structures and file schemas for .github/copilot-instructions.md, .github/instructions/*.instructions.md, .github/prompts/*.prompt.md, .github/agents/*.agent.md, and .github/skills/<skill>/SKILL.md.
File Type Reference
1. Always-On Instructions — .github/copilot-instructions.md
- Automatically applied to every chat request in the workspace
- No frontmatter required — plain Markdown
- Use for: coding standards, architecture decisions, library preferences, security requirements
2. Scoped Instructions — .github/instructions/*.instructions.md
Required frontmatter:
---
description: "Short description shown on hover"
applyTo: '**/*.py'
---
Applied when: a file matching applyTo is active, or when the description semantically matches the task.
3. Reusable Prompts — .github/prompts/*.prompt.md
Required frontmatter:
---
description: "What this prompt does"
agent: 'agent'
tools: ['search', 'edit', 'read', 'problems', 'execute']
argument-hint: "${input:myVariable}"
---
Invoked via /prompt-name slash command in Copilot Chat.
4. Custom Agents — .github/agents/*.agent.md
Required frontmatter:
---
description: "Agent specialisation description"
name: My Agent Name
tools: ['search', 'edit', 'execute', 'read', 'problems']
model: 'Claude Sonnet 4.5'
target: 'vscode'
infer: true
handoffs:
- label: "Review Security"
agent: security-review
---
Invoked via @agent-name in Copilot Chat.
5. Project Skills — .github/skills/<name>/SKILL.md
Required frontmatter:
---
name: skill-name
description: >
Detailed trigger description...
argument-hint: "[...]"
user-invokable: true
---
Directory Structure
.github/
├── copilot-instructions.md
├── instructions/
│ └── *.instructions.md
├── prompts/
│ └── *.prompt.md
├── agents/
│ └── *.agent.md
└── skills/
└── <skill-name>/
└── SKILL.md
Core Requirements
- Place always-on rules in
.github/copilot-instructions.md
- Place scoped rules in
.github/instructions/*.instructions.md with description and applyTo frontmatter
- Place reusable prompts in
.github/prompts/*.prompt.md with description, agent, tools
- Place custom agents in
.github/agents/*.agent.md with description, tools, model, target
- Place skills in
.github/skills/<skill-name>/SKILL.md with name matching directory, and description
Reliability Checks
- Use VS Code Chat Diagnostics (
Ctrl+Shift+P → "GitHub Copilot: Diagnostics") to verify loaded files
- Ensure
applyTo glob patterns match active files
- Ensure
name in SKILL.md frontmatter matches the parent directory name exactly
- Ensure agent
handoffs reference existing .agent.md filenames
- Keep descriptions explicit and keyword-rich so discovery triggers correctly
Common Failure Causes
| Symptom | Likely Cause |
|---|
| Skill not loading | name doesn't match directory name |
| Instructions not applying | applyTo glob doesn't match active file type |
| Agent handoff fails | Referenced agent file doesn't exist |
| Prompt not in / menu | File missing description frontmatter |
| Always-on instructions ignored | File not at exact path .github/copilot-instructions.md |