Copilot CLI
by @awalesagar
Reference knowledge base for GitHub Copilot CLI. Use when answering questions about Copilot CLI features, commands, configuration, plugins, hooks, skills, MC...
clawhub install copilot-cli-baseπ About This Skill
name: copilot-cli description: > Reference knowledge base for GitHub Copilot CLI. Use when answering questions about Copilot CLI features, commands, configuration, plugins, hooks, skills, MCP servers, custom agents, automation, or troubleshooting CLI workflows. Do NOT use for general Git/GitHub questions, VS Code Copilot Chat, or IDE-only Copilot features. license: MIT-0 compatibility: Designed for OpenClaw, Claude Code, GitHub Copilot, and compatible AgentSkills clients metadata: openclaw: emoji: "β¨οΈ" homepage: "https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli" os: ["darwin", "linux", "win32"] requires: bins: ["copilot"] install: - id: npm kind: node package: "@github/copilot" bins: ["copilot"] label: "Install via npm"
Copilot CLI Reference Skill
GitHub Copilot CLI is a terminal-native AI coding agent. This skill provides reference docs for all features, commands, and operational patterns.
When to Use
β USE this skill when:
β DON'T use this skill when:
Setup
Install: npm install -g @github/copilot (or via GitHub CLI extension)
Auth: copilot β trust directory β /login
Config: edit ~/.copilot/config.json directly (no copilot config set command)
See references/getting-started.md for full installation, authentication, and configuration details.
Quick Reference
Interactive: copilot β trust directory β /login β prompt
Programmatic: copilot -p "PROMPT" --yolo --no-ask-user -s
With permissions: copilot -p "PROMPT" --allow-tool='shell(git:*), write' --no-ask-user
Autopilot: copilot --autopilot --yolo --max-autopilot-continues 10 -p "PROMPT"
Custom agent: copilot -p "PROMPT" --agent=my-agent
Model override: copilot -p "PROMPT" --model claude-opus-4.6
Plan mode: Shift+Tab to cycle modes (standard/plan/autopilot)
Research: /research TOPIC β deep report with citations
Fleet: /fleet PROMPT β parallel subagent execution
Chronicle: /chronicle standup Β· tips Β· improve Β· reindex
Copilot CLI vs Claude Code
| Need | Copilot CLI | Claude Code | |------|-------------|-------------| | Rate-limited on Claude Code | β Use as fallback | β | | CI/CD automation | β Built-in Actions support | Limited | | Clean stdout (no PTY/ANSI) | β | β Better | | Long iterative reviews | β Better for many iterations | β |
See references/patterns-and-best-practices.md for the full decision matrix.
Key Gotchas
Automation:
-p (not -i) for automation β -i hangs--max-autopilot-continues=N in CI/CD to prevent runaway loopsOpenClaw Integration (programmatic exec):
EPIPE crashespty: true on exec calls to avoid output fragmentationtimeout: 120 minimum (MCP startup ~3s + inference ~25s+)--allow-all (or --yolo) for file write permissions in --no-ask-user mode copilot -p "" --no-ask-user --allow-all --max-autopilot-continues 3
# + exec options: pty=true, timeout=120
--add-dir flag grants access to specific directories without full --allow-allConfiguration:
--yolo does NOT skip folder trust β pre-trust in ~/.copilot/config.jsoncopilot config set β edit config JSON manuallyExperimental features:
/chronicle and history queries require --experimental or /experimental on/modelSee references/troubleshooting.md for all issues and fixes.
Quick Responses
| Question | Answer |
|----------|--------|
| How do I start Copilot CLI? | copilot (interactive) |
| How do I use it in CI/CD? | copilot -p "PROMPT" --yolo --no-ask-user -s |
| How do I create a custom agent? | See references/automation-and-delegation.md |
| How do I add an MCP server? | See references/customization.md |
| How do I research a topic? | /research TOPIC in interactive mode |
Reference Documents
Full index: references/index.md
| File | Contents |
|------|----------|
| getting-started.md | Installation, auth, config, permissions, env vars, plan mode overview |
| usage.md | Interactive & programmatic modes, 40+ slash commands, shortcuts, model selection, config settings, built-in agents |
| automation-and-delegation.md | CI/CD, GitHub Actions, autopilot, delegate, fleet, custom agent creation |
| customization.md | Custom instructions (combining), plugins, MCP servers, enterprise governance |
| hooks.md | Hook types (command + prompt), config, denial responses, PowerShell support |
| integrations.md | VS Code integration (diffs, sessions, selection), ACP server |
| research.md | /research reports with citations, /chronicle session history & insights |
| troubleshooting.md | Auth, rate limits, autopilot runaway, enterprise access, diagnostics |
| patterns-and-best-practices.md | Decision matrix, prompt engineering, anti-patterns |
All files in references/ directory.
β‘ When to Use
βοΈ Configuration
Install: npm install -g @github/copilot (or via GitHub CLI extension)
Auth: copilot β trust directory β /login
Config: edit ~/.copilot/config.json directly (no copilot config set command)
See references/getting-started.md for full installation, authentication, and configuration details.