In short.
This GitHub guide shows developers how to configure reusable Copilot CLI instructions, but conflicting instruction files have no defined general priority. It covers file locations, path matching, referenced files and the /instructions command for inspecting discovered files. Changes require a resumed or new session to take effect. The page provides configuration guidance, but no measured accuracy improvements, pricing or minimum CLI version; nothing was executed for this report.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected documentation page at the exact source address identified in the report, including its discovery table, interaction rules, setup steps, examples, reference restrictions and session-refresh notice. Linked pages and repositories are excluded. No separate license notice or library artifact was supplied. No commands were executed, configurations tested or live CLI behavior verified.
The overview
Resource identity
Adding custom instructions for GitHub Copilot CLI is a GitHub Docs how-to for supplying persistent context about personal preferences, project conventions and how to build, test and validate changes. The resource is the documentation page, rather than a downloadable instruction pack.
The selected source is the complete page at [https://docs.github.com/api/article/body?pathname=/en/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions].
Practical assessment
The guide is useful when developers repeatedly explain the same project conventions to Copilot CLI. It provides concrete filenames, matching rules and refresh steps, making it actionable for configuring persistent guidance.
Its main operational weakness is conflict handling: applicable files are combined without a general precedence order. The page recommends avoiding contradictions. It does not establish how reliably Copilot follows the resulting instructions or quantify any improvement in generated changes.
Who it helps
Individual developers can use user-level files to carry preferences across repositories. Teams can put shared guidance in repository files, while maintainers of projects with multiple languages or directories can target instructions to matching paths.
Beginners receive step-by-step file creation guidance and glob examples. Experienced developers get details about discovery boundaries, environment variables, instruction deduplication and supported file-reference formats.
Supported configuration
The page documents user-level copilot-instructions.md and modular instruction files, repository-wide .github/copilot-instructions.md, and path-specific .github/instructions/**/*.instructions.md files. It also lists AGENTS.md, CLAUDE.md, .claude/CLAUDE.md and GEMINI.md as supported instruction sources.
COPILOT_CUSTOM_INSTRUCTIONS_DIRS can add directories containing AGENTS.md and *.instructions.md files, with multiple directories separated by commas. The /instructions command lists discovered files and lets users enable or disable individual files.
Using it
Requirements
Following the guide requires access to Copilot CLI and permission to create or edit the relevant instruction files. The page does not specify installation steps, authentication requirements, supported operating systems or a minimum CLI version.
User-level locations normally sit under $HOME/.copilot. Setting COPILOT_HOME replaces that base directory for both user-level instruction locations. Repository-wide setup uses .github/copilot-instructions.md, while modular repository instructions use filenames ending in .instructions.md.
How instructions are loaded
Copilot CLI generally discovers repository and agent instruction files at the repository root, current working directory, intermediate directories and directories along the path of a file being worked on. Modular repository instruction discovery excludes intermediate directories. An applyTo glob limits a modular file to matching files.
Applicable instructions are combined. Identical copies of user-level copilot-instructions.md, repository-wide instructions and agent instructions are deduplicated, but there is no general priority order. Disabled files are excluded.
In .github/copilot-instructions.md, AGENTS.md and CLAUDE.md, an @ followed by a relative path includes another file, including references within that file. References must stay inside the repository or local custom instructions directory. Absolute paths and paths beginning with ~/ are not loaded; references are not expanded in GEMINI.md or *.instructions.md files.
Setup
For repository-wide guidance, create .github/copilot-instructions.md at the repository root and write natural-language instructions in Markdown. Instructions can share a paragraph or occupy separate lines; whitespace between instructions is ignored.
For path-specific guidance, create a NAME.instructions.md file under .github/instructions, optionally in a subdirectory. Begin it with frontmatter, a metadata block containing applyTo, and provide one glob or multiple comma-separated globs.
Edits are not immediately available in active CLI sessions. Apply them by resuming or starting a new session; the page gives copilot --continue and /new as examples. Use /instructions to inspect which files were discovered.
Example configuration
For TypeScript-specific guidance, create .github/instructions/typescript.instructions.md and set its frontmatter applyTo value to "**/*.ts,**/*.tsx", the TypeScript pattern shown in the guide. An illustrative instruction body could say: Follow the existing TypeScript conventions in this repository and explain how changes were validated.
The documented matching rule makes the file applicable when Copilot CLI works with matching TypeScript files. This is a configuration illustration, not an executed example or evidence that the assistant will consistently follow the instruction.
Assessment & evidence
Limits and caveats
Conflicting files have no defined general priority, edited instructions require session refresh, and file references work only in the specified formats and locations. These constraints matter when guidance is spread across personal, repository and nested files.
The excludeAgent setting is described for Copilot cloud agent and Copilot code review. The page does not establish it as a control for excluding instructions from Copilot CLI.
Instruction adherence, performance, supported instruction sizes and behavior under conflicting guidance are not measured here. No CLI session or configuration was run for this report.
Why the approach may fit
Reusable instruction files can reduce repeated explanations of stable project conventions. Path matching offers a way to keep language-specific guidance relevant to the files being changed.
The documented combination rules favor clear, compatible instructions over reliance on file order. This is a practical implication of the loading mechanism, not a measured claim that custom instructions improve correctness.
Configuration alternatives
The page contrasts reusable instructions with adding the same context to individual prompts. Within its configuration options, user-level files suit personal preferences, repository-wide files suit shared conventions, and path-specific files suit guidance that applies only to certain files.
Existing AGENTS.md, CLAUDE.md or GEMINI.md files are additional supported sources, although their reference capabilities differ. The page provides no comparative assessment of other coding assistants or instruction-management tools.
Source evidence
The evidence consists of the complete selected GitHub Docs page, retained as selected-page.txt. Its source revision is sha256:00e45ea5be05916c1a52092802b84fdb643fc71c46865ccbe09970057bb2c980.
The page supports the configuration details in this report. Its linked support matrix, instruction-writing guidance, example collection and agentsmd repository are outside the selected scope. No execution results or independent measurements were supplied.
Access & freshness
Costs
The page states no prices, subscription requirements, usage allowances or additional charges for custom instructions. Copilot CLI access costs and any effect of instruction content on usage charges are unknown from this source.
Rights and redistribution
The supplied page contains no license text or explicit redistribution grant for the documentation. Rights to redistribute the captured page as a downloadable file are therefore not established by this evidence.
The selected page also does not address ownership or licensing of code generated using these instructions.
Freshness and compatibility
The source snapshot was captured at 2026-11-15T09:47:29.921Z. The supplied page does not state its publication date, last update date or minimum supported Copilot CLI version.
The capture time identifies the available documentation snapshot; it does not establish compatibility with every installed CLI version or later release.
Suggested next steps
Start with a short .github/copilot-instructions.md containing stable project conventions and actual build or validation commands. Add path-specific files where different parts of the repository need different guidance.
Review applicable files for contradictions, refresh the session after edits and inspect discovery with /instructions. Check relative references against the documented boundaries. Before depending on the configuration, verify its behavior in your own repository; that behavior remains unassessed here.
