Answer: Create the .github/instructions directory, then create one or more NAME.instructions.md files (the file name must end with .instructions.md) with a frontmatter block containing 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-custom-instructions Revision: 3 Digest: sha256:da6d10d6448472c3 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:23:53Z Last changed: 2026-11-18T12:56:18Z (excludeAgent values: — → "code-review" or "cloud-agent") Last verified: 2026-11-20T13:02:06Z Next check: 2026-11-21T13:02:06Z 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 suffix | .instructions.md | [1] | 2026-11-20 frontmatter keyword | applyTo | [1] | 2026-11-20 glob syntax | glob syntax | [1] | 2026-11-20 excludeAgent values | "code-review" or "cloud-agent" | [1] | 2026-11-20 Sources: [1] GitHub. "Adding custom instructions for GitHub Copilot CLI - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-custom-instructions Role: primary. Accessed: 2026-11-20T13:02:06Z 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 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: glob syntax) Quote: "Use either "code-review" or "cloud-agent" ." (Supports: excludeAgent values) Snapshot SHA-256: f15516caa51a0806bbdf5de0c34e79ba01b39a42c511e95b02531a810a1fb4bd (captured 2026-11-18T12:56:17Z) 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:56:18Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:02:06Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:02:06Z Last attempt: 2026-11-20T13:02:06Z 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-path-specific-instructions How do I create path-specific custom instructions for GitHub Copilot? 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/copilot-spaces-test-suggestions How can I use GitHub Copilot Spaces to improve test suggestions? 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/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:56:18Z | changed | excludeAgent values: — → "code-review" or "cloud-agent" | [1] 2026-11-18T12:56:18Z | changed | glob syntax: — → glob syntax | [1] 2026-11-18T12:56:18Z | changed | frontmatter keyword: — → applyTo | [1] 2026-11-18T12:56:18Z | changed | file suffix: — → .instructions.md | [1] 2026-11-18T12:56:18Z | changed | file naming: — → NAME.instructions.md | [1] 2026-11-18T12:56:18Z | changed | directory: — → .github/instructions | [1] 2026-11-18T12:56:18Z | changed | Optional exclusion keyword: excludeAgent → — | [1] 2026-11-18T12:56:18Z | changed | Syntax for patterns: glob syntax → — | [1] 2026-11-18T12:56:18Z | changed | Frontmatter keyword: applyTo → — | [1] 2026-11-18T12:56:18Z | changed | File name suffix: .instructions.md → — | [1] 2026-11-18T12:56:18Z | changed | Directory: .github/instructions → — | [1] 2026-11-16T12:45:42Z | changed | Optional exclusion keyword: — → excludeAgent | [1] 2026-11-16T12:45:42Z | changed | Syntax for patterns: — → glob syntax | [1] 2026-11-16T12:45:42Z | changed | Frontmatter keyword: — → applyTo | [1] 2026-11-16T12:45:42Z | changed | File name suffix: — → .instructions.md | [1] 2026-11-16T12:45:42Z | changed | Directory: — → .github/instructions | [1] 2026-11-16T12:45:42Z | changed | exclude values: "code-review" or "cloud-agent" → — | [1] 2026-11-16T12:45:42Z | changed | exclude keyword: excludeAgent → — | [1] 2026-11-16T12:45:42Z | changed | syntax: glob syntax → — | [1] 2026-11-16T12:45:42Z | changed | frontmatter keyword: applyTo → — | [1] 2026-11-16T12:45:42Z | changed | file name suffix: .instructions.md → — | [1] 2026-11-16T12:45:42Z | changed | file name pattern: NAME.instructions.md → — | [1] 2026-11-16T12:45:42Z | changed | directory: .github/instructions → — | [1] 2026-11-13T03:23:53Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-custom-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-custom-instructions POST: https://latestn.com/dispute/tool/github-copilot/memory-and-context/create-path-specific-custom-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-custom-instructions?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create path-specific custom instructions for GitHub Copilot CLI? Revision 3, last verified 2026-11-20T13:02:06Z. https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-custom-instructions (accessed 2026-11-21T09:53:48Z). @misc{LatestN_tool_github_copilot_memory_and_context_create_path_specific_custom_instructions_r3, title = {How do I create path-specific custom instructions for GitHub Copilot CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/memory-and-context/create-path-specific-custom-instructions}}, note = {Revision 3; digest sha256:da6d10d6448472c3; last verified 2026-11-20T13:02:06Z; accessed 2026-11-21T09:53:48Z} } 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-custom-instructions