AI4AIOpen in AI4AI →
Tools · Docs

🧑‍✈️ GitHub Copilot

Always-current AI documentation · Verified 2026-06-11
TL;DR

• Three layers: inline completions, Copilot Chat, and agentic modes

• Multi-model — pick GPT, Claude, or Gemini variants in the chat

• Teach it your codebase with .github/copilot-instructions.md

The three layers

Completions (inline ghost text, Tab to accept) for flow; Chat (sidebar + inline Cmd/Ctrl+I) for understanding and targeted edits; agent mode + Copilot Edits for multi-file work. The skill is matching the layer to the task — completions for typing, chat for thinking, agents for multi-step jobs.

Chat: commands, participants, variables

Slash commands are tuned prompt macros: /explain, /fix, /tests, /doc, /optimize, /simplify, /new. Participants bring context+tools: @workspace/@codebase (repo retrieval), @terminal, @vscode, @github. Variables pin exact context: #file, #selection, #changes, #codebase, #fetch. Stack them: "@workspace #file:auth.ts how does session refresh work?"

Custom instructions

Repo-wide rules live in .github/copilot-instructions.md (committed, applies to every contributor). Path-scoped *.instructions.md files use an applyTo glob. Reusable *.prompt.md files are saved, runnable prompts. Write specific, imperative, checkable rules — "API handlers return Result<T>, never throw" beats "handle errors well".

Agents & the coding agent

Agent mode (in editor) runs an autonomous edit→run→test loop on a goal you set. The Copilot coding agent (on GitHub Actions) takes an assigned issue, works async, and opens a PR you review. Both demand scoping and review: a crisp, verifiable task in → mergeable result out; a vague one wanders.

Security & governance

Review every suggestion (it can confidently invent APIs). Use the public code filter (block matches to public code) and content exclusion (admins exclude sensitive files/repos). Run your usual security scanning on AI code. Business/Enterprise add policy management, audit logs, and knowledge bases.

Learn it properly

Take the related AI4AI course →
Open the live Docs Hub →
AI4AI — Academic Institute For Artificial Intelligence · Built by mAIb Tech · Courses · Docs · support@maib.io