Create VS Code file-based instructions (.instructions.md files). Use when asked to create, scaffold, or add file-based instructions for Copilot. Generates .instructions.md with YAML frontmatter and background knowledge content.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
This skill helps you scaffold VS Code file-based instructions (.instructions.md files) that provide background knowledge to Copilot about specific parts of the codebase. These files are applied automatically based on glob patterns or semantic matching, giving Copilot domain-specific context when working on matching files.
.github/copilot-instructions.md or AGENTS.md insteadBuild understanding of the area the instructions should cover. Identify:
If the scope is unclear or overlaps with existing instructions, ask the user for clarification.
Instructions files go in .github/instructions/ by default. Pick a descriptive filename:
.github/instructions/<topic>.instructions.mdExamples: csharp-style.instructions.md, query-pipeline.instructions.md, test-conventions.instructions.md
Create the file with the required YAML frontmatter header:
---
name: '<Display Name>' # Optional. Display name in the UI. Defaults to filename.
description: '<Short description>' # Optional. Shown on hover. Also used for semantic matching.
applyTo: '<glob pattern>' # Optional. Glob pattern relative to workspace root. Omit to require manual attachment or rely on semantic matching only.
---Common applyTo patterns:
**/*.cs — all C# filestest/** — files under a specific folderWrite concise, actionable Markdown content. Follow these principles:
Recommended sections (adapt as needed):
After creating the file, verify:
.github/instructions/ (or a configured instructions folder).instructions.md and only contains lowercase letters, numbers, and hyphensapplyTo glob matches the intended files.github/copilot-instructions.md or under .agents/skills/| Pitfall | Solution |
|---|---|
applyTo too broad | Use specific globs; ** applies to every file and wastes context |
Missing applyTo | Without it, instructions won't auto-apply — they require manual attachment or semantic matching via description |
| Vague guidance | Replace "write good tests" with something like "add both positive and negative test cases using [ConditionalFact] methods" |
61317c9
Also appears in
since Jul 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.