A practical, opinionated knowledge base for getting the most out of GitHub Copilot CLI and GitHub Copilot Chat. It focuses on two goals:
- Autonomous delivery — getting a project or task done end‑to‑end with minimal babysitting.
- Instruction following — making Copilot reliably do what you actually meant, the first time.
Everything here is distilled from the official GitHub Copilot documentation plus field-tested workflows. Sources are linked in
docs/references.md.
| If you want to… | Read this |
|---|---|
| Understand the tools & modes | docs/01-fundamentals.md |
| Get a task done autonomously | docs/02-autonomy.md |
| Make Copilot follow your instructions | docs/03-instruction-following.md |
| Learn the explore → plan → code → verify → commit loop | docs/04-workflows.md |
| Write great prompts | docs/05-prompting.md |
| Configure custom instructions, agents, skills, MCP | docs/06-customization.md |
| Grab copy‑paste commands | docs/07-cheatsheet.md |
| Avoid common mistakes | docs/08-antipatterns.md |
| Port a feature from a reference repo into your app | docs/09-port-feature-across-repos.md |
| Understand loop engineering and how it maps to Copilot CLI | docs/10-loop-engineering.md |
| See ready-to-use examples | examples/ |
To get a task done autonomously:
# 1. Plan first (models succeed more with a concrete plan)
copilot
> /plan Add OAuth2 login with Google + GitHub
# 2. Review/edit the plan, then hand it off
> Accept plan and build on autopilot # or press Shift+Tab into autopilot
# 3. Or run fully headless / in CI:
copilot --autopilot --yolo --max-autopilot-continues 15 \
-p "Implement the plan in plan.md, run tests, and fix failures"To make it follow instructions well:
- Create
.github/copilot-instructions.mdwith your build/test commands, code style, and workflow. - Keep instructions short, concrete, and non-conflicting.
- Use path‑specific
.github/instructions/*.instructions.mdfor language/folder‑specific rules. - State the acceptance criteria and verification command in every non‑trivial prompt.
See the working templates in examples/.
copilot-cli-knowledge/
├── README.md
├── docs/
│ ├── 01-fundamentals.md # tools, modes, keybindings
│ ├── 02-autonomy.md # autopilot, delegate, fleet, headless/CI
│ ├── 03-instruction-following.md # making Copilot do what you meant
│ ├── 04-workflows.md # end-to-end recipes
│ ├── 05-prompting.md # prompt patterns
│ ├── 06-customization.md # instructions, agents, skills, MCP, hooks
│ ├── 07-cheatsheet.md # commands & flags quick reference
│ ├── 08-antipatterns.md # what NOT to do
│ ├── 09-port-feature-across-repos.md # reference-repo → your-app port recipe
│ ├── 10-loop-engineering.md # the "loop engineering" term: origin, benefits, patterns
│ └── references.md # official doc links
└── examples/
├── instructions/ # drop-in .github/copilot-instructions.md + path-specific
├── agents/ # custom agent profile example
└── prompts/ # reusable prompt files & autonomous task briefs
This is a living document. When you discover a workflow that reliably improves autonomy or instruction‑following, add it to the relevant doc with a one‑line rationale. Keep entries concrete and copy‑pasteable.