Skip to content
Loadout

Fix

Claude Code .claude/rules paths

Answer

A file in .claude/rules with no paths frontmatter loads every Claude Code session, at the same priority as .claude/CLAUDE.md. Add a paths list and the file loads only when Claude reads or edits a matching file. paths is the only frontmatter field Claude Code reads. Any other field is ignored. If that YAML does not parse, the rule loads as if it had no 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

The Vibe Coder Starter pack says to keep CLAUDE.md short and put stack-specific rules in a nested CLAUDE.md in that subfolder or .claude/rules/, not a second copy of this file. 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. CLAUDE.md versus AGENTS.md is /fixes/claude-code-claude-md-vs-agents-md. Where Cursor reads a rule from is /fixes/cursor-rule-sources-and-precedence. This page is when a file in .claude/rules/ loads.

Put one topic in each markdown file. Claude Code finds .md files recursively. A rule with no paths field loads at launch with the same priority as .claude/CLAUDE.md. Files in ~/.claude/rules/ apply to every project on that machine and load before project rules. Neither set overrides the other. If a user rule and a project rule conflict, Claude may follow either one.

paths is a YAML list or a comma-separated string. The rule loads when Claude reads, writes, or edits a matching file, including cat or head on a single file. **/*.ts matches TypeScript in any directory. *.md matches markdown in the project root. src/components/*.tsx matches components in that directory, and src/**/* matches everything under src. Brace expansion shares a budget of 1,000 patterns and 4 MiB for that rule. Over the budget, the pattern is used unexpanded and matches no files. A [ that is not a bracket expression matches nothing. Escape a literal bracket as \[.

Only paths is read. description, globs, and alwaysApply are ignored with no error, and the frontmatter is stripped before the rule enters context. YAML that does not parse is dropped, so the rule loads every session. claude --debug shows the error. Keep each CLAUDE.md under 200 lines. A file over 4 MiB is skipped. An @path import loads at launch, at most four hops deep, relative to the importing file, and does not reduce context cost. Backticks mention a path without importing it. Checked against https://code.claude.com/docs/en/memory.

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

Why is my Claude Code .claude/rules file not loading?
A file in .claude/rules with no paths frontmatter loads every Claude Code session, at the same priority as .claude/CLAUDE.md. Add a paths list and the file loads only when Claude reads or edits a matching file. paths is the only frontmatter field Claude Code reads. Any other field is ignored. If that YAML does not parse, the rule loads as if it had no paths.
Does Claude Code read globs or alwaysApply in .claude/rules?
No. paths is the only frontmatter field Claude Code reads. description, globs, and alwaysApply are ignored with no error. If the YAML does not parse, the frontmatter is dropped and the rule loads every session. Run claude --debug to see the parse error.
Do Claude Code user rules override project rules?
Files in ~/.claude/rules/ load before project rules. Neither set overrides the other. If a user rule and a project rule conflict, Claude may follow either one, so keep them consistent.
When was this Claude Code paths rule last checked?
Last verified 2026-10-15. doc-verified.