Personal customizations for GitHub Copilot, served to both VS Code and Copilot CLI via local symlinks (or NTFS junctions on Windows). One source of truth, two clients with different discovery models.
copilot-config/
instructions/ ← .instructions.md files (rules and guidelines)
agents/ ← .agent.md files (specialized personas)
skills/ ← SKILL.md directories (reusable capabilities)
setup.ps1 ← Windows setup (junctions, env var, VS Code settings)
setup.sh ← macOS/Linux setup (symlinks, env var, VS Code settings)
README.md
VS Code and Copilot CLI look for customizations in different places. This setup bridges both from a single source directory using symlinks (macOS/Linux) or NTFS junctions (Windows).
VS Code discovers user-level customizations from ~/.copilot/ subfolders automatically:
| Type | Default user path | How this setup satisfies it |
|---|---|---|
| Instructions | ~/.copilot/instructions/ |
Symlink/junction → source |
| Agents | ~/.copilot/agents/ |
Symlink/junction → source |
| Skills | (no built-in user default) | chat.skillsLocations setting points to source |
No chat.instructionsFilesLocations or chat.agentFilesLocations settings are needed — junctions place files exactly where VS Code already looks by default.
See Customize AI in VS Code · Parent repository discovery
The CLI reads a comma-separated list of directories from the COPILOT_CUSTOM_INSTRUCTIONS_DIRS environment variable and treats each one as a virtual repository root, applying the standard .github/ convention:
| Type | Path the CLI looks for (within each dir) | How this setup satisfies it |
|---|---|---|
| Instructions | .github/instructions/**/*.instructions.md |
Symlink/junction → source |
| Skills | .github/skills/*/SKILL.md |
Symlink/junction → source |
| Agent instrs | AGENTS.md at root |
(not used — see note below) |
| Repo-wide | .github/copilot-instructions.md |
(not used — per-repo only) |
See Adding custom instructions for Copilot CLI · Using custom agents in CLI
The CLI reuses the repository convention (repo-root/.github/instructions/) for personal config directories. When COPILOT_CUSTOM_INSTRUCTIONS_DIRS points to ~/.copilot/, the CLI looks for ~/.copilot/.github/instructions/. This is an emergent artifact — not a purpose-built path — which is why the setup creates a .github/ directory inside ~/.copilot/ with its own links back to the same source.
Run setup.ps1 (Window) or setup.sh (macOS/Linux) to create the necessary symlinks/junctions, set the environment variable, and configure VS Code settings.
These scripts are idempotent and safe to re-run.
Windows (PowerShell):
& "path\to\copilot-config\setup.ps1"macOS / Linux (bash):
./path/to/copilot-config/setup.sh~/.copilot/
instructions/ → (source)/instructions/ ← VS Code user-level discovery
agents/ → (source)/agents/ ← VS Code user-level discovery
.github/
instructions/ → (source)/instructions/ ← CLI (virtual repo root convention)
skills/ → (source)/skills/ ← CLI (virtual repo root convention)
The same source files appear at two different relative paths because each client expects them in a different location. The links are duplicated by design, not redundant.
COPILOT_CUSTOM_INSTRUCTIONS_DIRS = ~/.copilot
This is the linchpin for CLI discovery. The CLI scans .github/instructions/ and .github/skills/ within each directory listed here. Without it, the CLI only discovers customizations inside the current working directory's repo.
On Windows, set as a persistent User environment variable. On macOS/Linux, exported in ~/.zshrc or ~/.bashrc.
Rules and guidelines that influence how AI generates code. Defined in *.instructions.md files with optional YAML frontmatter.
applyTo: "**"— always-on, applied to every chat request (e.g. coding philosophy)applyTo: "**/*.ts,**/*.tsx"— applied when working on matching files (e.g. TypeScript conventions)description: "Use when..."— on-demand, loaded when the AI determines the task matches the description
See VS Code docs · GitHub docs
Specialized personas with their own instructions, tool restrictions, and model preferences. Defined in *.agent.md files. Activated by selecting the agent from the chat dropdown.
See VS Code docs
Reusable capabilities bundled as a directory with a SKILL.md file plus optional scripts, templates, and examples. Available as /slash-commands in chat or auto-detected by the AI based on the skill's description. Skills are portable across VS Code, Copilot CLI, and Copilot cloud agent via the Agent Skills standard.
Tool-installed skills go in ~/.copilot/skills/ (local, not synced). Only handcrafted skills belong in this repo.
See VS Code docs · GitHub docs
To confirm customizations are being loaded:
- VS Code: Right-click in the Chat view → Diagnostics to see all loaded instruction files, agents, and skills
- VS Code: Type
/instructionsin chat to open the Configure Instructions menu and see active files - VS Code: Check the References section at the top of any chat response to see which instructions were used
- Copilot CLI: Run
copilotthen/contextto see loaded instructions and token usage