GitHub Copilot CLI Cheat Sheet
Commands
/terminal-setup configure terminal for multi-line support /allow-all This accepts max permissions into your system /model Lets user select model to use /add-dir Lets the CLI have access to view the contents of the directory /skills lists skills and lets you enable and disable each skill one by one /skills add
/plugin list will show all plugins currently loaded
/plugin install
/fleet Will allow for multiple agents to work at one time (will use more tokens)
/review
!
&
@ references files or agents to use
Skills — SKILL.md
Use for: reusable task packs with instructions, scripts, and resources
Front matter:
name— requireddescription— requiredlicense— optional
Notes:
- Copilot decides when to use the skill
- You can explicitly invoke by skill name in supported flows
Example:
---
name: db-migrator
description: Help with safe database schema migrations.
license: MIT
---
Instructions — repository-wide
.github/copilot-instructions.md
Use for: instructions that apply to the whole repo
Notes:
- Just write Markdown instructions
- Applies repo-wide
Example:
Prefer C# over VB.NET.
Run tests before proposing final changes.
Instructions — path-specific
.github/instructions/*.instructions.md
Use for: instructions scoped to certain files or folders
Front matter:
applyTo— requiredexcludeAgent— optional
excludeAgentvalues:code-reviewcoding-agent
Notes:
- If
excludeAgentis omitted, both code review and coding agent use the file applyTois for glob matching, not for skills or agents
Example:
- If
---
applyTo: "**/*.cs,**/*.vb"
excludeAgent: "code-review"
---
Agent instructions file
AGENTS.md
Use for: directory-level agent instructions
Front matter: none documented
Notes:
- GitHub documents support for
AGENTS.md - Treat it as plain Markdown unless GitHub later documents front matter for it
- GitHub documents support for
Custom agents
*.agent.md
Use for: defining a custom agent profile
Front matter:
description— requiredname— optionaltarget— optionaltools— optionalmodel— optionaldisable-model-invocation— optionaluser-invocable— optionalmcp-servers— optionalmetadata— optionalinfer— retired/deprecated in docs
Example:
---
name: security-reviewer
description: Review code for security issues.
target: github-copilot
tools:
- read
- search
- edit
---
tools: in custom agents
Portable aliases GitHub documents:
readsearcheditexecuteagentwebtodo
Also allowed:
- more specific tool names or aliases from the host environment
Examples of host-specific tool IDs:
read/problemsexecute/runTaskexecute/runInTerminalweb/fetch
Does field order matter?
No documented GitHub behavior depends on YAML field order
Best practice:
- put required fields first
- then optional config
- then the Markdown body
Tool list order is best treated as organizational, not behavioral
Fast rule of thumb
- Skill = reusable capability pack
- Repo instructions = whole-repo guidance
.instructions.md= path-scoped guidance viaapplyToAGENTS.md= directory-level plain instructions.agent.md= actual custom agent definition