/clearmust-know
Wipe accumulated conversation context without ending the session. Use before switching tasks or modules to prevent context bleed.
/cwdmust-know
Show or change Copilot's working directory scope. Critical for multi-repo setups — always confirm scope before letting Copilot modify files.
/add-dir <path>context
Grant Copilot read/write access to an additional directory beyond the CWD. Explicit; defaults to restricted access. Audit with /list-dirs before long sessions.
/list-dirscontext
Show all directories currently accessible to Copilot. Audit this before long-running sessions to confirm blast radius.
/list-filescontext
Browse files without navigating complex interfaces. Keyboard-driven; useful in headless/SSH environments.
/sessioncontext
Display or manage session state. Copilot maintains session persistence across reconnects — inspect what it remembers before continuing.
/resumenew
Return to a previous long-running session. Memory and compaction keep sessions from collapsing under their own history. Use after stepping away.
/changelognew
View recent Copilot CLI updates in-session. The CLI ships fast and muscle memory goes stale — check this after any update.
/updatenew
Update Copilot CLI to the latest version in-place. Run before starting a long session to avoid mid-task surprises.
/helpalways
List all available commands in the current session. The CLI evolves fast — prefer in-product help over docs after updates.
/exit printMay 2026
Print the full session transcript to the terminal before exiting. Useful for archiving or pasting into docs/PRs.
/rubber-duckMay 2026
Get an independent critique of the agent's current work — a second opinion mid-session without switching models or context.
! <command>must-know
Shell out: prefix any command with ! to run it in your session. Output lands directly in the conversation. Essential for logins, env checks, and one-off CLI tasks that don't fit a full prompt. Example: ! gcloud auth login.
/chronicle standupinsight
Generate a concise summary of the last 24 hours — grouped by completion status, tied to branches/repos, with PR/issue links. Append context to adjust: standup for the last 3 days.
/chronicle improveinsight
Analyzes your actual prompts, tools used, and features you haven't tried. Returns 3–5 personalized recommendations. Key use: when Copilot keeps making the same mistake — identify the pattern and generate custom instructions to fix it.
/chronicle tipsinsight
Surface personalized workflow tips derived from your session history — features you're underusing or patterns that could be optimized. Good Monday morning warmup.
/chronicle search <query>May 18 2026
Search all past session content by keyword or topic. Free-form questions also work at any time: Have I worked on the payments API?
/planagentic
Enter plan mode explicitly. Copilot drafts a structured implementation plan — compare approaches across models before committing. Models succeed more often when given a concrete plan first.
/fleetApr 2026
Break a complex request into independent subtasks and run them in parallel via subagents. Best for work with clean file/module boundaries and no circular dependencies. Uses a premium request multiplier — check /model first.
/taskagentic
Spawn a subtask agent manually (the primitive /fleet uses internally). Useful for explicit task decomposition when you want control over what runs in parallel.
/delegateagentic
Hand off the task to GitHub's cloud coding agent. Creates a branch, implements the change, opens a PR. Requires GitHub sign-in. Monitor and merge from github.com or GitHub Mobile.
/pragentic
View, create, and fix pull requests directly from Copilot CLI. Works via GitHub's native /mcp integration for full issue/branch/PR access without leaving the terminal.
/reviewagentic
Request a code review of your current diff or a PR. Flags bugs, perf issues, code quality, and style. Also available via gh copilot review in the GitHub CLI.
/remote onMay 2026
Enable remote control mid-session. Streams live to github.com or GitHub Mobile — steer mid-session, queue messages, approve permissions, respond to questions from your phone.
copilot --remoteMay 2026
Start a session with remote control enabled from the outset. Kick off from the terminal, then monitor, steer, and merge from anywhere.
/experimental showconfig
Opt into preview features as they ship. Gate-controlled per session. Run /changelog alongside to understand what just landed. Required to unlock /chronicle.
/modelmust-know
Switch models mid-session. Shows current model and its premium request multiplier. Check this before /fleet — multiplier scales with parallelism. Requires tool calling + streaming; 128k+ context window recommended.
/modelsconfig
List all models available to your account/plan. Copilot auto-selects by default; override here for agentic tasks that benefit from a larger context window.
/mcpmcp
Connect to or manage MCP servers in-session. GitHub's native /mcp server exposes issues, branches, and PRs — not just file edits. Add external MCP servers (Jira, Slack, Linear, etc.) for broader tool access.
/agentagentic
Switch to a custom agent defined in AGENTS.md or .github/agents/. Agents encapsulate instructions, tool access, and model preferences — persist across sessions and delegated work.
/skillsnew
List or invoke agent skills — reusable capability packages that add specialized instructions and tools. Define skills in a SKILL.md folder structure for consistent, repeatable behavior.
/user switchMay 2026
Switch GitHub account mid-session. Reuses the fetched user list and shows a loading spinner on first open. Useful on shared machines or multi-org setups.
Plan → Fleet → Delegate Pipeline
The layered CLI workflow for large tasks: plan in Shift+Tab plan mode, parallelize with /fleet for independent subtasks, then /delegate to the cloud agent for background completion and PR creation.
# 1. Drop into plan mode (Shift+Tab)
> Upgrade all gem minor versions in Gemfile
→ Copilot drafts plan, lists file impacts
# 2. Execute in parallel
> /fleet execute the plan
# 3. Send to cloud for PR
> /delegate open a PR with the results
→ Monitor at github.com or mobile
Custom Agent Definition
Define specialist agents in .github/agents/my-agent.agent.md (team) or ~/.copilot/agents/ (personal). Switch with /agent. Agents persist across sessions and delegated work.
---
name: CVE Scout
description: "Security review for gem updates"
tools: [read, search, web_search]
model: gpt-5.4
---
# Instructions
You are a security engineer reviewing Ruby gem updates.
1. Check rubysec/ruby-advisory-db for CVEs first
2. Review changelog between current and target version
3. Flag any method signature or behavior changes
4. Output: risk level + rollback SHA
Path-Scoped Instruction Files
Add .github/instructions/<area>.instructions.md with applyTo globs. This is a persistent context file that scopes what Copilot is allowed to touch — instructions only activate when Copilot is working on matching files, keeping changes contained and preventing scope creep across large or multi-platform repos. Commit alongside your copilot-instructions.md root file; the two layers compose.
# .github/instructions/openssl.instructions.md
applyTo: ["ext/openssl/**", "spec/openssl/**"]
rules:
- Target OpenSSL 3.2+ only; no 1.1.x compat shims
- All platform guards must cover: linux, darwin,
aix, solaris, windows-ucrt
- Do not modify vendor/ or submodule paths
- Flag any implicit RSA PKCS#1 v1.5 usage —
see CVE notes in SECURITY.md
# .github/instructions/ci.instructions.md
applyTo: [".github/workflows/**"]
rules:
- GitHub Actions only; no Buildkite syntax
- Ruby matrix: [3.1, 3.2, 3.3, 3.4]
- Cache keys must include lockfile SHA
/chronicle improve → Custom Instructions Loop
Run /chronicle improve after a frustrating session where Copilot kept missing the mark. It identifies the pattern in your prompt history and can draft additions to your copilot-instructions.md to fix it.
# After a bad session:
> /experimental on
> /chronicle improve
→ "You repeatedly corrected Copilot on
OpenSSL platform guards. Add this to
your instructions file:"
> append suggestion to .github/copilot-instructions.md
> /clear # fresh context with new rules
PR Evidence Prompt
After making a change, use this prompt to generate a complete PR body with test evidence, rollback instructions, and risk assessment.
Fill this PR template:
Summary: what changed and why
Files touched: <list>
Tests/Evidence:
- Command + output summary
- Before/after if perf or behavior changed
Risk & Rollback:
- Risk: low/medium/high + rationale
- Rollback: git revert <SHA> or flag off