Skip to content

Lab 086: Customize Copilot: Instructions, Prompt Files, Custom Agents, and SkillsΒΆ

Level: L200 Journey: copilot Time: ~60 min Cost: GitHub Free

Free-first design

Complete the guided exercise with Copilot Free or the included simulation. Paid features are optional and explicitly labeled.

AI Credit impact

Low for guided work; medium/high for agentic or repeated runs. Prefer automatic model selection, plan before acting, keep context focused, and avoid unnecessary parallel sessions.

What You'll LearnΒΆ

  • Choose the correct customization artifact
  • Scope path-specific instructions with applyTo
  • Design reusable prompt files, agents, and SKILL.md packages
  • Avoid duplicated or contradictory guidance

GH-300 alignmentΒΆ

Use Copilot features (25–30%). This mapping follows the GH-300 curriculum snapshot dated 2026-08-07. The official outline may retain older product wording such as β€œCopilot Edits”; this lab teaches the current product experience and calls out that difference.

Concept MapΒΆ

flowchart TD
  R[Always-on repository rule] --> I[copilot-instructions.md]
  P[Path-specific rule] --> PI[*.instructions.md + applyTo]
  W[Reusable user workflow] --> PF[Prompt file]
  A[Specialist persona] --> AG[*.agent.md]
  K[Portable capability] --> SK[SKILL.md]

Hands-on ExerciseΒΆ

Step 1: Create repository instructionsΒΆ

Add .github/copilot-instructions.md with the invariant rules every contribution must follow. Keep it short, testable, and repository-specific.

Step 2: Add scoped instructionsΒΆ

Create .github/instructions/python.instructions.md with frontmatter applyTo: "**/*.py". Put language-specific rules here instead of the global file.

Step 3: Package repeatable workΒΆ

Use a prompt file for a user-invoked workflow, a *.agent.md file for a specialist persona with tools, and SKILL.md for a portable capability with examples and resources.

Step 4: Resolve precedenceΒΆ

Inspect AGENTS.md and every matching instruction file. Remove duplicates, state conflicts explicitly, and keep tool permissions least-privileged.

Supporting kitΒΆ

The site build generates stable PDF and ZIP downloads. The ZIP contains the lab guide and every supporting file declared for this lab.