Skip to main content

GitHub Copilot Handbook

GitHub Copilot Handbook

Your guide to customizing and getting the most out of GitHub Copilot

Resources

Official VS Code documentation for GitHub Copilot features and customization.

ResourceSummary
Copilot Features Cheat SheetComplete reference: chat interfaces, inline suggestions, context controls, agents
Chat SessionsSession lifecycle, checkpoints, rollback, export as JSON or .prompt.md
Chat Context#-mentions, @-participants, workspace indexing, context window visualization
Chat ToolsBuilt-in, MCP, and extension tools; approval system, sandboxing, security
Smart Actions15 integrated actions: commits, PRs, merge conflicts, docs, tests, rename
Context Engineering GuideCurate context → create plans → generate code; project docs as AI memory
Prompt Engineering GuidePractical tips for effective prompts in inline suggestions and chat
Prompt Engineering for Copilot ChatGitHub official guide: effective prompts, examples, breaking down tasks, avoiding ambiguity
Copilot CLI Best PracticesStrategies for Copilot CLI: customization, planning, delegation, team workflows
Custom InstructionsAGENTS.md, copilot-instructions.md, /init for workspace-tailored guidelines
Customization OverviewLayers: instructions → skills → prompts → agents → MCP → model selection
Prompt Files.prompt.md templates with YAML frontmatter, dynamic variables, tool integration
Custom Agents.agent.md personas with handoff system, scoped tool access
Agent SkillsSKILL.md packages, progressive loading, portable via agentskills.io standard
SubagentsIsolated context windows for parallel tasks, token-efficient delegation
Agents TutorialLocal → Background → Cloud agents; planning-first approach
Background AgentsAutonomous CLI-based execution in Git worktrees, no supervision required

Study Guide

A structured learning path from fundamentals to advanced customization.

Phase 1: Understand the Platform

Start by learning what Copilot can do and how it processes context — this is the foundation everything else builds on.

  1. Copilot Features Cheat Sheet — Get oriented. Know what's available: chat views, inline suggestions, smart actions, context controls.
  2. Chat Sessions + Chat Context — Understand how sessions work and how Copilot gathers context. This is the mental model for everything that follows.
  3. Chat Tools — Learn the tool system (built-in, MCP, extensions) and approval model.
  4. Smart Actions — Built-in actions for commits, docs, tests, conflict resolution — use these before building custom solutions.

Phase 2: Context Engineering & Prompting

Key Insight

The single most important skill for effective AI-assisted development. Poor context = poor output.

  1. Context Engineering Guide — Official VS Code guide: curate context → create plans → generate code.
  2. Context Engineering — Manus-inspired principles: filesystem as memory, plan repetition, failure traces, cache optimization.
  3. 📺 Subagents: Parallel Execution and Context Isolation — How subagents enable isolated context windows for parallel tasks.
  4. AI Coding Best Practices — Plan architecture upfront, tell AI what NOT to do, use different modes strategically.
  5. Custom Instructions — Set up AGENTS.md and copilot-instructions.md; use /init to bootstrap workspace guidelines.
  6. Prompt Engineering Guide — Practical tips for writing effective prompts for inline suggestions and chat.
  7. Prompt Engineering for Copilot Chat — GitHub official guide: effective prompts, examples, breaking down complex tasks.
  8. Prompt Engineering — Comprehensive guide covering fundamentals, advanced reasoning strategies (CoT, ToT, AoT, Reflexion), and best practices.

Phase 3: Define Your Standards

Before automating anything, define what "good" looks like for your team.

  1. Coding Guidelines — C# patterns, code organization conventions.
  2. Coding Style — Formatting and naming conventions.
  3. Testing (xUnit) — Test patterns, fixtures, assertions.
  4. Git Messages — Commit message format and conventions.
  5. Code Review — Code review agent with prioritized feedback.

Phase 4: Automate with Customizations

Now encode your standards into reusable prompts, agents, and skills.

  1. Customization Overview — Understand the layering: instructions → skills → prompts → agents → MCP.
  2. Prompt Files — Learn .prompt.md format, then study handbook prompts:
  3. Custom Agents — Learn .agent.md format, then study handbook agents:
    • Debug — 4-phase systematic debugging
    • Research — Recursive exploration with source analysis
    • Differ — Git branch diff summaries
    • Spec Interview — Structured requirement gathering with plan handoff
    • Code Review — Prioritized review (Critical → Low)
  4. Agent Skills — Learn SKILL.md format, then study handbook skills:

Phase 5: Scale with Agents

Delegate complex, multi-step work to autonomous agents.

  1. Subagents — Isolated context for parallel delegation.
  2. Agents Tutorial — Build Local → Background → Cloud agent workflows.
  3. Background Agents — Autonomous execution in worktrees.
  4. Copilot CLI Best Practices — Strategies for CLI agent workflows: customization, planning, delegation.

Phase 6: Reflect & Iterate

Close the feedback loop. The best setups evolve continuously.

  1. Session Reflection — Meta-analysis of how work was done, not what was built.
  2. Use /reflect after complex sessions → accumulate insights → extract patterns into new instructions, prompts, or skills.

External Resources

awesome-copilot — A curated list of awesome resources for GitHub Copilot.