Copilot CLI Setup Audit
This skill audits a repository's GitHub Copilot CLI customization setup and provides actionable recommendations.
When to use this skill
- User asks to audit or review their Copilot setup
- User wants to optimize their CLI customization
- User asks "what's missing from my Copilot config?"
- Setting up a new project and want best-practice guidance
Audit Checklist
1. Custom Instructions
Check for existence and content of:
| File |
Location |
Purpose |
copilot-instructions.md |
.github/ |
Repository-wide instructions |
*.instructions.md |
.github/instructions/ |
Path-specific instructions |
AGENTS.md |
Root directory |
Agent instructions |
CLAUDE.md |
Root directory |
Cross-tool compatibility |
GEMINI.md |
Root directory |
Cross-tool compatibility |
Validate:
- YAML frontmatter is valid
applyTo globs match intended files (for scoped instructions)
- Instructions are specific and actionable, not vague
- No conflicting instructions between files
2. Custom Agents
Check for agents in:
| Location |
Type |
.github/agents/*.agent.md |
Repository-level |
.claude/agents/*.agent.md |
Alternative project-level |
~/.copilot/agents/*.agent.md |
User-level |
Validate:
description is present (required)
name is present (recommended)
tools list is explicit and minimal (security best practice)
target, if present, is either github-copilot or vscode
disable-model-invocation and user-invocable are intentional when present
mcp-servers, if present, uses the MCP configuration schema
- Prompt text is under 30,000 characters
3. Agent Skills
Check for skills in:
| Location |
Type |
.github/skills/*/SKILL.md |
Project skills |
.agents/skills/*/SKILL.md |
Alternative project skills |
.claude/skills/*/SKILL.md |
Alternative project skills |
~/.copilot/skills/*/SKILL.md |
Personal skills |
~/.agents/skills/*/SKILL.md |
Shared personal skills |
Validate:
name and description are present in frontmatter
- Description is specific enough for Copilot to decide when to load
- Skill directory name matches the
name field
- Optional
allowed-tools is narrow and does not pre-approve shell access without a clear reason
- Optional
user-invocable and disable-model-invocation fields match the intended invocation model
- Additional resources (scripts, examples) are referenced correctly
4. Hooks
Check for hooks in .github/hooks/*.json.
Validate:
- JSON is valid and uses
version: 1
- Hook events are intentional (
sessionStart, preToolUse, permissionRequest, notification, etc.)
- Command hooks use short timeouts and scoped working directories when possible
- HTTP hooks use HTTPS for security-sensitive events and avoid broad environment variable exposure
5. MCP Configuration
Check MCP configuration in:
| File |
Scope |
.github/mcp.json |
Repository |
.mcp.json |
Workspace |
~/.copilot/mcp-config.json |
User |
Validate:
- Valid JSON structure
- Built-in MCP servers are understood: GitHub, Playwright, fetch, and time
- Any additional MCP servers configured
- Tool filters are explicit (
tools) and do not expose more tools than needed
- Secrets are not committed; use environment expansion for sensitive values
- OAuth and
/mcp auth requirements are documented for remote servers
- OIDC is only enabled for servers designed to receive Copilot-issued identity tokens
filterMapping is intentional and safe for the server output shape
- Remote servers are trusted and comply with enterprise allowlists where applicable
6. Plugins
Check whether the repository relies on plugin-provided skills, agents, or commands.
Validate:
- Plugin usage is documented for collaborators
- Plugin-provided skills do not duplicate local project skills unless intentionally overridden
- Local customizations remain usable without private plugins when possible
7. Permission Policy
Check CLI permission defaults and documented automation patterns.
Validate:
- Automation examples use explicit
--allow-tool, --deny-tool, --allow-url, and --deny-url patterns
- Shell approvals are scoped, for example
shell(git:*), instead of blanket shell where possible
- Dangerous operations such as
git push, package publishing, or destructive filesystem commands are denied or gated
--allow-all / --yolo is documented only for trusted local use, not shared automation
8. Programmatic Usage
Check whether the repository documents scripted or CI use of Copilot CLI.
Validate:
- Prompt-mode examples use
copilot --prompt or -p
- Machine-readable output uses
--output-format=json when downstream parsing is expected
- Non-interactive runs define needed tool, path, and URL permissions up front
- Token guidance prefers
COPILOT_GITHUB_TOKEN and least-privilege fine-grained tokens
- Shared logs do not capture secrets, full prompts, or sensitive source snippets
9. OpenTelemetry Monitoring
Check whether monitoring is needed for team, CI, or enterprise usage.
Validate:
- OTel configuration is documented when agent usage must be observable
- OTel exporter variables such as
OTEL_EXPORTER_OTLP_ENDPOINT or COPILOT_OTEL_FILE_EXPORTER_PATH are intentional
- Content capture is disabled by default and only enabled in trusted environments
- Monitoring docs explain that traces can include agent turns, LLM calls, tool execution, token usage, and errors
10. Built-in Agents and Advanced Commands
Check whether built-in capabilities are documented before adding custom equivalents.
Validate:
- Built-in agents such as
explore, research, task, code-review, and general-purpose are considered
- Advanced commands such as
/pr, /delegate, /remote, /keep-alive, /undo, and /rewind are documented if used
- Experimental commands are marked as experimental where applicable
11. Alternative Command Format
Check for Claude-style command files if the repository uses cross-agent command workflows.
Validate:
.claude/commands/*.md files are documented as lower-priority command-style alternatives to skills
- Command files do not duplicate higher-priority project skills unless intentionally overridden
12. Project-Type Detection
Detect the project type from:
package.json → Node.js / JavaScript / TypeScript
requirements.txt / pyproject.toml → Python
go.mod → Go
Cargo.toml → Rust
*.csproj / *.sln → .NET
pom.xml / build.gradle → Java
Tailor recommendations to the detected project type.
Audit Report Format
## Copilot CLI Setup Audit Report
### ✅ What's Working Well
- [Specific positive findings]
### ⚠️ Warnings
- [Non-critical issues]
### ❌ Issues to Fix
- [Critical problems]
### 💡 Suggestions
- [Recommended improvements]
### Recommended Next Steps
1. [Priority-ordered actions]
Common Recommendations
For all projects
- Add
.github/copilot-instructions.md with project context, build commands, and testing approach
- Add
AGENTS.md at root with key conventions and architecture notes
- Create at least one custom agent for the project's primary workflow
For specific languages
TypeScript/JavaScript:
- Add
*.instructions.md with applyTo: "**/*.ts,**/*.tsx" for TS conventions
- Consider a skill for running/debugging tests
Python:
- Add instructions for virtual environment, linting (ruff/flake8), and type hints
- Consider a skill for package management (pip/poetry/uv)
Go:
- Add instructions for
go fmt, go vet, and module conventions
- Consider a skill for Go test patterns
Diagnostic Commands
Suggest the user run these in their Copilot CLI session:
/instructions # View which instruction files are loaded
/skills list # See available skills
/agent # See available agents
/env # Show loaded instructions, MCP servers, skills, agents, plugins, LSPs, and extensions
/mcp show # Check MCP server configuration
/plugin list # Check installed plugins
/usage # Review session usage metrics
/context # Inspect context window usage
1---2name: copilot-setup-audit3description: Audit a repository's Copilot CLI customization setup and suggest improvements. Use when the user wants to review their Copilot configuration, find gaps, validate agents, skills, instructions, hooks, plugins, or MCP setup, or optimize their CLI customization setup.4---56# Copilot CLI Setup Audit78This skill audits a repository's GitHub Copilot CLI customization setup and provides actionable recommendations.910## When to use this skill1112- User asks to audit or review their Copilot setup13- User wants to optimize their CLI customization14- User asks "what's missing from my Copilot config?"15- Setting up a new project and want best-practice guidance1617## Audit Checklist1819### 1. Custom Instructions2021Check for existence and content of:2223| File | Location | Purpose |24|------|----------|---------|25| `copilot-instructions.md` | `.github/` | Repository-wide instructions |26| `*.instructions.md` | `.github/instructions/` | Path-specific instructions |27| `AGENTS.md` | Root directory | Agent instructions |28| `CLAUDE.md` | Root directory | Cross-tool compatibility |29| `GEMINI.md` | Root directory | Cross-tool compatibility |3031**Validate:**3233- YAML frontmatter is valid34- `applyTo` globs match intended files (for scoped instructions)35- Instructions are specific and actionable, not vague36- No conflicting instructions between files3738### 2. Custom Agents3940Check for agents in:4142| Location | Type |43|----------|------|44| `.github/agents/*.agent.md` | Repository-level |45| `.claude/agents/*.agent.md` | Alternative project-level |46| `~/.copilot/agents/*.agent.md` | User-level |4748**Validate:**4950- `description` is present (required)51- `name` is present (recommended)52- `tools` list is explicit and minimal (security best practice)53- `target`, if present, is either `github-copilot` or `vscode`54- `disable-model-invocation` and `user-invocable` are intentional when present55- `mcp-servers`, if present, uses the MCP configuration schema56- Prompt text is under 30,000 characters5758### 3. Agent Skills5960Check for skills in:6162| Location | Type |63|----------|------|64| `.github/skills/*/SKILL.md` | Project skills |65| `.agents/skills/*/SKILL.md` | Alternative project skills |66| `.claude/skills/*/SKILL.md` | Alternative project skills |67| `~/.copilot/skills/*/SKILL.md` | Personal skills |68| `~/.agents/skills/*/SKILL.md` | Shared personal skills |6970**Validate:**7172- `name` and `description` are present in frontmatter73- Description is specific enough for Copilot to decide when to load74- Skill directory name matches the `name` field75- Optional `allowed-tools` is narrow and does not pre-approve shell access without a clear reason76- Optional `user-invocable` and `disable-model-invocation` fields match the intended invocation model77- Additional resources (scripts, examples) are referenced correctly7879### 4. Hooks8081Check for hooks in `.github/hooks/*.json`.8283**Validate:**8485- JSON is valid and uses `version: 1`86- Hook events are intentional (`sessionStart`, `preToolUse`, `permissionRequest`, `notification`, etc.)87- Command hooks use short timeouts and scoped working directories when possible88- HTTP hooks use HTTPS for security-sensitive events and avoid broad environment variable exposure8990### 5. MCP Configuration9192Check MCP configuration in:9394| File | Scope |95|------|-------|96| `.github/mcp.json` | Repository |97| `.mcp.json` | Workspace |98| `~/.copilot/mcp-config.json` | User |99100Validate:101102- Valid JSON structure103- Built-in MCP servers are understood: GitHub, Playwright, fetch, and time104- Any additional MCP servers configured105- Tool filters are explicit (`tools`) and do not expose more tools than needed106- Secrets are not committed; use environment expansion for sensitive values107- OAuth and `/mcp auth` requirements are documented for remote servers108- OIDC is only enabled for servers designed to receive Copilot-issued identity tokens109- `filterMapping` is intentional and safe for the server output shape110- Remote servers are trusted and comply with enterprise allowlists where applicable111112### 6. Plugins113114Check whether the repository relies on plugin-provided skills, agents, or commands.115116**Validate:**117118- Plugin usage is documented for collaborators119- Plugin-provided skills do not duplicate local project skills unless intentionally overridden120- Local customizations remain usable without private plugins when possible121122### 7. Permission Policy123124Check CLI permission defaults and documented automation patterns.125126**Validate:**127128- Automation examples use explicit `--allow-tool`, `--deny-tool`, `--allow-url`, and `--deny-url` patterns129- Shell approvals are scoped, for example `shell(git:*)`, instead of blanket `shell` where possible130- Dangerous operations such as `git push`, package publishing, or destructive filesystem commands are denied or gated131- `--allow-all` / `--yolo` is documented only for trusted local use, not shared automation132133### 8. Programmatic Usage134135Check whether the repository documents scripted or CI use of Copilot CLI.136137**Validate:**138139- Prompt-mode examples use `copilot --prompt` or `-p`140- Machine-readable output uses `--output-format=json` when downstream parsing is expected141- Non-interactive runs define needed tool, path, and URL permissions up front142- Token guidance prefers `COPILOT_GITHUB_TOKEN` and least-privilege fine-grained tokens143- Shared logs do not capture secrets, full prompts, or sensitive source snippets144145### 9. OpenTelemetry Monitoring146147Check whether monitoring is needed for team, CI, or enterprise usage.148149**Validate:**150151- OTel configuration is documented when agent usage must be observable152- OTel exporter variables such as `OTEL_EXPORTER_OTLP_ENDPOINT` or `COPILOT_OTEL_FILE_EXPORTER_PATH` are intentional153- Content capture is disabled by default and only enabled in trusted environments154- Monitoring docs explain that traces can include agent turns, LLM calls, tool execution, token usage, and errors155156### 10. Built-in Agents and Advanced Commands157158Check whether built-in capabilities are documented before adding custom equivalents.159160**Validate:**161162- Built-in agents such as `explore`, `research`, `task`, `code-review`, and `general-purpose` are considered163- Advanced commands such as `/pr`, `/delegate`, `/remote`, `/keep-alive`, `/undo`, and `/rewind` are documented if used164- Experimental commands are marked as experimental where applicable165166### 11. Alternative Command Format167168Check for Claude-style command files if the repository uses cross-agent command workflows.169170**Validate:**171172- `.claude/commands/*.md` files are documented as lower-priority command-style alternatives to skills173- Command files do not duplicate higher-priority project skills unless intentionally overridden174175### 12. Project-Type Detection176177Detect the project type from:178179- `package.json` → Node.js / JavaScript / TypeScript180- `requirements.txt` / `pyproject.toml` → Python181- `go.mod` → Go182- `Cargo.toml` → Rust183- `*.csproj` / `*.sln` → .NET184- `pom.xml` / `build.gradle` → Java185186Tailor recommendations to the detected project type.187188## Audit Report Format189190```markdown191## Copilot CLI Setup Audit Report192193### ✅ What's Working Well194- [Specific positive findings]195196### ⚠️ Warnings197- [Non-critical issues]198199### ❌ Issues to Fix200- [Critical problems]201202### 💡 Suggestions203- [Recommended improvements]204205### Recommended Next Steps2061. [Priority-ordered actions]207```208209## Common Recommendations210211### For all projects212213- Add `.github/copilot-instructions.md` with project context, build commands, and testing approach214- Add `AGENTS.md` at root with key conventions and architecture notes215- Create at least one custom agent for the project's primary workflow216217### For specific languages218219**TypeScript/JavaScript:**220221- Add `*.instructions.md` with `applyTo: "**/*.ts,**/*.tsx"` for TS conventions222- Consider a skill for running/debugging tests223224**Python:**225226- Add instructions for virtual environment, linting (ruff/flake8), and type hints227- Consider a skill for package management (pip/poetry/uv)228229**Go:**230231- Add instructions for `go fmt`, `go vet`, and module conventions232- Consider a skill for Go test patterns233234## Diagnostic Commands235236Suggest the user run these in their Copilot CLI session:237238```bash239/instructions # View which instruction files are loaded240/skills list # See available skills241/agent # See available agents242/env # Show loaded instructions, MCP servers, skills, agents, plugins, LSPs, and extensions243/mcp show # Check MCP server configuration244/plugin list # Check installed plugins245/usage # Review session usage metrics246/context # Inspect context window usage247```