Fix
Copilot copilot-instructions.md vs applyTo
Answer
GitHub Copilot reads repository-wide instructions from .github/copilot-instructions.md. Path-specific instructions are NAME.instructions.md files under .github/instructions, with an applyTo glob. When a feature supports both and the path matches, Copilot uses both files. A file named .github/instructions.md is neither of those paths.
- Scope Tool-agnostic. Written against Cursor project rules (.mdc), Claude Code CLAUDE.md, AGENTS.md, and GitHub Copilot repository instructions as documented on 2026-10-15.
Last verified 2026-10-15
Agents still drop one instructions.md in .github, or they put applyTo on .github/copilot-instructions.md and expect only matching files to see it. The Vibe Coder Starter pack is the tool-agnostic file set. Its pinned scope is: Tool-agnostic. Written against Cursor project rules (.mdc), Claude Code CLAUDE.md, AGENTS.md, and GitHub Copilot repository instructions as documented on 2026-10-15. The file it ships for Copilot is .github/copilot-instructions.md, the repository-wide file. Cursor .mdc frontmatter is /fixes/cursor-mdc-rule-frontmatter. CLAUDE.md versus AGENTS.md is /fixes/claude-code-claude-md-vs-agents-md.
Repository-wide custom instructions apply to requests in the repository. The path is .github/copilot-instructions.md. The body is Markdown, and whitespace between instructions is ignored. Path-specific instructions apply when Copilot is working on a file that matches a glob. Create .github/instructions, then one or more NAME.instructions.md files. The name must end in .instructions.md. The frontmatter key is applyTo. One pattern is applyTo: "app/models/**/*.rb". Several patterns are separated by commas, as in applyTo: "**/*.ts,**/*.tsx". **/*.py matches Python files in every directory. src/*.py matches Python files directly in src and does not match a file in a subdirectory of src.
If the glob matches a file Copilot is working on, and .github/copilot-instructions.md also exists, both files are used. On GitHub.com, path-specific files are read by Copilot cloud agent and Copilot code review. Copilot Chat on GitHub.com reads personal instructions, the repository-wide file, and organization instructions. It does not read path-specific files. VS Code Copilot Chat reads the repository-wide file, path-specific files, and AGENTS.md. VS Code code review reads the repository-wide file only. Visual Studio Copilot Chat and Copilot CLI read both instruction files. Most IDE clients combine the applicable files and do not publish one precedence order.
excludeAgent on a path-specific file limits that file for GitHub agents. The values are "code-review" and "cloud-agent". Without it, both Copilot code review and Copilot cloud agent use the file when they support path-specific instructions. excludeAgent does not replace applyTo. Prompt files are .github/prompts/NAME.prompt.md and are attached on purpose. They are not selected by applyTo. Checked against https://docs.github.com/en/copilot/reference/custom-instructions-support.
Last verified 2026-10-15. doc-verified.
Pro
Unity 6, Godot 4, and Next.js Pro rules, $1+
$1+ · pay what you want
Advanced rules for the same stacks as the free packs: Unity 6 Pro (Netcode, URP, Addressables, tests), Godot 4 Pro (multiplayer, GDExtension and C#, saves, export), and Next.js 16 + Supabase Pro (RLS, getClaims, Stripe webhooks, caching). Each pack is AGENTS.md, CLAUDE.md, Cursor .mdc, and Copilot instructions. The Phaser 4, three.js, and FastAPI packs stay on the Gumroad download as a bonus. 12 months of free updates.
Each pack ships as AGENTS.md, CLAUDE.md, Cursor .mdc, and Copilot instructions, with 12 months of free updates.
From the Unity 6 Pro rules
Mark an RPC with `[Rpc(SendTo.Server)]` and end the method name in `Rpc`. A missing `Rpc` suffix is an error. Do not write new `[ServerRpc]` or `[ClientRpc]` methods.
A client asks the server with `SendTo.Server`. The server talks to observers with `SendTo.NotServer`, or `SendTo.ClientsAndHost` when a host must run the method too. There is no direct client-to-client connection. The server forwards it.
Keep shared state on a `NetworkVariable<T>` and use `.Value`. It is sent to clients already connected and to a client that joins later. An RPC is not. Write `.Value` from the server when write permission is `NetworkVariableWritePermission.Server`.
Put a `NetworkObject` on the networked prefab and spawn it on the server. Do not use the removed UNet types `NetworkIdentity`, `[Command]`, or `UnityEngine.Networking`.Unity 6, Godot 4, and Next.js Pro rules, $1+Vibe Coder Starter pack — Safe defaults for any AI coding agent, in any stack.
doc-verified
Sources in the pack
Docs
Questions
- Where do GitHub Copilot repository instructions go?
- GitHub Copilot reads repository-wide instructions from .github/copilot-instructions.md. Path-specific instructions are NAME.instructions.md files under .github/instructions, with an applyTo glob. When a feature supports both and the path matches, Copilot uses both files. A file named .github/instructions.md is neither of those paths.
- Does applyTo replace .github/copilot-instructions.md?
- No. applyTo belongs on NAME.instructions.md under .github/instructions. When the feature supports both files and the path matches, Copilot uses both. Copilot Chat on GitHub.com does not read the path-specific files.
- How do I write an applyTo glob for several extensions?
- Separate patterns with commas. applyTo: "**/*.ts,**/*.tsx" matches TypeScript and TSX files in every directory. The file name must end in .instructions.md.
- When was this Copilot instructions rule last checked?
- Last verified 2026-10-15. doc-verified.