Answer: Create the .github/instructions directory, then create one or more NAME.instructions.md files whose frontmatter block contains the applyTo keyword using glob syntax to specify which files or directories the instructions apply to. Status: Confirmed Entry: tool/github-copilot/memory-and-context/create-path-specific-instructions Revision: 3 Digest: sha256:91113a0e641db7ac (changes whenever the content changes) Timeline: Created: 2026-11-13T03:25:23Z Last changed: 2026-11-18T12:58:51Z (instruction format: — → Markdown format) Last verified: 2026-11-20T13:04:20Z Next check: 2026-11-21T13:04:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of directory | .github/instructions | [1] | 2026-11-20 file naming | NAME.instructions.md | [1] | 2026-11-20 file name suffix | .instructions.md | [1] | 2026-11-20 frontmatter keyword | applyTo | [1] | 2026-11-20 pattern syntax | glob syntax | [1] | 2026-11-20 multiple patterns | commas | [1] | 2026-11-20 exclude keyword | excludeAgent | [1] | 2026-11-20 instruction format | Markdown format | [1] | 2026-11-20 Sources: [1] GitHub. "Adding repository custom instructions for GitHub Copilot in your IDE - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-in-your-ide/customize-copilot/configure-custom-instructions/add-repository-instructions-in-your-ide Role: primary. Accessed: 2026-11-20T13:04:20Z Quote: "Create the .github/instructions directory if it does not already exist." (Supports: directory) Quote: "Create one or more NAME.instructions.md files, where NAME indicates the purpose of the instructions." (Supports: file naming) Quote: "The file name must end with .instructions.md ." (Supports: file name suffix) Quote: "At the start of the file, create a frontmatter block containing the applyTo keyword." (Supports: frontmatter keyword) Quote: "Use glob syntax to specify what files or directories the instructions apply to." (Supports: pattern syntax) Quote: "You can specify multiple patterns by separating them with commas." (Supports: multiple patterns) Quote: "add the excludeAgent keyword to the frontmatter block" (Supports: exclude keyword) Quote: "Add your custom instructions in natural language, using Markdown format." (Supports: instruction format) Snapshot SHA-256: fa9b24c45e87550551b175ca30e491916ac4db53a1a36e3282ac8cbfd410f27a (captured 2026-11-18T12:58:50Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T12:58:51Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:04:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:04:20Z Last attempt: 2026-11-20T13:04:20Z Notes and limitations: Extracted automatically from a single official source (section "Creating path-specific custom instructions"). Related: https://latestn.com/tool/github-copilot/memory-and-context/create-repository-wide-custom-instructions How do I create repository-wide custom instructions for GitHub Copilot CLI? https://latestn.com/tool/github-copilot/memory-and-context/create-repository-wide-instructions How do I create repository-wide custom instructions for GitHub Copilot in my IDE? https://latestn.com/tool/github-copilot/memory-and-context/create-repository-wide-instructions-2 How do I create repository-wide custom instructions for GitHub Copilot? https://latestn.com/tool/github-copilot/memory-and-context/create-first-custom-instructions How do I create my first custom instructions for GitHub Copilot? https://latestn.com/tool/github-copilot/memory-and-context/create-first-prompt-file How do I create my first prompt file in GitHub Copilot? https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-custom-instructions How do I create path-specific custom instructions for GitHub Copilot CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:58:51Z | changed | instruction format: — → Markdown format | [1] 2026-11-18T12:58:51Z | changed | exclude keyword: — → excludeAgent | [1] 2026-11-18T12:58:51Z | changed | multiple patterns: — → commas | [1] 2026-11-18T12:58:51Z | changed | pattern syntax: — → glob syntax | [1] 2026-11-18T12:58:51Z | changed | file naming: — → NAME.instructions.md | [1] 2026-11-18T12:58:51Z | changed | excludeAgent values: "code-review" or "cloud-agent" → — | [1] 2026-11-18T12:58:51Z | changed | multiple patterns separator: commas → — | [1] 2026-11-18T12:58:51Z | changed | syntax: glob syntax → — | [1] 2026-11-16T12:48:04Z | changed | excludeAgent values: — → "code-review" or "cloud-agent" | [1] 2026-11-16T12:48:04Z | changed | multiple patterns separator: — → commas | [1] 2026-11-16T12:48:04Z | changed | syntax: — → glob syntax | [1] 2026-11-16T12:48:04Z | changed | instruction format: Markdown format → — | [1] 2026-11-16T12:48:04Z | changed | exclude keyword: excludeAgent → — | [1] 2026-11-16T12:48:04Z | changed | multiple patterns: commas → — | [1] 2026-11-16T12:48:04Z | changed | pattern syntax: glob syntax → — | [1] 2026-11-16T12:48:04Z | changed | file naming: NAME.instructions.md → — | [1] 2026-11-13T03:25:23Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-instructions/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/memory-and-context/create-path-specific-instructions POST: https://latestn.com/dispute/tool/github-copilot/memory-and-context/create-path-specific-instructions with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/memory-and-context/create-path-specific-instructions?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create path-specific custom instructions for GitHub Copilot? Revision 3, last verified 2026-11-20T13:04:20Z. https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-instructions (accessed 2026-11-21T09:53:08Z). @misc{LatestN_tool_github_copilot_memory_and_context_create_path_specific_instructions_r3, title = {How do I create path-specific custom instructions for GitHub Copilot?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-instructions}}, note = {Revision 3; digest sha256:91113a0e641db7ac; last verified 2026-11-20T13:04:20Z; accessed 2026-11-21T09:53:08Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-instructions