Guide · AutomationVerified 2 Nov 2026
Copilot ecosystem & automation
Turn Copilot into a team of specialised, repeatable workers. Below: the building blocks, three end-to-end workflows, and a library of 18 ready-to-use templates.
| Primitive | File | Use it for | Triggered by |
|---|---|---|---|
| Custom instructions | .github/copilot-instructions.md · AGENTS.md · .github/instructions/*.instructions.md | Always-on project rules: stack, conventions, how to validate. | Automatic (applyTo glob or description match) |
| Prompt files | .github/prompts/<name>.prompt.md | A repeatable task you run on demand. | Type /<name> in chat |
| Custom agents | .github/agents/<name>.agent.md | A persona with its own instructions, tool allow-list and handoffs. | Agent picker, handoff, or as a subagent |
| Agent skills | .github/skills/<name>/SKILL.md (+ scripts) | A packaged capability with scripts/resources, loaded only when relevant. | Auto-loaded by description, or /<name> |
| MCP servers | .vscode/mcp.json | Connect external systems: GitHub, databases, browsers, issue trackers. | Agent calls the tools |
| Hooks | Configured per harness | Deterministic commands at agent lifecycle events (e.g. format after edit). | Lifecycle event |
| Copilot coding agent | .github/workflows/copilot-setup-steps.yml | Fully background work: issue → branch → draft PR on GitHub Actions. | Assign an issue to Copilot |
Agent workflow blueprints
Each workflow combines the templates below. Copy the files, then follow the steps.
Background task: issue → pull request
- 1Write a well-scoped issue: goal, acceptance criteria, files to touch, how to test.
- 2Assign the issue to Copilot (GitHub.com, GitHub Mobile, VS Code, or the Agents panel).
- 3Copilot coding agent starts a session on GitHub Actions using copilot-setup-steps.yml.
- 4It pushes commits to a copilot/* branch and keeps a draft PR updated with progress.
- 5Review the PR, @mention Copilot in comments to iterate, then approve and merge.
Automated test generation loop
- 1Commit tests.instructions.md so every generated test follows your conventions.
- 2Select the Test Generator custom agent (or run /write-tests).
- 3The agent runs coverage → writes tests → runs them → repeats until the target.
- 4Checkpoints let you roll back any iteration you dislike.
- 5Open a PR; CI re-runs the suite as an independent check.
Two-layer PR review
- 1Before pushing, run the read-only PR Reviewer agent on your branch diff.
- 2Fix high-severity findings locally with agent mode.
- 3Open the PR and request Copilot as a reviewer for an independent pass.
- 4Copilot code review follows .github/copilot-instructions.md, so encode review rules there.
- 5A human reviewer approves — AI review supports, not replaces, ownership.
Reusable template library
Agents, prompt files, skills, instructions and MCP config. Every file here is included in the downloadable ZIP.
Drop into .github/agents/. Each agent narrows tools to what its role needs. Tool names vary by harness — use editor completions in the .agent.md file to confirm.
.github/agents/planner.agent.md
---
name: Planner
description: Research a change and produce an implementation plan without editing code
tools: ['read', 'search', 'web']
handoffs:
- label: Start implementation
agent: agent
prompt: Implement the plan above. Run tests after each step.
send: false
---
You are a senior engineer who plans before anyone writes code.
1. Restate the goal and list explicit assumptions.
2. Find every file, symbol and test affected (use search; cite paths).
3. Produce a numbered plan: step, files, risk, how to verify.
4. Call out open questions. Never modify files.Use it: Pick “Planner” in the agent dropdown, describe the change.
Terminal
# 1. Download the ZIP from the Download page, then:
unzip copilot-masterclass-templates.zip
# copy everything into your project
node copilot-masterclass-templates/scripts/install-templates.mjs ../my-app
# or only some groups, overwriting existing files
node copilot-masterclass-templates/scripts/install-templates.mjs ../my-app --only=agents,prompts --forceThen commit them
Grab the ZIP from Download templates. Once the files are in
.github/, everyone on the team — and Copilot coding agent — gets the same agents, prompts and skills. Run /agents, /prompts or /skills in VS Code chat to confirm they were discovered.