Skip to content

Commit 318bc31

Browse files
rysweetUbuntuclaude
authored
feat: Add comprehensive GitHub Copilot CLI skill (#2130)
* feat: Add comprehensive GitHub Copilot CLI skill Resolves #2129 This skill provides expert knowledge about GitHub Copilot CLI: - Installation methods (WinGet, Homebrew, npm, install script) - Authentication (browser login, PAT tokens) - All slash commands and keyboard shortcuts - MCP server configuration - Skills system and creation - Custom agents setup - Custom instructions files - Permissions system - Environment variables reference - Troubleshooting common issues Skill structure follows progressive disclosure pattern: - SKILL.md (~1,248 tokens): Quick reference, core concepts - reference.md (~2,815 tokens): Complete technical reference - examples.md (~2,685 tokens): Practical usage examples Co-authored-by: Claude <claude@anthropic.com> * fix: Remove invalid JSON comment from MCP example Addresses code review feedback - JSON doesn't support comments, so replaced API_KEY example with generic MY_ENV_VAR placeholder. --------- Co-authored-by: Ubuntu <azureuser@amplihack-dev.ftnmxvem3frujn3lepas045p5c.xx.internal.cloudapp.net> Co-authored-by: Claude <claude@anthropic.com>
1 parent 9bea160 commit 318bc31

File tree

3 files changed

+1301
-0
lines changed

3 files changed

+1301
-0
lines changed
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
---
2+
name: github-copilot-cli
3+
version: 1.0.0
4+
description: Expert knowledge of GitHub Copilot CLI - installation, configuration, usage, MCP servers, skills, custom agents, and troubleshooting. Use when asking about copilot cli, installing copilot, gh copilot, copilot commands, MCP setup, or copilot extensibility.
5+
source_urls:
6+
- https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli
7+
- https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli
8+
- https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli
9+
- https://docs.github.com/en/copilot/concepts/agents/about-agent-skills
10+
---
11+
12+
# GitHub Copilot CLI Expert
13+
14+
**Comprehensive knowledge of GitHub Copilot CLI installation, configuration, usage, and extensibility.**
15+
16+
## Purpose
17+
18+
This skill provides expert guidance on:
19+
20+
1. Installing and updating GitHub Copilot CLI
21+
2. Authentication and configuration
22+
3. Core usage patterns and slash commands
23+
4. Extensibility (MCP servers, skills, custom agents)
24+
5. Troubleshooting common issues
25+
26+
## When I Activate
27+
28+
Automatically when you mention:
29+
30+
- "copilot cli", "github copilot cli", "gh copilot"
31+
- "install copilot", "update copilot"
32+
- "copilot commands", "copilot slash commands"
33+
- "copilot mcp", "add mcp server"
34+
- "copilot skills", "create copilot skill"
35+
- "copilot custom agent"
36+
37+
## Quick Reference
38+
39+
### Installation (All Platforms)
40+
41+
**Always fetch latest version** - use these commands:
42+
43+
| Platform | Command |
44+
| ---------------------- | -------------------------------------------------- |
45+
| Windows (WinGet) | `winget install GitHub.Copilot` |
46+
| macOS/Linux (Homebrew) | `brew install copilot-cli` |
47+
| All (npm, Node.js 22+) | `npm install -g @github/copilot` |
48+
| macOS/Linux (Script) | `curl -fsSL https://gh.io/copilot-install \| bash` |
49+
50+
**Prerelease versions**: Add `@prerelease` or use `GitHub.Copilot.Prerelease`
51+
52+
### Authentication
53+
54+
```bash
55+
copilot # Launch and follow /login prompt
56+
# OR use PAT with "Copilot Requests" permission:
57+
export GH_TOKEN=your_token
58+
```
59+
60+
### Essential Slash Commands
61+
62+
| Command | Purpose |
63+
| -------------------- | ------------------------------------------------ |
64+
| `/help` | Show all commands and shortcuts |
65+
| `/model` | Select AI model (Claude Sonnet 4.5, GPT-5, etc.) |
66+
| `/agent` | Browse and select available agents |
67+
| `/skills` | Manage skills |
68+
| `/mcp` | Manage MCP server configuration |
69+
| `/delegate [prompt]` | Hand off to Copilot coding agent (creates PR) |
70+
| `/compact` | Reduce context window usage |
71+
| `/context` | Show token usage visualization |
72+
73+
### Keyboard Shortcuts
74+
75+
| Shortcut | Action |
76+
| -------- | ----------------------------------- |
77+
| `@` | Mention files to include in context |
78+
| `!` | Execute shell command directly |
79+
| `Esc` | Cancel current operation |
80+
| `Ctrl+C` | Cancel / clear / exit |
81+
| `Ctrl+L` | Clear screen |
82+
| `Ctrl+O` | Expand/collapse timeline |
83+
84+
### Extensibility Overview
85+
86+
1. **MCP Servers** - Extend Copilot with external tools
87+
2. **Skills** - Task-specific instructions and scripts
88+
3. **Custom Agents** - Specialized agent profiles
89+
4. **Custom Instructions** - Repository-wide guidance
90+
91+
## Navigation Guide
92+
93+
### When to Read Supporting Files
94+
95+
**reference.md** - Read when you need:
96+
97+
- Complete slash command reference with all options
98+
- Detailed MCP server configuration and JSON schema
99+
- Full permissions system documentation
100+
- Advanced configuration options
101+
- Environment variables reference
102+
103+
**examples.md** - Read when you need:
104+
105+
- Step-by-step installation walkthroughs
106+
- Working MCP server configurations
107+
- Skill creation examples
108+
- Custom agent examples
109+
- Real-world usage scenarios
110+
111+
## Core Concepts
112+
113+
### MCP Servers (Model Context Protocol)
114+
115+
Copilot CLI includes GitHub MCP server by default. Add custom MCP servers:
116+
117+
```bash
118+
/mcp add # Interactive configuration
119+
/mcp show # List configured servers
120+
/mcp edit <name> # Modify existing server
121+
```
122+
123+
Config stored in: `~/.copilot/mcp-config.json`
124+
125+
### Skills
126+
127+
Skills enhance Copilot's task performance with instructions and scripts.
128+
129+
**Locations**:
130+
131+
- Project: `.github/skills/` or `.claude/skills/`
132+
- Personal: `~/.copilot/skills/` or `~/.claude/skills/`
133+
134+
**Structure**:
135+
136+
```
137+
.github/skills/my-skill/
138+
└── SKILL.md # Instructions with YAML frontmatter
139+
```
140+
141+
### Custom Agents
142+
143+
Specialized agent profiles stored as Markdown files.
144+
145+
**Locations**:
146+
147+
- User: `~/.copilot/agents/`
148+
- Repository: `.github/agents/`
149+
- Organization: `.github-private/agents/`
150+
151+
### Custom Instructions
152+
153+
Repository-specific guidance for Copilot:
154+
155+
- `.github/copilot-instructions.md` - Repository-wide
156+
- `.github/instructions/**/*.instructions.md` - Path-specific
157+
- `AGENTS.md` - Agent behavior instructions
158+
159+
## Troubleshooting Quick Tips
160+
161+
| Issue | Solution |
162+
| ---------------------- | -------------------------------------------------------- |
163+
| Not installed | `brew install copilot-cli` or `npm i -g @github/copilot` |
164+
| Not authenticated | Run `/login` in Copilot CLI |
165+
| Policy disabled | Check org/enterprise Copilot settings |
166+
| MCP server not loading | Verify `~/.copilot/mcp-config.json` syntax |
167+
| Skill not activating | Restart Copilot CLI, check SKILL.md YAML |
168+
169+
---
170+
171+
**Version**: 1.0.0 | **Status**: Public Preview
172+
**Note**: GitHub Copilot CLI is in public preview and subject to change.

0 commit comments

Comments
 (0)