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

adds skills from directory. This is usually to a folder /mcp list will show the list of MCP connections /mcp edit will let you edit the MCP /mcp add will prompt you through adding a new MCP server /mcp delete will remove existing MCP server connection /mcp disable will disable MCP to avoid usage during prompt /mcp enable will enable MCP to allow tools to be used during prompt

/plugin list will show all plugins currently loaded /plugin install adds a packaged set of skills, agents, MCP, and hooks /plugin uninstall removes packaged set of skills, agents, MCP, and hooks /agents will either list or let you add /instructions will let you toggle each specific instruction md file

/fleet Will allow for multiple agents to work at one time (will use more tokens)

/review Will run code review agent /undo, /rewind rewind the last turn and revert file changes

!

&

@ references files or agents to use

Skills — SKILL.md

  • Use for: reusable task packs with instructions, scripts, and resources

  • Front matter:

    • name — required
    • description — required
    • license — 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 — required
    • excludeAgent — optional
  • excludeAgent values:

    • code-review
    • coding-agent
  • Notes:

    • If excludeAgent is omitted, both code review and coding agent use the file
    • applyTo is for glob matching, not for skills or agents

    Example:

---
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

Custom agents

*.agent.md

  • Use for: defining a custom agent profile

  • Front matter:

    • description — required
    • name — optional
    • target — optional
    • tools — optional
    • model — optional
    • disable-model-invocation — optional
    • user-invocable — optional
    • mcp-servers — optional
    • metadata — optional
    • infer — 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:

    • read
    • search
    • edit
    • execute
    • agent
    • web
    • todo
  • Also allowed:

    • more specific tool names or aliases from the host environment
  • Examples of host-specific tool IDs:

    • read/problems
    • execute/runTask
    • execute/runInTerminal
    • web/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 via applyTo
  • AGENTS.md = directory-level plain instructions
  • .agent.md = actual custom agent definition