vscode-copilot-instructions

Expert guidance for creating VSCode Copilot custom instructions, prompt files, and AGENTS.md files. Use when user wants to create, modify, or understand .github/copilot-instructions.md, .instructions.md, AGENTS.md, or .prompt.md files. Includes YAML frontmatter structure, variable syntax, tool references, and best practices for each file type.

16 stars

Best use case

vscode-copilot-instructions is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Expert guidance for creating VSCode Copilot custom instructions, prompt files, and AGENTS.md files. Use when user wants to create, modify, or understand .github/copilot-instructions.md, .instructions.md, AGENTS.md, or .prompt.md files. Includes YAML frontmatter structure, variable syntax, tool references, and best practices for each file type.

Teams using vscode-copilot-instructions should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/vscode-copilot-instructions/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/ai-agents/vscode-copilot-instructions/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/vscode-copilot-instructions/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How vscode-copilot-instructions Compares

Feature / Agentvscode-copilot-instructionsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Expert guidance for creating VSCode Copilot custom instructions, prompt files, and AGENTS.md files. Use when user wants to create, modify, or understand .github/copilot-instructions.md, .instructions.md, AGENTS.md, or .prompt.md files. Includes YAML frontmatter structure, variable syntax, tool references, and best practices for each file type.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# VSCode Copilot Custom Instructions & Prompt Files

Expert guidance for creating and managing VSCode Copilot customization files including custom instructions, prompt files, and agent configurations.

## When to Use This Skill

Activate this skill when:
- Creating `.github/copilot-instructions.md` files
- Building `.instructions.md` files with applyTo patterns
- Setting up `AGENTS.md` configurations
- Creating `.prompt.md` reusable prompts
- Configuring YAML frontmatter for any of these file types
- Understanding variable syntax (`${variable}`)
- Referencing tools (`#tool:toolName`) or files in instructions
- Troubleshooting instruction file activation issues
- Sharing custom instructions across teams or repositories

## Quick Overview: File Types

### 1. `.github/copilot-instructions.md`
**Always-on workspace instructions** — Applied automatically to all chat requests in the workspace.

**When to use**: General coding guidelines, team conventions, project-specific rules that apply throughout the project.

**Location**: `.github/copilot-instructions.md` at workspace root

**Example**:
```markdown
# Project Guidelines

- Use TypeScript for all new code
- Follow functional programming patterns
- Write tests using Jest
- API responses must use our standard error format
```

📄 **Complete Guide**: [references/copilot-instructions-guide.md](references/copilot-instructions-guide.md)

---

### 2. `.instructions.md` Files
**Conditional, targeted instructions** — Apply to specific file types, locations, or tasks using `applyTo` glob patterns.

**When to use**: Language-specific guidelines, framework-specific patterns, file-type-specific rules.

**Location**: `.github/instructions/` folder or user profile

**Example**:
```markdown
---
name: python-coding-standards
description: Python coding standards and best practices
applyTo: "**/*.py"
---

# Python Standards

- Follow PEP 8 style guide
- Use type hints for all functions
- Write docstrings using Google style
```

📄 **Complete Guide**: [references/instructions-files-guide.md](references/instructions-files-guide.md)

---

### 3. `AGENTS.md` File
**Multi-agent workspace instructions** — Useful when working with multiple AI agents, applied automatically like copilot-instructions.md.

**When to use**: When you work with multiple AI coding assistants and want unified instructions.

**Location**: Workspace root, or subfolders (experimental)

**Example**:
```markdown
# Agent Guidelines

All agents working in this codebase must:

- Never modify files in the `legacy/` directory
- Always run tests before committing
- Use the project's error handling utilities
```

📄 **Complete Guide**: [references/agents-md-guide.md](references/agents-md-guide.md)

---

### 4. `.prompt.md` Files
**Reusable, on-demand prompts** — Triggered via `/command` in chat for specific development tasks.

**When to use**: Standardized workflows, code generation templates, review checklists, common development tasks.

**Location**: `.github/prompts/` folder or user profile

**Example**:
```markdown
---
name: create-react-component
description: Generate a React component with TypeScript and tests
argument-hint: component-name
agent: edit
---

# Create React Component

Create a new React component named ${input:componentName} with:

1. TypeScript interface for props
2. Function component implementation
3. Jest test file with basic tests
4. Storybook story file

Follow our component patterns in [docs/component-guidelines.md](docs/component-guidelines.md).
```

📄 **Complete Guide**: [references/prompt-files-guide.md](references/prompt-files-guide.md)

