Two GitHub Copilot CLI skills for setting up and maintaining a best-practice GitHub Copilot Coding Agent configuration, distributed as a Copilot CLI plugin.
/gc-config-init bootstraps a lean configuration for a new or unconfigured project — creating copilot-instructions.md, path-specific instruction files, copilot-setup-steps.yml, and AGENTS.md where applicable.
/gc-config-optimize audits and improves an existing Copilot configuration against current best practices — checking for the 8,000-character limit, anti-patterns, missing sections, consistency between files, and accumulated learnings.
Both skills are grounded in the official GitHub Copilot Coding Agent documentation and research on agent instruction design.
- gc-config
GitHub Copilot's Coding Agent reads configuration from several sources — a global instructions file, path-specific instruction files, a setup workflow, and AGENTS.md. Without guidance, these files tend to accumulate noise: personality instructions, file-by-file descriptions, rules that a linter already enforces, and content that blows past the 8,000-character limit without warning.
These skills take a different approach:
-
/gc-config-initcreates the minimum viable configuration that's correct from day one: a focusedcopilot-instructions.md(under the character limit), path-specific instruction files scoped with correctapplyToglobs, and a properly structuredcopilot-setup-steps.ymlif a build system is detected. -
/gc-config-optimizetreats your existing configuration as a codebase to audit. It inventories every config file, measures character counts, checks for known anti-patterns, and presents findings in three tiers — must fix, should fix, nice to have — before touching anything.
Open GitHub Copilot CLI in any project and run:
/plugin marketplace add MichaelvanLaar/gc-config
/plugin install gc-config@gc-config
That's it. GitHub Copilot CLI downloads the skills and makes /gc-config-init and /gc-config-optimize available immediately.
Note: Skills are not updated automatically. See Keeping skills current to update.
Skills are not updated automatically. To update to the latest version, run:
/plugin update gc-config@gc-config
To remove the plugin and the marketplace in one step:
/plugin marketplace remove gc-config
Removing the marketplace automatically uninstalls any plugins installed from it. To remove only the plugin while keeping the marketplace:
/plugin uninstall gc-config@gc-config
Start GitHub Copilot CLI in your project directory and invoke the skill:
/gc-config-init
Or with a brief project description to skip some questions:
/gc-config-init Next.js 14 e-commerce platform with Stripe and Postgres
/gc-config-init Rust CLI tool with clap, targeting Linux and macOS
The skill will:
- Scan for existing Copilot config files and abort if
copilot-instructions.mdalready exists (use/gc-config-optimizeinstead). - Detect the project's toolchain to propose relevant
copilot-setup-steps.ymlcontent and infer what path-specific instruction files might be useful. - Create up to four outputs:
.github/copilot-instructions.md— global agent instructions, kept under 8,000 characters.github/instructions/*.instructions.md— path-specific instruction files with correctapplyToglob patterns (offered, not forced).github/workflows/copilot-setup-steps.yml— pre-install workflow when a build system is detected (job name is alwayscopilot-setup-steps, runtime capped at 59 minutes)AGENTS.md— only when evidence of a multi-tool AI environment is found
- Summarize what was created, what was skipped, and why.
Invoke the skill at any time:
/gc-config-optimize
Or focused on a specific area:
/gc-config-optimize length
/gc-config-optimize caching
The skill will:
- Inventory all Copilot config files and take a metrics snapshot: character counts, number of path-specific instruction files, presence of
copilot-setup-steps.yml,AGENTS.md, andcopilot-learnings.md. - Audit against best practices, checking for:
- Must fix: over the 8,000-character limit, invalid
applyToglobs, wrong job name incopilot-setup-steps.yml, contradictions betweenAGENTS.mdandcopilot-instructions.md - Should fix: anti-patterns (personality instructions, file-by-file descriptions, linter-enforced rules), missing Commands section, missing
copilot-setup-steps.ymlwhen a build system is detected, missing dependency caching incopilot-setup-steps.yml - Nice to have: missing architecture overview, no path-specific files for a multi-subsystem project
- Must fix: over the 8,000-character limit, invalid
- Review learnings: if
.github/copilot-learnings.mdexists, classify each entry as a recurring pattern (promote into config) or a one-off (delete), and include findings in the report. - Present all findings grouped by severity tier before touching anything.
- Wait for your approval, then apply only the changes you approve.
- Report before/after metrics for every modified file, plus how many learnings entries were promoted, deleted, or remain.
Day 1: /gc-config-init ← Bootstrap config for a new project
... start coding ...
Week 1: /gc-config-optimize ← First audit pass with real code context
... continue building ...
Ongoing: /gc-config-optimize ← Periodic hygiene checks; incorporates accumulated learnings
/gc-config-optimize length ← When copilot-instructions.md has grown
| File | Created by | Purpose |
|---|---|---|
.github/copilot-instructions.md |
/gc-config-init |
Global agent instructions, loaded every session (limit: ~8,000 characters) |
.github/instructions/*.instructions.md |
/gc-config-init (optional) |
Path-specific instructions, scoped via applyTo glob in frontmatter |
.github/workflows/copilot-setup-steps.yml |
/gc-config-init (optional) |
Pre-install dependencies before Copilot runs; job must be named copilot-setup-steps; max 59 minutes |
AGENTS.md |
/gc-config-init (optional) |
Vendor-neutral agent instructions for multi-tool AI environments |
.github/copilot-learnings.md |
Auto-created by skills | Accumulates project-specific discoveries from each skill run (Store step); recalled silently at the start of every run (Recall step); recurring patterns promoted to config by /gc-config-optimize |
.github/hooks/hooks.json |
/gc-config-init (optional) |
PostToolUse formatter hook (runs after file edits) and optional preToolUse blocking hook (rejects tool calls on sensitive files) |
- Stay under 8,000 characters:
copilot-instructions.mdis loaded on every agent session. Content past ~8,000 characters is silently truncated. The skills measure this and flag overruns. - Path-specific scoping: use
.github/instructions/*.instructions.mdwithapplyToglob patterns to deliver frontend, backend, or test-specific context only when relevant — avoids bloating the global file. applyTocorrectness: invalid glob patterns silently fail. The skills check that everyapplyTovalue is a valid glob.copilot-setup-steps.ymlconstraints: the workflow job must be named exactlycopilot-setup-stepsor Copilot ignores it. Runtime is capped at 59 minutes. The skills enforce both.- Dependency caching in setup steps: without caching, every agent session reinstalls all dependencies from scratch. The skills generate and check for ecosystem-specific caching:
actions/setup-node@v4withcache: 'npm',actions/setup-python@v5withcache: 'pip',actions/setup-go@v5withcache: true, andactions/cache@v4for Cargo. - Remove anti-patterns: personality instructions ("be concise"), file-by-file descriptions, and rules that a linter already enforces all waste the character budget without adding value.
- Commands section: a
## Commandssection with the project's build, test, and lint commands gives Copilot the verification loop it needs to self-check its own work. AGENTS.mdconsistency: when bothAGENTS.mdandcopilot-instructions.mdexist, the skills check for contradictions between them.- Learning and improvement: both skills use an observe-notice-store-recall loop. At the start of each run, the skill silently reads
.github/copilot-learnings.md(if present) and applies all entries to inform its decisions. At the end, it appends any project-specific discoveries — deviations from generic defaults, user choices, constraints found — to the same file. Running/gc-config-optimizeperiodically reviews accumulated entries, promotes recurring patterns into the configuration, and deletes one-offs. - PostToolUse formatter hook:
.github/hooks/hooks.jsonwith apostToolUsehook runs a formatter script automatically after every file edit — same effect as Claude Code's PostToolUse hook. The skills create and audit this hook. Hook scripts must exit 0 (they cannot block after the fact); use|| trueon the formatter command.
Unlike the companion cc-config for Claude Code, these skills target GitHub Copilot's configuration surface. Several Claude Code features have no Copilot equivalent:
| Claude Code feature | Status in GitHub Copilot |
|---|---|
permissions.deny / permissions.allow |
preToolUse hooks in .github/hooks/hooks.json provide a partial equivalent — blocking scripts that can reject tool calls before they execute |
Autocompact control (CLAUDE_AUTOCOMPACT_PCT_OVERRIDE) |
No equivalent |
@-import progressive disclosure |
copilot-instructions.md loads in full every session |
| Learnings auto-loading | Supported via the observe-notice-store-recall loop baked into both skills: learnings are stored after each run and recalled silently at the start of the next |
| MCP server automation via files | Copilot CLI supports ~/.copilot/mcp-config.json (file-based, per machine); the Coding Agent requires GitHub repository Settings → Copilot → MCP servers |
.claude/context/ shared domain folder |
No equivalent; content must live in copilot-instructions.md or path-specific files |
| Content exclusions (file patterns to hide from Copilot) | Configured in GitHub UI only — Organization or repository Settings → Copilot → Content exclusion |
| Spending limits / budget caps | Configured in GitHub UI only — Organization Settings → Billing → GitHub Copilot |
- Works with any programming language, framework, or build tool.
- Works with content projects (static sites, documentation sets, Markdown-driven workflows).
- Supports multi-tool AI environments (Claude Code, Cursor, Gemini) via
AGENTS.md. - Requires GitHub Copilot CLI.
Issues and pull requests are welcome. If you've found a best practice that isn't covered, or a pattern that the skills should detect, please open an issue.