Agent skill
github-copilot-cli-expert
Expert knowledge of GitHub Copilot CLI - installation, configuration, usage, custom agents, MCP servers, and version management. Use when asking about copilot cli, copilot commands, installing copilot, updating copilot, copilot features.
Install this agent skill to your Project
npx add-skill https://github.com/rysweet/amplihack/tree/main/amplifier-bundle/skills/github-copilot-cli-expert
SKILL.md
GitHub Copilot CLI Expert
Comprehensive knowledge of GitHub Copilot CLI - the terminal-native AI coding assistant.
Note: Command syntax and model availability may change. Run
/helpin Copilot CLI for current options.
Purpose
This skill provides expert guidance on:
- Installing and updating GitHub Copilot CLI
- All slash commands and keyboard shortcuts
- Custom agents, skills, and MCP server configuration
- Security, permissions, and trusted directories
- Integration with GitHub workflows (PRs, issues, Actions)
- Programmatic and interactive usage modes
Quick Reference
Installation (Pick One)
# Homebrew (macOS/Linux) - Recommended
brew install copilot-cli
# npm (all platforms, requires Node.js 22+)
npm install -g @github/copilot
# WinGet (Windows)
winget install GitHub.Copilot
# Install script (macOS/Linux)
curl -fsSL https://gh.io/copilot-install | bash
Update to Latest Version
# Homebrew
brew upgrade copilot-cli
# npm
npm update -g @github/copilot
# WinGet
winget upgrade GitHub.Copilot
# Check version
copilot --version
Before First Use
Requirements:
- Active GitHub Copilot subscription (Plans)
- Node.js 22+ (if installing via npm)
- PowerShell v6+ (Windows users)
Authentication:
# On first run, you'll be prompted to login
copilot
# Then: /login
# OR set environment variable
export GH_TOKEN="ghp_xxxxxxxxxxxx"
Essential Slash Commands
| Command | Description |
|---|---|
/help |
Show all commands and shortcuts |
/model |
Select AI model (claude-sonnet-4-5, gpt-5, etc.) |
/mcp |
Manage MCP server configuration |
/agent |
Browse and select custom agents |
/delegate |
Hand off task to Copilot coding agent on GitHub |
/compact |
Reduce context window usage |
/context |
Show token usage visualization |
/usage |
Display session metrics |
/diff |
Review changes made in session |
/share |
Export session to file or gist |
/skills |
Manage skills for enhanced capabilities |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
@file |
Include file contents in context |
!cmd |
Execute shell command directly |
Esc |
Cancel operation / exit prompt |
Ctrl+C |
Cancel / clear / exit |
Ctrl+L |
Clear screen |
Ctrl+O |
Expand/collapse timeline |
↑/↓ |
Navigate command history |
When to Use This Skill
Auto-triggers when user mentions:
- "copilot cli", "github copilot", "install copilot"
- "update copilot", "copilot version", "copilot commands"
- "mcp server", "custom agents", "copilot skills"
Explicitly invoke via:
Skill(skill="github-copilot-cli-expert")
Navigation Guide
When to Read Supporting Files
reference.md - Read when you need:
- Complete list of all slash commands with detailed options
- All command-line flags and environment variables
- Detailed security configuration (trusted directories, tool permissions)
- Programmatic mode examples and scripting patterns
- MCP server configuration JSON format
examples.md - Read when you need:
- Step-by-step workflow examples (PR creation, code review)
- Custom agent creation and invocation examples
- GitHub integration use cases (issues, Actions, PRs)
- Delegation to Copilot coding agent workflows
Core Capabilities
1. Interactive vs Programmatic Mode
Interactive (default):
copilot
# Then type prompts naturally
Programmatic (scripting):
copilot -p "Summarize recent commits" --allow-tool 'shell(git)'
2. Custom Agents
Built-in agents: explore, task, plan, code-review
Custom agent locations:
- User-level:
~/.copilot/agents/ - Repository:
.github/agents/ - Org/Enterprise:
.github-private/agents/
3. MCP Servers
GitHub MCP server included by default. Add more:
/mcp add
# Fill details, Ctrl+S to save
Config stored in: ~/.copilot/mcp-config.json
4. Security Model
- Trusted directories: Confirmed on first launch
- Tool approval: Required for file modifications
- Path permissions: Current directory + temp by default
- URL permissions: All URLs require approval
Common Patterns
Include Files in Prompts
Explain @config/settings.yml
Fix the bug in @src/app.js
Delegate to GitHub Agent
/delegate complete the API tests and create a PR
Resume Previous Session
copilot --resume # Cycle through sessions
copilot --continue # Resume most recent
Allow Tools Without Prompts
copilot --allow-all-tools
copilot --allow-tool 'shell(git)'
copilot --deny-tool 'shell(rm)'
Version Information
Current Version: Check with copilot --version
Prerelease Channels:
brew install copilot-cli@prerelease
npm install -g @github/copilot@prerelease
winget install GitHub.Copilot.Prerelease
Releases: https://github.com/github/copilot-cli/releases/
Troubleshooting
Authentication Issues
/login # In interactive mode
# Or use PAT with GH_TOKEN/GITHUB_TOKEN env var
Context Window Full
/compact # Summarize conversation
/context # View token usage
MCP Server Not Loading
/mcp show # List configured servers
/mcp edit [name] # Edit configuration
Tool Permission Denied
- Check trusted directories:
~/.copilot/config.json→trusted_folders - Use
--allow-all-pathsor--allow-all-urlsflags - Approve tools individually when prompted
First-Time Setup Issues
"Copilot not found" after install:
- Restart terminal after installation
- Check PATH includes install location
- Run
which copilot(Unix) orwhere copilot(Windows)
"No subscription" error:
- Verify at https://github.com/settings/copilot
- Ensure plan includes CLI access
- Try
/logoutthen/login
Related Skills
- mcp-manager: Advanced MCP server configuration
- agent-sdk: Building custom agents
- documentation-writing: Clear documentation practices
Official Resources
- Docs: https://docs.github.com/copilot/concepts/agents/about-copilot-cli
- Usage Guide: https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli
- Installation: https://docs.github.com/copilot/how-tos/set-up/install-copilot-cli
- Releases: https://github.com/github/copilot-cli/releases/
- Feedback: Use
/feedbackcommand in CLI
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
chemist-analyst
Analyzes events through chemistry lens using molecular structure, reaction mechanisms, thermodynamics, kinetics, and analytical techniques (spectroscopy, chromatography, mass spectrometry). Provides insights on chemical processes, material properties, reaction pathways, synthesis, and analytical methods. Use when: Chemical reactions, material analysis, synthesis planning, process optimization, environmental chemistry. Evaluates: Molecular structure, reaction mechanisms, yield, selectivity, safety, environmental impact.
learning-path-builder
Creates personalized learning paths for technologies, frameworks, or concepts. Use for user-interactive session only for onboarding new technologies, hackathon skill-building, or personal development planning. Not for use in automated development or investigation. Sequences resources (docs, tutorials, exercises) based on current skill level and learning goals. Adapts to learning style: hands-on, theory-first, project-based.
gh-work-report
Generates comprehensive GitHub activity reports across all authenticated accounts. Gathers repos, PRs, features, and themes for configurable time periods (1/5/7/30/90 days). Produces shareable markdown with tables, mermaid charts, and executive summaries. Can create a private repo with GitHub Actions automation and GitHub Pages aggregation site. Use when: "github report", "work report", "activity summary", "what did I work on", "gh-work-report", "show my github activity".
pr-review-assistant
Philosophy-aware PR reviews checking alignment with amplihack principles. Use when reviewing PRs to ensure ruthless simplicity, modular design, and zero-BS implementation. Suggests simplifications, identifies over-engineering, verifies brick module structure. Posts detailed, constructive review comments with specific file:line references.
code-smell-detector
Identifies anti-patterns specific to amplihack philosophy. Use when reviewing code for quality issues or refactoring. Detects: over-abstraction, complex inheritance, large functions (>50 lines), tight coupling, missing __all__ exports. Provides specific fixes and explanations for each smell.
biologist-analyst
Analyzes living systems and biological phenomena through biological lens using evolution, molecular biology, ecology, and systems biology frameworks. Provides insights on mechanisms, adaptations, interactions, and life processes. Use when: Biological systems, health issues, evolutionary questions, ecological problems, biotechnology. Evaluates: Function, structure, heredity, evolution, interactions, molecular mechanisms.
Didn't find tool you were looking for?