---

## Decision Tree: Which File Type?

```
Do you want instructions that apply automatically?
├─ YES → Always-on for entire workspace?
│   ├─ YES → Use .github/copilot-instructions.md
│   └─ NO → Apply to specific files/patterns?
│       └─ Use .instructions.md with applyTo pattern
│
└─ NO → Want to trigger on-demand?
    └─ Use .prompt.md file (invoked via /command)
```

**Also consider**: Use `AGENTS.md` if working with multiple AI agents simultaneously.

---

## Common Elements Across All File Types

### YAML Frontmatter (Optional but Recommended)

All file types support YAML frontmatter for metadata:

```yaml
---
name: file-name-slug
description: What this file does
applyTo: "**/*.py"           # .instructions.md only
agent: edit                  # .prompt.md only
tools: [githubRepo, files]   # .prompt.md only
---
```

### Variable Syntax

Reference dynamic values in file bodies:

```markdown
- `${workspaceFolder}` — Workspace root path
- `${file}` — Currently open file path
- `${selection}` — Selected text
- `${input:variableName}` — User input from chat
- `${input:variableName:placeholder}` — With placeholder hint
```

📄 **Complete Reference**: [references/variables-and-references.md](references/variables-and-references.md)

### Tool References

Reference agent tools using special syntax:

```markdown
Use #tool:githubRepo to search the repository.
Use #tool:files to read workspace files.
```

### File References

Link to other workspace files using relative Markdown links:

```markdown
Follow the patterns in [docs/api-guide.md](docs/api-guide.md).
See [scripts/validate.py](scripts/validate.py) for examples.
```

---

## Reference Documentation

All detailed guides are in the `references/` folder:

- [**Copilot Instructions Guide**](references/copilot-instructions-guide.md) — `.github/copilot-instructions.md` complete reference
- [**Instructions Files Guide**](references/instructions-files-guide.md) — `.instructions.md` with applyTo patterns
- [**AGENTS.md Guide**](references/agents-md-guide.md) — Multi-agent workspace configuration
- [**Prompt Files Guide**](references/prompt-files-guide.md) — `.prompt.md` reusable prompts
- [**Variables & References**](references/variables-and-references.md) — All variable syntax and file referencing
- [**Best Practices**](references/best-practices.md) — Writing effective instructions
- [**Troubleshooting**](references/troubleshooting.md) — Common issues and solutions

---

## Template Files

Ready-to-use templates in `assets/templates/`:

- [copilot-instructions.template.md](assets/templates/copilot-instructions.template.md)
- [instructions-file.template.md](assets/templates/instructions-file.template.md)
- [agents.template.md](assets/templates/agents.template.md)
- [prompt-file.template.md](assets/templates/prompt-file.template.md)

---

## Quick Start Workflows

### Creating Always-On Instructions

```bash
# 1. Create .github directory if needed
mkdir -p .github

# 2. Create copilot-instructions.md
code .github/copilot-instructions.md

# 3. Add your guidelines
# 4. Enable in settings: github.copilot.chat.codeGeneration.useInstructionFiles
```

### Creating Conditional Instructions

```bash
# 1. Create instructions directory
mkdir -p .github/instructions

# 2. Create instruction file
code .github/instructions/my-rules.instructions.md

# 3. Add YAML frontmatter with applyTo pattern
# 4. Enable: chat.includeApplyingInstructions
```

### Creating Reusable Prompts

```bash
# 1. Create prompts directory
mkdir -p .github/prompts

# 2. Create prompt file
code .github/prompts/my-task.prompt.md

# 3. Use in chat: /my-task
```

---

## Settings to Enable

Ensure these VS Code settings are enabled:

```json
{
  // Enable copilot-instructions.md
  "github.copilot.chat.codeGeneration.useInstructionFiles": true,
  
  // Enable .instructions.md with applyTo patterns
  "chat.includeApplyingInstructions": true,
  
  // Enable AGENTS.md
  "chat.useAgentsMdFile": true,
  
  // Enable nested AGENTS.md in subfolders (experimental)
  "chat.useNestedAgentsMdFiles": false,
  
  // Show prompts as recommendations
  "chat.promptFilesRecommendations": true
}
```

---

## Key Best Practices

✅ **Keep Instructions Concise**: Each instruction should be a single, clear statement  
✅ **Use Specific Examples**: Show code examples of what you want  
✅ **Reference, Don't Duplicate**: Use Markdown links to existing docs  
✅ **Test Activation**: Verify instructions trigger correctly  
✅ **Layer Appropriately**: Use the right file type for the right scope

