Skip to main content

Creating Instructions

Folder: .github/skills/tsh-creating-instructions/ Used by: Copilot Engineer

Covers repository-level instructions (copilot-instructions.md) and granular file-based instructions with applyTo glob patterns. Provides templates and a decision framework for instruction vs. skill placement.

Instruction Types

AspectRepository-levelGranular custom
File.github/copilot-instructions.md*.instructions.md
Count per repoExactly oneMultiple
FrontmatterNot requiredRecommended (applyTo, name, description)
Applied whenEvery Copilot interactionFiles matching applyTo pattern are in context
Location.github/copilot-instructions.md.github/instructions/ folder
PurposeProject constitution — architecture, stack, fundamental rulesScoped conventions — file-type or domain-specific rules

Decision Framework: Instructions vs. Skills

Content TypeBelongs In
Always-applied project conventionsInstructions
File-type-specific coding standardsGranular instructions with applyTo
Reusable multi-step workflowsSkills
Domain-specific knowledge and templatesSkills
Workflow triggers and task definitionsPrompts

Key Guidelines

  • Repository-level instructions are the "constitution" — the first file any developer or AI agent should read.
  • Granular instructions use applyTo glob patterns to automatically apply when matching files are in context.
  • Instructions must NOT trigger workflows (prompt territory) or define agent behavior (agent territory).

Validation Checklist

  • Correct file location (.github/copilot-instructions.md or .github/instructions/)
  • applyTo pattern is valid and scoped appropriately (granular only)
  • No workflow steps (skill territory)
  • No personality or behavioral content (agent territory)
  • Content is concise and focused on conventions/constraints

Connected Skills

  • tsh-creating-agents — For understanding how agents consume instructions.
  • tsh-creating-skills — For deciding whether content belongs in instruction vs. skill.