❌ **Avoid Vague Guidance**: "Write good code" → Instead: "Use functional components with TypeScript interfaces"  
❌ **Don't Overload**: Too many instructions reduce effectiveness  
❌ **Don't Forget Settings**: Instructions won't work without proper VS Code settings

📄 **Full Best Practices**: [references/best-practices.md](references/best-practices.md)

---

## Troubleshooting

**Instructions not applying?**

1. Check the file is in the correct location
2. Verify the relevant setting is enabled
3. Check YAML frontmatter syntax
4. For `.instructions.md`: verify `applyTo` glob pattern matches
5. View diagnostics: Right-click in Chat → Diagnostics

📄 **Full Troubleshooting Guide**: [references/troubleshooting.md](references/troubleshooting.md)

---

## Example Use Cases

### Use Case 1: Team Coding Standards
**Solution**: `.github/copilot-instructions.md` with always-on guidelines

### Use Case 2: Python-Specific Rules
**Solution**: `.instructions.md` with `applyTo: "**/*.py"`

### Use Case 3: Generate API Endpoint
**Solution**: `.prompt.md` with `/create-endpoint` command

### Use Case 4: Multiple AI Assistants
**Solution**: `AGENTS.md` at workspace root

---

## Community Resources

- [Official VSCode Docs](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
- [Prompt Files Docs](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
- [Awesome Copilot Repository](https://github.com/github/awesome-copilot/tree/main) — Community examples

---

**Remember**: Instruction files are most effective when they're specific, actionable, and well-organized. Start simple and iterate based on what works for your team.

Related Skills

copilot-sdk

16
from diegosouzapw/awesome-omni-skill

Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent. **PROACTIVE ACTIVATION**: Auto-invoke when building agentic applications or integrating Copilot SDK. **DETECTION**: Check for @github/copilot-sdk imports, copilot dependencies in package.json/pyproject.toml/go.mod. **USE CASES**: Embedding agents in apps, creating custom tools, implementing streaming, managing sessions, connecting to MCP servers.

awesome-copilot-root-typespec-create-agent

16
from diegosouzapw/awesome-omni-skill

Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot Use when: the task directly matches typespec create agent responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-mcp-m365-agent-expert

16
from diegosouzapw/awesome-omni-skill

Expert assistant for building MCP-based declarative agents for Microsoft 365 Copilot with Model Context Protocol integration Use when: the task directly matches mcp m365 agent expert responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-mcp-create-declarative-agent

16
from diegosouzapw/awesome-omni-skill

Skill converted from mcp-create-declarative-agent.prompt.md Use when: the task directly matches mcp create declarative agent responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

awesome-copilot-root-agent-governance

16
from diegosouzapw/awesome-omni-skill

Use when: the task directly matches agent governance responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.

github-copilot-cli-expert

16
from diegosouzapw/awesome-omni-skill

Expert knowledge of GitHub Copilot CLI - installation, configuration, usage, custom agents, MCP servers, and version management. Use when asking about copilot cli, copilot commands, installing copilot, updating copilot, copilot features.

email-copilot

16
from diegosouzapw/awesome-omni-skill

Manages inbox by learning preferences, cleaning noise, and prioritizing important work. Use when user asks about emails or inbox management.

additional-htmx-and-flask-instructions

16
from diegosouzapw/awesome-omni-skill

Provides additional instructions for HTMX and Flask, primarily related to templating.

github-copilot

16
from diegosouzapw/awesome-omni-skill

AI-powered coding assistant providing inline suggestions, chat interface, code review, and autonomous coding agent across IDEs and GitHub.com

github-copilot-sdk

16
from diegosouzapw/awesome-omni-skill

Comprehensive knowledge of GitHub Copilot SDK for embedding Copilot's agentic workflows in Python, TypeScript, Go, and .NET applications. Auto-activates for Copilot SDK integration, CopilotClient usage, session management, streaming responses, custom tools, and MCP server connections.

github-copilot-agent-tips-and-tricks

16
from diegosouzapw/awesome-omni-skill

Tips and Tricks for Working with GitHub Copilot Agent PRs

copilotkit-pitch-deck

16
from diegosouzapw/awesome-omni-skill

Production-ready CopilotKit pitch deck wizard in main application. Use when enhancing AI conversation features, optimizing Edge Function integration, debugging chat interface, or improving pitch deck generation flow. System is PRODUCTION READY (98/100).