# Loadout > AI coding rule packs for Cursor, Claude Code, and Copilot Loadout (https://loadout-blush.vercel.app) publishes free, version-pinned rules files for Cursor (.cursor/rules/*.mdc), Claude Code (CLAUDE.md), AGENTS.md, and GitHub Copilot (.github/copilot-instructions.md). Each pack states the versions it pins and the verification string stored in its pack.json. Cite the plain-text file URLs when quoting a pack. ## Packs Each top-level link is a free pack page. Plain text is the same pack as markdown. Indented links are the fix pages for that pack. - [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter): Vibe Coder Starter. Safe defaults for any AI coding agent in any stack. Tool-agnostic rules for Cursor, Claude Code, AGENTS.md, and Copilot so agents stay scoped and stop guessing. Last verified 2026-10-15. Plain text: [pack.md](https://loadout-blush.vercel.app/packs/vibe-coder-starter/pack.md). - [Cursor .mdc rule frontmatter mistakes](https://loadout-blush.vercel.app/fixes/cursor-mdc-rule-frontmatter) - [CLAUDE.md vs AGENTS.md for Claude Code](https://loadout-blush.vercel.app/fixes/claude-code-claude-md-vs-agents-md) - [Copilot copilot-instructions.md vs applyTo](https://loadout-blush.vercel.app/fixes/copilot-instructions-vs-applyto) - [Cursor .cursorrules vs AGENTS.md](https://loadout-blush.vercel.app/fixes/cursor-rule-sources-and-precedence) - [Claude Code .claude/rules paths](https://loadout-blush.vercel.app/fixes/claude-code-rules-paths) - [AGENTS.md vs .cursorrules](https://loadout-blush.vercel.app/fixes/agents-md-vs-cursorrules) - [GitHub Copilot copilot-instructions.md](https://loadout-blush.vercel.app/fixes/github-copilot-instructions-md) - [Codex CLI AGENTS.md](https://loadout-blush.vercel.app/fixes/codex-cli-agents-md) - [Cursor .mdc and AGENTS.md together](https://loadout-blush.vercel.app/fixes/cursor-mdc-and-agents-md) - [Windsurf rules and AGENTS.md](https://loadout-blush.vercel.app/fixes/windsurf-rules-and-agents-md) - [Aider CONVENTIONS.md vs AGENTS.md](https://loadout-blush.vercel.app/fixes/aider-conventions-md) - [Continue.dev rules and AGENTS.md](https://loadout-blush.vercel.app/fixes/continue-dev-rules-and-agents-md) - [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase): Next.js + Supabase. Rules pinned to Next.js 16 and Supabase SSR โ€” the APIs that actually work with React 19. Same advice in all four agent file formats, snippet-checked. Last verified 2026-11-04. Plain text: [pack.md](https://loadout-blush.vercel.app/packs/nextjs-supabase/pack.md). - [Next.js 16 middleware.ts vs proxy.ts](https://loadout-blush.vercel.app/fixes/nextjs-16-middleware-to-proxy) - [Supabase SSR: getClaims, not getSession, on the server](https://loadout-blush.vercel.app/fixes/supabase-ssr-getsession-vs-getclaims) - [Next.js 16 params and cookies are async](https://loadout-blush.vercel.app/fixes/nextjs-16-async-params-and-cookies) - [Supabase RLS with no policy is deny-all](https://loadout-blush.vercel.app/fixes/supabase-rls-no-policy-is-deny-all) - [Next.js 16 revalidateTag and Cache Components](https://loadout-blush.vercel.app/fixes/nextjs-16-revalidate-tag-and-cache-components) - [Supabase Edge Function secrets](https://loadout-blush.vercel.app/fixes/supabase-edge-function-secrets) - [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6): Unity 6. Unity 6 C# rules that refuse obsolete 2022 / UNet patterns. Input System defaults, current APIs, four files ready for Cursor, Claude, AGENTS.md, and Copilot. Last verified 2026-10-15. Plain text: [pack.md](https://loadout-blush.vercel.app/packs/unity-6/pack.md). - [Unity 6 obsolete FindObjectOfType and Input calls](https://loadout-blush.vercel.app/fixes/unity-6-findobjectoftype-obsolete) - [Unity 6 Input System vs Input.GetAxis](https://loadout-blush.vercel.app/fixes/unity-6-input-system-vs-input) - [Unity 6 .meta files and dotnet build](https://loadout-blush.vercel.app/fixes/unity-6-meta-files-and-dotnet-build) - [Unity 6 Awaitable vs Task.Delay](https://loadout-blush.vercel.app/fixes/unity-6-awaitable-vs-task-delay) - [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4): Godot 4. GDScript 2.0 rules that reject Godot 3 APIs. Written for Godot 4.x, parse-tested where it counts, shipped for every major AI coding tool. Last verified 2026-10-15. Plain text: [pack.md](https://loadout-blush.vercel.app/packs/godot-4/pack.md). - [Godot 3 code in Godot 4](https://loadout-blush.vercel.app/fixes/godot-3-code-in-godot-4) - [Godot 4 setget, Tween.new, and @tool](https://loadout-blush.vercel.app/fixes/godot-4-setget-tweens-and-tool) - [Godot 4 move_and_slide and delta](https://loadout-blush.vercel.app/fixes/godot-4-move-and-slide-and-delta) - [Godot 4 signal connect: Callable, not a string](https://loadout-blush.vercel.app/fixes/godot-4-signal-connect-callable) ## Fixes - [Fixes](https://loadout-blush.vercel.app/fixes): Short answers for the mistakes agents still paste. - [Godot 3 code in Godot 4](https://loadout-blush.vercel.app/fixes/godot-3-code-in-godot-4): In Godot 4 use CharacterBody2D not KinematicBody2D; await not yield; @export not export var; set velocity then move_and_slide() with no args. Pack: [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4). Last verified 2026-10-15. - [Next.js 16 middleware.ts vs proxy.ts](https://loadout-blush.vercel.app/fixes/nextjs-16-middleware-to-proxy): In Next.js 16 the request interceptor is proxy.ts exporting proxy. middleware.ts is deprecated and still runs, including on the Edge runtime. proxy.ts runs on Node.js only. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [Unity 6 obsolete FindObjectOfType and Input calls](https://loadout-blush.vercel.app/fixes/unity-6-findobjectoftype-obsolete): In Unity 6 replace obsolete FindObjectOfType and FindObjectsOfType calls. Prefer a [SerializeField] reference or FindAnyObjectByType() for any instance; read input through UnityEngine.InputSystem. Pack: [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6). Last verified 2026-10-15. - [Supabase SSR: getClaims, not getSession, on the server](https://loadout-blush.vercel.app/fixes/supabase-ssr-getsession-vs-getclaims): Use supabase.auth.getClaims() to protect server pages and data. Never trust getSession() for authorization: it reads the cookie without revalidating it, and anyone can forge that cookie. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [Cursor .mdc rule frontmatter mistakes](https://loadout-blush.vercel.app/fixes/cursor-mdc-rule-frontmatter): Cursor project rules need a .mdc file in .cursor/rules with description, globs, and alwaysApply frontmatter. A plain .md file there is ignored. Choose the fields for the intended attachment mode. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Godot 4 setget, Tween.new, and @tool](https://loadout-blush.vercel.app/fixes/godot-4-setget-tweens-and-tool): In Godot 4 property accessors use the GDScript 2.0 get: and set(value): blocks, not setget. Animate with create_tween(). Do not create a Tween node with Tween.new(). Mark editor scripts with @tool on the first line, and check Engine.is_editor_hint() inside them. Pack: [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4). Last verified 2026-10-15. - [Unity 6 Input System vs Input.GetAxis](https://loadout-blush.vercel.app/fixes/unity-6-input-system-vs-input): In Unity 6 read input through the Input System package (UnityEngine.InputSystem). Do not call Input.GetAxis, Input.GetKey, or Input.GetButton. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. Pack: [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6). Last verified 2026-10-15. - [Next.js 16 params and cookies are async](https://loadout-blush.vercel.app/fixes/nextjs-16-async-params-and-cookies): In Next.js 16 params and searchParams are Promises. Always await them. cookies(), headers(), and draftMode() from next/headers are async. Await them. Synchronous access typechecks in places and crashes at runtime. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [CLAUDE.md vs AGENTS.md for Claude Code](https://loadout-blush.vercel.app/fixes/claude-code-claude-md-vs-agents-md): Claude Code reads CLAUDE.md files, including a nested CLAUDE.md in a subfolder, and .claude/rules/. It does not read AGENTS.md on its own, root or nested. Put stack-specific rules in a nested CLAUDE.md in that subfolder or .claude/rules/, not a second copy of the root CLAUDE.md. If you want one shared file, CLAUDE.md can import it with an @AGENTS.md line. Put AGENTS.md in the project root for agents that read it, including Codex and Cursor. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Supabase RLS with no policy is deny-all](https://loadout-blush.vercel.app/fixes/supabase-rls-no-policy-is-deny-all): Enable RLS on every public table and add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [Unity 6 .meta files and dotnet build](https://loadout-blush.vercel.app/fixes/unity-6-meta-files-and-dotnet-build): Never delete, rename, or hand-edit a Unity .meta file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. Do not run dotnet build to check a Unity project. The editor compiles assemblies itself. A bare dotnet build fails or compiles the wrong set of asmdefs. Pack: [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6). Last verified 2026-10-15. - [Godot 4 move_and_slide and delta](https://loadout-blush.vercel.app/fixes/godot-4-move-and-slide-and-delta): In Godot 4 set velocity, then call move_and_slide() with no arguments. Do not multiply horizontal velocity by delta. move_and_slide() applies the timestep. Gravity is the exception: velocity.y += gravity * delta before the call. Run movement in _physics_process, not _process. Pack: [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4). Last verified 2026-10-15. - [Next.js 16 revalidateTag and Cache Components](https://loadout-blush.vercel.app/fixes/nextjs-16-revalidate-tag-and-cache-components): In Next.js 16, revalidateTag takes a cache profile. Pass the max profile for stale-while-revalidate. The single-argument call is deprecated. Inside a Server Action, use updateTag(tag) when the next request must see the user's own write. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [Supabase Edge Function secrets](https://loadout-blush.vercel.app/fixes/supabase-edge-function-secrets): Supabase Edge Functions read secrets with Deno.env.get. Locally they load supabase/functions/.env when the stack starts. Production secrets are set in the Dashboard or with supabase secrets set, and a deployed function reads a new secret without a redeploy. A custom secret name cannot start with SUPABASE_. Pack: [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase). Last verified 2026-11-04. - [Godot 4 signal connect: Callable, not a string](https://loadout-blush.vercel.app/fixes/godot-4-signal-connect-callable): In Godot 4 connect a signal with a Callable: button.pressed.connect(_on_pressed). Do not pass a signal name, a target, and a method string to connect. Emit with hit.emit(amount), not emit_signal. Pack: [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4). Last verified 2026-10-15. - [Copilot copilot-instructions.md vs applyTo](https://loadout-blush.vercel.app/fixes/copilot-instructions-vs-applyto): 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. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Cursor .cursorrules vs AGENTS.md](https://loadout-blush.vercel.app/fixes/cursor-rule-sources-and-precedence): Cursor Agent reads Team Rules, .mdc files in .cursor/rules, User Rules, and plain AGENTS.md or CLAUDE.md. A plain .md file in .cursor/rules is ignored. A root .cursorrules file is legacy and will be deprecated. When Team Rules, Project Rules, and User Rules conflict, precedence is Team Rules, then Project Rules, then User Rules. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Claude Code .claude/rules paths](https://loadout-blush.vercel.app/fixes/claude-code-rules-paths): 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. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Unity 6 Awaitable vs Task.Delay](https://loadout-blush.vercel.app/fixes/unity-6-awaitable-vs-task-delay): In Unity 6, wait with Awaitable.WaitForSecondsAsync from the main thread, or use a coroutine. Thread.Sleep suspends the calling thread, so do not call it on the main thread. WaitForSecondsAsync can only be called from the main thread and always completes there. A destroyed MonoBehaviour acts as if it is null. Check this != null after an await, or pass a cached destroyCancellationToken. Pack: [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6). Last verified 2026-10-15. - [AGENTS.md vs .cursorrules](https://loadout-blush.vercel.app/fixes/agents-md-vs-cursorrules): AGENTS.md is plain Markdown project instructions for any coding agent that reads it, including Cursor. Put it in the repo root. Use .cursor/rules/*.mdc when the instruction should apply only in Cursor. A root .cursorrules file is legacy and will be deprecated. Loadout free packs ship both AGENTS.md and a .cursor/rules file. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [GitHub Copilot copilot-instructions.md](https://loadout-blush.vercel.app/fixes/github-copilot-instructions-md): GitHub Copilot reads repository-wide project instructions from .github/copilot-instructions.md. Path-specific instructions are NAME.instructions.md files under .github/instructions. Cursor reads .cursor/rules/*.mdc, AGENTS.md, and CLAUDE.md, and its rules docs do not name the Copilot file. Every Loadout free zip includes .github/copilot-instructions.md. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Codex CLI AGENTS.md](https://loadout-blush.vercel.app/fixes/codex-cli-agents-md): Codex reads AGENTS.override.md if that file is non-empty, otherwise AGENTS.md. It checks ~/.codex once, unless CODEX_HOME is set, then one file per directory from the project root down to the current directory. CLAUDE.md, .cursor/rules, and .github/copilot-instructions.md are not on that list unless you add the filename to project_doc_fallback_filenames. Every Loadout free zip ships AGENTS.md at the project root. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Cursor .mdc and AGENTS.md together](https://loadout-blush.vercel.app/fixes/cursor-mdc-and-agents-md): Cursor applies a root AGENTS.md and .cursor/rules/*.mdc together. The docs do not name a winner when those files disagree. Applicable rules are merged. On a conflict, Team Rules take precedence, then Project Rules, then User Rules. Nested AGENTS.md files combine with parent AGENTS.md files, and the closer file takes precedence among those files. That line does not mention an .mdc file. Keep a shared instruction in one file, or keep the copies the same. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Windsurf rules and AGENTS.md](https://loadout-blush.vercel.app/fixes/windsurf-rules-and-agents-md): Windsurf Cascade reads workspace rules from .devin/rules/*.md when that folder exists, otherwise .windsurf/rules/*.md. The legacy root file .windsurfrules is still read. Root AGENTS.md is always on. A nested AGENTS.md is treated as a glob for that directory. Global rules are ~/.codeium/windsurf/memories/global_rules.md, capped at 6,000 characters; each workspace rule file is capped at 12,000. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Aider CONVENTIONS.md vs AGENTS.md](https://loadout-blush.vercel.app/fixes/aider-conventions-md): Aider does not auto-discover CONVENTIONS.md or AGENTS.md. Create a Markdown conventions file and load it with aider --read CONVENTIONS.md or /read CONVENTIONS.md so it is read-only and prompt-cached. To load it every session, set read: CONVENTIONS.md (or read: [CONVENTIONS.md, AGENTS.md]) in .aider.conf.yml. Every Loadout free zip ships AGENTS.md at the project root; point Aider at that file or copy its text into CONVENTIONS.md. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. - [Continue.dev rules and AGENTS.md](https://loadout-blush.vercel.app/fixes/continue-dev-rules-and-agents-md): Continue project rules are .md files in .continue/rules with YAML frontmatter (name, globs, alwaysApply, description). config.yaml replaces config.json, which is deprecated. The loader also accepts one workspace-root agent file, checking AGENTS.md, then AGENT.md, then CLAUDE.md, and sets alwaysApply: true. When AGENTS.md exists, that file is the agent rule, so a root CLAUDE.md is not loaded beside it. Rules kept only in config.json, .cursor/rules, or .continue/rule/ are missed. Pack: [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter). Last verified 2026-10-15. ## Raw files - [Vibe Coder Starter AGENTS.md](https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/AGENTS.md): install path for AGENTS.md. - [Vibe Coder Starter CLAUDE.md](https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/CLAUDE.md): install path for CLAUDE.md. - [Vibe Coder Starter Cursor rules](https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/cursor.mdc): install path for Cursor rules. - [Vibe Coder Starter Copilot instructions](https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/copilot-instructions.md): install path for Copilot instructions. - [Next.js + Supabase AGENTS.md](https://loadout-blush.vercel.app/packs/nextjs-supabase/files/AGENTS.md): install path for AGENTS.md. - [Next.js + Supabase CLAUDE.md](https://loadout-blush.vercel.app/packs/nextjs-supabase/files/CLAUDE.md): install path for CLAUDE.md. - [Next.js + Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase/files/cursor.mdc): install path for Cursor rules. - [Next.js + Supabase Copilot instructions](https://loadout-blush.vercel.app/packs/nextjs-supabase/files/copilot-instructions.md): install path for Copilot instructions. - [Unity 6 AGENTS.md](https://loadout-blush.vercel.app/packs/unity-6/files/AGENTS.md): install path for AGENTS.md. - [Unity 6 CLAUDE.md](https://loadout-blush.vercel.app/packs/unity-6/files/CLAUDE.md): install path for CLAUDE.md. - [Unity 6 Cursor rules](https://loadout-blush.vercel.app/packs/unity-6/files/cursor.mdc): install path for Cursor rules. - [Unity 6 Copilot instructions](https://loadout-blush.vercel.app/packs/unity-6/files/copilot-instructions.md): install path for Copilot instructions. - [Godot 4 AGENTS.md](https://loadout-blush.vercel.app/packs/godot-4/files/AGENTS.md): install path for AGENTS.md. - [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4/files/CLAUDE.md): install path for CLAUDE.md. - [Godot 4 Cursor rules](https://loadout-blush.vercel.app/packs/godot-4/files/cursor.mdc): install path for Cursor rules. - [Godot 4 Copilot instructions](https://loadout-blush.vercel.app/packs/godot-4/files/copilot-instructions.md): install path for Copilot instructions. ## Pro - [Loadout Pro](https://panthony7.gumroad.com/l/bwlzsm?utm_source=loadout&utm_medium=site&utm_content=llms): 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. Listed price: $1+ ยท pay what you want. ## Optional - [Full text of the free packs](https://loadout-blush.vercel.app/llms-full.txt): Every free pack, including the rules files, in one document. - [HTML catalog](https://loadout-blush.vercel.app/packs): The same packs as web pages. - [Free pack license](https://loadout-blush.vercel.app/license): Free packs are MIT licensed. The Pro bundle is not. # Full pack text # AGENTS.md template for vibe coding > Safe defaults for any AI coding agent in any stack. Tool-agnostic rules for Cursor, Claude Code, AGENTS.md, and Copilot so agents stay scoped and stop guessing. Pack: Vibe Coder Starter (`vibe-coder-starter`) Page: https://loadout-blush.vercel.app/packs/vibe-coder-starter ## What it does A short, tool-agnostic rule set for people shipping with Cursor, Claude Code, Copilot, or Codex. It keeps the agent planning, making small diffs, and proving the code runs before it says it is done. ## Who it's for Anyone vibe-coding an app or game who wants an agent that asks before it deletes, never commits secrets, and explains changes in plain language. ## Versions pinned - 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 tested: 2026-10-15 ## How it was checked doc-verified ## Sources - https://cursor.com/docs/rules - https://code.claude.com/docs/en/memory - https://agents.md/ ## Other free packs - [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase): Rules pinned to Next.js 16 and Supabase SSR โ€” the APIs that actually work with React 19. Same advice in all four agent file formats, snippet-checked. - [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6): Unity 6 C# rules that refuse obsolete 2022 / UNet patterns. Input System defaults, current APIs, four files ready for Cursor, Claude, AGENTS.md, and Copilot. - [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4): GDScript 2.0 rules that reject Godot 3 APIs. Written for Godot 4.x, parse-tested where it counts, shipped for every major AI coding tool. ## Install ### Cursor Path: `.cursor/rules/vibe-coder-starter.mdc` 1. Download the Cursor zip, or copy the .mdc file from this page. 2. Save it as .cursor/rules/vibe-coder-starter.mdc. 3. Commit it. Cursor reads project rules from that folder. ### Claude Code Path: `CLAUDE.md` 1. Download the Claude zip, or copy CLAUDE.md. 2. Put CLAUDE.md in the project root. 3. Claude Code reads it as project memory on the next session. ### AGENTS.md Path: `AGENTS.md` 1. Download the Agents zip, or copy AGENTS.md. 2. Put AGENTS.md in the project root. 3. Agents that read AGENTS.md, including Codex and Cursor, pick it up there. ### GitHub Copilot Path: `.github/copilot-instructions.md` 1. Download the Copilot zip, or copy the instructions file. 2. Save it as .github/copilot-instructions.md. 3. Copilot reads repository instructions from that path. ## Files ### Cursor Install path: `.cursor/rules/vibe-coder-starter.mdc` Plain text: https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/cursor.mdc ``` --- description: Safe defaults for any vibe-coded project. Plan first, small diffs, no secrets, prove it runs. globs: "**/*" alwaysApply: true --- # Vibe Coder Starter Follow these rules on every task. They outrank a vague "just build it" prompt. ## Plan, then edit - Before the first code change, write a 3 to 6 line plan: what you will touch, what you will not touch, and how you will know it works. - If the task is ambiguous or would change behavior the user did not mention, ask one concrete question and wait. Do not guess at product decisions. - Read the files you will edit before editing them. Match the names, types, and style already in the repo. ## Small diffs - Change only what the task needs. Do not reformat, rename, or "clean up" unrelated code. - One concern per change. Prefer editing an existing function over adding a new abstraction. - Do not add a dependency, a new config file, or a new service unless the task requires it. If it does, say why before installing. ## Secrets and git - Never read, print, or commit secrets: `.env`, `.env.*` (except `*.example`), keys, tokens, or credential files. - Never put a real key in source, in a test fixture, or in a commit message. Use placeholders like `YOUR_KEY_HERE`. - Do not run `git commit`, `git push`, `git reset`, or force-push unless the user asked for that exact action. - Do not skip hooks (`--no-verify`) or amend a commit you did not just make in this session. ## Deleting and destructive commands - Ask before deleting or renaming a file, dropping a table, wiping a directory, or running a command that cannot be undone (`reset --hard`, `rm -rf`, `DROP`, force push). - Do not delete lockfiles, generated project files the toolchain owns (`.meta`, `.godot`, migration history), or files you do not understand. ## Prove it - Run the project's own check before saying the work is done: the test, lint, typecheck, or play command already in the repo. Say the exact command and whether it passed. - If you cannot run it (missing runtime, no permission, a GUI tool), say that plainly. Do not claim "it works" from reading the code. - When a command fails, paste the relevant error and fix the cause. Do not silence the error or delete the test. ## Explain simply - When you finish, say what changed, which files, and how to try it, in short sentences a new teammate could follow. - If you left something unfinished or untested, list it. Do not hide it in a "next steps" dump. ## Dependencies and setup - Use the package manager the repo already uses (look for `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock`, `uv.lock`, `poetry.lock`). Do not mix managers or add a second lockfile. - Pin what you add to the version you tested. Do not upgrade unrelated packages "while you are there". - If a command needs a global install or `sudo`, stop and ask. ## Errors and debugging - Read the full error before changing code. Fix the first error in the log, then rerun. Later errors are often caused by the first. - Do not wrap code in `try/catch` or `if (x)` just to make an error disappear. Find out why the value is wrong. - Do not change a test's expected value to make it pass unless the user confirms the old expectation was wrong. - Add a log line to find a bug if you need to, and remove it before you finish. ## When you are stuck - After two failed attempts at the same fix, stop and report what you tried, what happened, and your best guess. Do not keep looping. - If the docs and your memory disagree, trust the docs for the installed version. Say which version you checked. ## Talking to the user - Use the user's words for features. If they said "inventory", do not rename it "item management system". - When you need a decision, offer two or three concrete options with the tradeoff in one line each. - Report a risk the moment you see it (data loss, a paid API call, a public deploy), not at the end. - Do not pad answers with praise, apologies, or a recap of the request. Lead with what you did. - If the user is new to the tool, link the one doc page that explains the concept instead of a long lecture. ## Done checklist 1. The change matches the plan, or you explained why it changed. 2. The project's own check ran and passed, or you said why it could not run. 3. No secrets, debug logs, or stray files were added. 4. You listed every file you changed and anything left unfinished. ``` ### Claude Install path: `CLAUDE.md` Plain text: https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/CLAUDE.md ``` # Vibe Coder Starter Follow these rules on every task. They outrank a vague "just build it" prompt. ## Plan, then edit - Before the first code change, write a 3 to 6 line plan: what you will touch, what you will not touch, and how you will know it works. - If the task is ambiguous or would change behavior the user did not mention, ask one concrete question and wait. Do not guess at product decisions. - Read the files you will edit before editing them. Match the names, types, and style already in the repo. ## Small diffs - Change only what the task needs. Do not reformat, rename, or "clean up" unrelated code. - One concern per change. Prefer editing an existing function over adding a new abstraction. - Do not add a dependency, a new config file, or a new service unless the task requires it. If it does, say why before installing. ## Secrets and git - Never read, print, or commit secrets: `.env`, `.env.*` (except `*.example`), keys, tokens, or credential files. - Never put a real key in source, in a test fixture, or in a commit message. Use placeholders like `YOUR_KEY_HERE`. - Do not run `git commit`, `git push`, `git reset`, or force-push unless the user asked for that exact action. - Do not skip hooks (`--no-verify`) or amend a commit you did not just make in this session. ## Deleting and destructive commands - Ask before deleting or renaming a file, dropping a table, wiping a directory, or running a command that cannot be undone (`reset --hard`, `rm -rf`, `DROP`, force push). - Do not delete lockfiles, generated project files the toolchain owns (`.meta`, `.godot`, migration history), or files you do not understand. ## Prove it - Run the project's own check before saying the work is done: the test, lint, typecheck, or play command already in the repo. Say the exact command and whether it passed. - If you cannot run it (missing runtime, no permission, a GUI tool), say that plainly. Do not claim "it works" from reading the code. - When a command fails, paste the relevant error and fix the cause. Do not silence the error or delete the test. ## Explain simply - When you finish, say what changed, which files, and how to try it, in short sentences a new teammate could follow. - If you left something unfinished or untested, list it. Do not hide it in a "next steps" dump. ## Dependencies and setup - Use the package manager the repo already uses (look for `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock`, `uv.lock`, `poetry.lock`). Do not mix managers or add a second lockfile. - Pin what you add to the version you tested. Do not upgrade unrelated packages "while you are there". - If a command needs a global install or `sudo`, stop and ask. ## Errors and debugging - Read the full error before changing code. Fix the first error in the log, then rerun. Later errors are often caused by the first. - Do not wrap code in `try/catch` or `if (x)` just to make an error disappear. Find out why the value is wrong. - Do not change a test's expected value to make it pass unless the user confirms the old expectation was wrong. - Add a log line to find a bug if you need to, and remove it before you finish. ## When you are stuck - After two failed attempts at the same fix, stop and report what you tried, what happened, and your best guess. Do not keep looping. - If the docs and your memory disagree, trust the docs for the installed version. Say which version you checked. ## Talking to the user - Use the user's words for features. If they said "inventory", do not rename it "item management system". - When you need a decision, offer two or three concrete options with the tradeoff in one line each. - Report a risk the moment you see it (data loss, a paid API call, a public deploy), not at the end. - Do not pad answers with praise, apologies, or a recap of the request. Lead with what you did. - If the user is new to the tool, link the one doc page that explains the concept instead of a long lecture. ## Done checklist 1. The change matches the plan, or you explained why it changed. 2. The project's own check ran and passed, or you said why it could not run. 3. No secrets, debug logs, or stray files were added. 4. You listed every file you changed and anything left unfinished. ## Claude Code - Keep this file short. Put stack-specific rules in a nested `CLAUDE.md` in that subfolder or `.claude/rules/`, not a second copy of this file. Claude Code does not read `AGENTS.md` on its own, root or nested. If you want one shared file, import it with an `@AGENTS.md` line. - Do not spawn extra agents for a one-file edit. Use them only when the user asked for parallel work. ``` ### Agents Install path: `AGENTS.md` Plain text: https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/AGENTS.md ``` # Vibe Coder Starter Follow these rules on every task. They outrank a vague "just build it" prompt. ## Plan, then edit - Before the first code change, write a 3 to 6 line plan: what you will touch, what you will not touch, and how you will know it works. - If the task is ambiguous or would change behavior the user did not mention, ask one concrete question and wait. Do not guess at product decisions. - Read the files you will edit before editing them. Match the names, types, and style already in the repo. ## Small diffs - Change only what the task needs. Do not reformat, rename, or "clean up" unrelated code. - One concern per change. Prefer editing an existing function over adding a new abstraction. - Do not add a dependency, a new config file, or a new service unless the task requires it. If it does, say why before installing. ## Secrets and git - Never read, print, or commit secrets: `.env`, `.env.*` (except `*.example`), keys, tokens, or credential files. - Never put a real key in source, in a test fixture, or in a commit message. Use placeholders like `YOUR_KEY_HERE`. - Do not run `git commit`, `git push`, `git reset`, or force-push unless the user asked for that exact action. - Do not skip hooks (`--no-verify`) or amend a commit you did not just make in this session. ## Deleting and destructive commands - Ask before deleting or renaming a file, dropping a table, wiping a directory, or running a command that cannot be undone (`reset --hard`, `rm -rf`, `DROP`, force push). - Do not delete lockfiles, generated project files the toolchain owns (`.meta`, `.godot`, migration history), or files you do not understand. ## Prove it - Run the project's own check before saying the work is done: the test, lint, typecheck, or play command already in the repo. Say the exact command and whether it passed. - If you cannot run it (missing runtime, no permission, a GUI tool), say that plainly. Do not claim "it works" from reading the code. - When a command fails, paste the relevant error and fix the cause. Do not silence the error or delete the test. ## Explain simply - When you finish, say what changed, which files, and how to try it, in short sentences a new teammate could follow. - If you left something unfinished or untested, list it. Do not hide it in a "next steps" dump. ## Dependencies and setup - Use the package manager the repo already uses (look for `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock`, `uv.lock`, `poetry.lock`). Do not mix managers or add a second lockfile. - Pin what you add to the version you tested. Do not upgrade unrelated packages "while you are there". - If a command needs a global install or `sudo`, stop and ask. ## Errors and debugging - Read the full error before changing code. Fix the first error in the log, then rerun. Later errors are often caused by the first. - Do not wrap code in `try/catch` or `if (x)` just to make an error disappear. Find out why the value is wrong. - Do not change a test's expected value to make it pass unless the user confirms the old expectation was wrong. - Add a log line to find a bug if you need to, and remove it before you finish. ## When you are stuck - After two failed attempts at the same fix, stop and report what you tried, what happened, and your best guess. Do not keep looping. - If the docs and your memory disagree, trust the docs for the installed version. Say which version you checked. ## Talking to the user - Use the user's words for features. If they said "inventory", do not rename it "item management system". - When you need a decision, offer two or three concrete options with the tradeoff in one line each. - Report a risk the moment you see it (data loss, a paid API call, a public deploy), not at the end. - Do not pad answers with praise, apologies, or a recap of the request. Lead with what you did. - If the user is new to the tool, link the one doc page that explains the concept instead of a long lecture. ## Done checklist 1. The change matches the plan, or you explained why it changed. 2. The project's own check ran and passed, or you said why it could not run. 3. No secrets, debug logs, or stray files were added. 4. You listed every file you changed and anything left unfinished. ``` ### Copilot Install path: `.github/copilot-instructions.md` Plain text: https://loadout-blush.vercel.app/packs/vibe-coder-starter/files/copilot-instructions.md ``` # Vibe Coder Starter Follow these rules on every task. They outrank a vague "just build it" prompt. ## Plan, then edit - Before the first code change, write a 3 to 6 line plan: what you will touch, what you will not touch, and how you will know it works. - If the task is ambiguous or would change behavior the user did not mention, ask one concrete question and wait. Do not guess at product decisions. - Read the files you will edit before editing them. Match the names, types, and style already in the repo. ## Small diffs - Change only what the task needs. Do not reformat, rename, or "clean up" unrelated code. - One concern per change. Prefer editing an existing function over adding a new abstraction. - Do not add a dependency, a new config file, or a new service unless the task requires it. If it does, say why before installing. ## Secrets and git - Never read, print, or commit secrets: `.env`, `.env.*` (except `*.example`), keys, tokens, or credential files. - Never put a real key in source, in a test fixture, or in a commit message. Use placeholders like `YOUR_KEY_HERE`. - Do not run `git commit`, `git push`, `git reset`, or force-push unless the user asked for that exact action. - Do not skip hooks (`--no-verify`) or amend a commit you did not just make in this session. ## Deleting and destructive commands - Ask before deleting or renaming a file, dropping a table, wiping a directory, or running a command that cannot be undone (`reset --hard`, `rm -rf`, `DROP`, force push). - Do not delete lockfiles, generated project files the toolchain owns (`.meta`, `.godot`, migration history), or files you do not understand. ## Prove it - Run the project's own check before saying the work is done: the test, lint, typecheck, or play command already in the repo. Say the exact command and whether it passed. - If you cannot run it (missing runtime, no permission, a GUI tool), say that plainly. Do not claim "it works" from reading the code. - When a command fails, paste the relevant error and fix the cause. Do not silence the error or delete the test. ## Explain simply - When you finish, say what changed, which files, and how to try it, in short sentences a new teammate could follow. - If you left something unfinished or untested, list it. Do not hide it in a "next steps" dump. ## Dependencies and setup - Use the package manager the repo already uses (look for `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lock`, `uv.lock`, `poetry.lock`). Do not mix managers or add a second lockfile. - Pin what you add to the version you tested. Do not upgrade unrelated packages "while you are there". - If a command needs a global install or `sudo`, stop and ask. ## Errors and debugging - Read the full error before changing code. Fix the first error in the log, then rerun. Later errors are often caused by the first. - Do not wrap code in `try/catch` or `if (x)` just to make an error disappear. Find out why the value is wrong. - Do not change a test's expected value to make it pass unless the user confirms the old expectation was wrong. - Add a log line to find a bug if you need to, and remove it before you finish. ## When you are stuck - After two failed attempts at the same fix, stop and report what you tried, what happened, and your best guess. Do not keep looping. - If the docs and your memory disagree, trust the docs for the installed version. Say which version you checked. ## Talking to the user - Use the user's words for features. If they said "inventory", do not rename it "item management system". - When you need a decision, offer two or three concrete options with the tradeoff in one line each. - Report a risk the moment you see it (data loss, a paid API call, a public deploy), not at the end. - Do not pad answers with praise, apologies, or a recap of the request. Lead with what you did. - If the user is new to the tool, link the one doc page that explains the concept instead of a long lecture. ## Done checklist 1. The change matches the plan, or you explained why it changed. 2. The project's own check ran and passed, or you said why it could not run. 3. No secrets, debug logs, or stray files were added. 4. You listed every file you changed and anything left unfinished. ``` # Next.js Supabase Cursor rules > Rules pinned to Next.js 16 and Supabase SSR โ€” the APIs that actually work with React 19. Same advice in all four agent file formats, snippet-checked. Pack: Next.js + Supabase (`nextjs-supabase`) Page: https://loadout-blush.vercel.app/packs/nextjs-supabase ## What it does Stops the mistakes agents still make on this stack: sync params, treating middleware.ts as dead code, renaming an Edge interceptor to proxy.ts, the deprecated auth-helpers package, and trusting getSession() for authorization. Includes the proxy session-refresh sample. Rules match the Next.js 16 upgrade guide, the November 2026 security release (16.4.5), and Supabase SSR docs as of November 2026. ## Who it's for People vibe-coding a Next.js App Router app with Supabase Auth, Postgres, and RLS. ## Versions pinned - Next.js: 16.4.5 - React: 19.3 - @supabase/ssr: 0.12.7 - @supabase/supabase-js: current, installed alongside @supabase/ssr Last tested: 2026-11-04 ## How it was checked doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed ## Sources - https://nextjs.org/blog/november-2026-security-release - https://nextjs.org/blog/nextjs-security-update-october-14-2026 - https://nextjs.org/blog/next-16 - https://nextjs.org/blog/next-16-4 - https://nextjs.org/docs/app/guides/upgrading/version-16 - https://nextjs.org/docs/app/api-reference/file-conventions/proxy - https://supabase.com/docs/guides/auth/server-side/creating-a-client - https://www.npmjs.com/package/@supabase/ssr ## Other free packs - [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter): Safe defaults for any AI coding agent in any stack. Tool-agnostic rules for Cursor, Claude Code, AGENTS.md, and Copilot so agents stay scoped and stop guessing. - [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6): Unity 6 C# rules that refuse obsolete 2022 / UNet patterns. Input System defaults, current APIs, four files ready for Cursor, Claude, AGENTS.md, and Copilot. - [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4): GDScript 2.0 rules that reject Godot 3 APIs. Written for Godot 4.x, parse-tested where it counts, shipped for every major AI coding tool. ## Install ### Cursor Path: `.cursor/rules/nextjs-supabase.mdc` 1. Download the Cursor zip, or copy the .mdc file from this page. 2. Save it as .cursor/rules/nextjs-supabase.mdc. 3. Commit it. Cursor reads project rules from that folder. ### Claude Code Path: `CLAUDE.md` 1. Download the Claude zip, or copy CLAUDE.md. 2. Put CLAUDE.md in the project root. 3. Claude Code reads it as project memory on the next session. ### AGENTS.md Path: `AGENTS.md` 1. Download the Agents zip, or copy AGENTS.md. 2. Put AGENTS.md in the project root. 3. Agents that read AGENTS.md, including Codex and Cursor, pick it up there. ### GitHub Copilot Path: `.github/copilot-instructions.md` 1. Download the Copilot zip, or copy the instructions file. 2. Save it as .github/copilot-instructions.md. 3. Copilot reads repository instructions from that path. ## Files ### Cursor Install path: `.cursor/rules/nextjs-supabase.mdc` Plain text: https://loadout-blush.vercel.app/packs/nextjs-supabase/files/cursor.mdc ```` --- description: Next.js 16.4 App Router with @supabase/ssr 0.12.7. Async params, proxy.ts on Node, Edge stays middleware.ts, getClaims, RLS. globs: "{app,src,lib,components}/**/*.{ts,tsx},proxy.ts,middleware.ts,**/*.sql" alwaysApply: false --- # Next.js 16.4 + Supabase SSR Pinned on 2026-11-04: Next.js 16.4.5 (App Router, Nov 2026 security release), React 19.3, `@supabase/ssr` 0.12.7, `@supabase/supabase-js`. Do not generate Pages Router or `@supabase/auth-helpers-nextjs`. On the Supabase client, pass `getAll` and `setAll` only. Do not pass `get`, `set`, or `remove`. ## Routing and components - Server Components are the default. Add `"use client"` only when the file uses state, effects, browser APIs, or event handlers. Push that file to a leaf component. - `params` and `searchParams` are Promises. Always `await` them. Synchronous access typechecks in places and crashes at runtime. - `cookies()`, `headers()`, and `draftMode()` from `next/headers` are async. `await` them. - On Next.js 16 the Supabase session refresh belongs in `proxy.ts`, and the export is `proxy`. `proxy.ts` runs on the Node.js runtime. That runtime cannot be set to Edge. Setting `runtime` in `proxy.ts` throws. - `middleware.ts` is deprecated and still runs, including on the Edge runtime. Keep it only when the interceptor must stay on Edge, and export `middleware`. Do not rename that file to `proxy.ts`. Do not treat `middleware.ts` as dead code. A file Next never calls will not refresh the session. - Do not ship both `proxy.ts` and `middleware.ts`. Next.js uses one interceptor. - New `create-next-app` projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. ```tsx export default async function Page({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params return

{id}

} ``` ## Supabase clients - Install `@supabase/supabase-js` and `@supabase/ssr`. Never import `@supabase/auth-helpers-nextjs`. - Env names from the current docs: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`. The secret key and the service-role key stay server-only, with no `NEXT_PUBLIC_` prefix. - Browser code uses `createBrowserClient`. Server Components, Server Actions, and Route Handlers use `createServerClient` with `cookies.getAll` / `cookies.setAll`. - `setAll` receives a second argument, the cache headers. Apply `Cache-Control`, `Expires`, and `Pragma` on the response. Skipping them lets a CDN store one user's session cookie and serve it to someone else. - In a Server Component, `setAll` cannot write cookies. Catch and ignore that error. The write happens in `proxy.ts`, or in the `middleware.ts` you kept for Edge. - Put the server client in `lib/supabase/server.ts` and the refresh helper in `lib/supabase/proxy.ts`. The root `proxy.ts` only calls that helper. If the app lives in `src/`, put `proxy.ts` in `src/` and the helpers in `src/lib/supabase/`. ## Auth - To decide whether a request is allowed, call `supabase.auth.getClaims()`. It verifies the JWT (locally against JWKS on asymmetric keys, which new projects use). - Use `getUser()` only when you need the current user row from the Auth server. Use `getSession()` only to read the raw token, and never trust `session.user` for authorization. - The refresh helper calls `getClaims()` immediately after `createServerClient`. Do not run other code between those two calls. It copies cookies onto both the request and the response, applies the cache headers, and returns the response that `setAll` last built. An earlier response does not carry the refreshed cookies, so the user is signed out on the next request. - Pages and actions still call `getClaims()` themselves. Proxy is not the only lock. - Sign-in and sign-out go through Server Actions, not a client `fetch` to your own route. ## Database - Every table in `public` has RLS enabled. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. - Select named columns. Do not `.select("*")` and do not return the whole row to the client. - Validate mutation input with Zod, then check `getClaims()`, then write. Return a typed `{ ok, error }` object, not a thrown string. ```ts const { data, error } = await supabase .from("notes") .select("id, title, created_at") .eq("user_id", claims.sub) ``` The server client the action imports, and the refresh helper `proxy.ts` calls. `claims` in the query above is `data.claims` from `getClaims()`. ```ts import { createServerClient } from "@supabase/ssr" import { cookies } from "next/headers" export async function createClient() { const cookieStore = await cookies() return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return cookieStore.getAll() }, setAll(cookiesToSet, _headers) { try { cookiesToSet.forEach(({ name, value, options }) => cookieStore.set(name, value, options), ) } catch { // setAll from a Server Component cannot write cookies. // proxy.ts (or Edge middleware.ts) refreshes the session. } }, }, }, ) } ``` ```ts import { createServerClient } from "@supabase/ssr" import { NextResponse, type NextRequest } from "next/server" export async function updateSession(request: NextRequest) { let supabaseResponse = NextResponse.next({ request }) const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return request.cookies.getAll() }, setAll(cookiesToSet, headers) { cookiesToSet.forEach(({ name, value }) => request.cookies.set(name, value)) supabaseResponse = NextResponse.next({ request }) cookiesToSet.forEach(({ name, value, options }) => supabaseResponse.cookies.set(name, value, options), ) Object.entries(headers).forEach(([key, value]) => supabaseResponse.headers.set(key, value), ) }, }, }, ) await supabase.auth.getClaims() return supabaseResponse } ``` ```ts import { type NextRequest } from "next/server" import { updateSession } from "@/lib/supabase/proxy" export async function proxy(request: NextRequest) { return await updateSession(request) } export const config = { matcher: [ "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", ], } ``` On an Edge-only project, the same `updateSession` call is exported as `middleware` from `middleware.ts`. Do not also add `proxy.ts`. ## Server Actions and forms - Put `"use server"` at the top of an actions file, or inside the function body. Do not export non-async values from a `"use server"` file. - Every action re-checks auth with `getClaims()`. An action is a public HTTP endpoint even if no button calls it. - After a write the signed-in user must see on the next render, call `updateTag("notes")` from `next/cache` inside the Server Action. `updateTag` throws outside a Server Action. - In a Route Handler, call `revalidateTag(tag, "max")` for stale-while-revalidate, or `revalidateTag(tag, { expire: 0 })` when the next read must wait. The single-argument `revalidateTag(tag)` is deprecated. `revalidatePath` still invalidates one path. Do not force a full `router.refresh()` from the client to fix stale data. ```ts "use server" import { updateTag } from "next/cache" import { z } from "zod" import { createClient } from "@/lib/supabase/server" const NoteInput = z.object({ title: z.string().min(1).max(200) }) export async function createNote(formData: FormData) { const parsed = NoteInput.safeParse({ title: formData.get("title") }) if (!parsed.success) return { ok: false, error: "Invalid title" } const supabase = await createClient() const { data, error } = await supabase.auth.getClaims() if (error || !data) return { ok: false, error: "Not signed in" } const { error: insertError } = await supabase .from("notes") .insert({ title: parsed.data.title, user_id: data.claims.sub }) if (insertError) return { ok: false, error: insertError.message } updateTag("notes") return { ok: true } } ``` ## Deploying on Vercel - Set `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` in the Vercel project for Preview and Production. - Keep the Supabase secret key out of the client bundle. Search the build for `NEXT_PUBLIC_` names before shipping. - Add every deployed URL (production and preview pattern) to Supabase Auth's redirect allow list, or OAuth and magic links fail. ## Done checklist 1. `npx tsc --noEmit` and `next build` pass, or you said why they could not run. 2. New tables have RLS enabled plus policies, in a migration file. 3. No `getSession()` is used for authorization, and no `select("*")` was added. 4. Session refresh calls `getClaims()` from `proxy.ts`, or from `middleware.ts` only if Edge is required, and returns the response `setAll` last built. 5. A Server Action that must show its own write calls `updateTag`. No single-argument `revalidateTag(tag)`. ```` ### Claude Install path: `CLAUDE.md` Plain text: https://loadout-blush.vercel.app/packs/nextjs-supabase/files/CLAUDE.md ```` # Next.js 16.4 + Supabase SSR Pinned on 2026-11-04: Next.js 16.4.5 (App Router, Nov 2026 security release), React 19.3, `@supabase/ssr` 0.12.7, `@supabase/supabase-js`. Do not generate Pages Router or `@supabase/auth-helpers-nextjs`. On the Supabase client, pass `getAll` and `setAll` only. Do not pass `get`, `set`, or `remove`. ## Routing and components - Server Components are the default. Add `"use client"` only when the file uses state, effects, browser APIs, or event handlers. Push that file to a leaf component. - `params` and `searchParams` are Promises. Always `await` them. Synchronous access typechecks in places and crashes at runtime. - `cookies()`, `headers()`, and `draftMode()` from `next/headers` are async. `await` them. - On Next.js 16 the Supabase session refresh belongs in `proxy.ts`, and the export is `proxy`. `proxy.ts` runs on the Node.js runtime. That runtime cannot be set to Edge. Setting `runtime` in `proxy.ts` throws. - `middleware.ts` is deprecated and still runs, including on the Edge runtime. Keep it only when the interceptor must stay on Edge, and export `middleware`. Do not rename that file to `proxy.ts`. Do not treat `middleware.ts` as dead code. A file Next never calls will not refresh the session. - Do not ship both `proxy.ts` and `middleware.ts`. Next.js uses one interceptor. - New `create-next-app` projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. ```tsx export default async function Page({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params return

{id}

} ``` ## Supabase clients - Install `@supabase/supabase-js` and `@supabase/ssr`. Never import `@supabase/auth-helpers-nextjs`. - Env names from the current docs: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`. The secret key and the service-role key stay server-only, with no `NEXT_PUBLIC_` prefix. - Browser code uses `createBrowserClient`. Server Components, Server Actions, and Route Handlers use `createServerClient` with `cookies.getAll` / `cookies.setAll`. - `setAll` receives a second argument, the cache headers. Apply `Cache-Control`, `Expires`, and `Pragma` on the response. Skipping them lets a CDN store one user's session cookie and serve it to someone else. - In a Server Component, `setAll` cannot write cookies. Catch and ignore that error. The write happens in `proxy.ts`, or in the `middleware.ts` you kept for Edge. - Put the server client in `lib/supabase/server.ts` and the refresh helper in `lib/supabase/proxy.ts`. The root `proxy.ts` only calls that helper. If the app lives in `src/`, put `proxy.ts` in `src/` and the helpers in `src/lib/supabase/`. ## Auth - To decide whether a request is allowed, call `supabase.auth.getClaims()`. It verifies the JWT (locally against JWKS on asymmetric keys, which new projects use). - Use `getUser()` only when you need the current user row from the Auth server. Use `getSession()` only to read the raw token, and never trust `session.user` for authorization. - The refresh helper calls `getClaims()` immediately after `createServerClient`. Do not run other code between those two calls. It copies cookies onto both the request and the response, applies the cache headers, and returns the response that `setAll` last built. An earlier response does not carry the refreshed cookies, so the user is signed out on the next request. - Pages and actions still call `getClaims()` themselves. Proxy is not the only lock. - Sign-in and sign-out go through Server Actions, not a client `fetch` to your own route. ## Database - Every table in `public` has RLS enabled. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. - Select named columns. Do not `.select("*")` and do not return the whole row to the client. - Validate mutation input with Zod, then check `getClaims()`, then write. Return a typed `{ ok, error }` object, not a thrown string. ```ts const { data, error } = await supabase .from("notes") .select("id, title, created_at") .eq("user_id", claims.sub) ``` The server client the action imports, and the refresh helper `proxy.ts` calls. `claims` in the query above is `data.claims` from `getClaims()`. ```ts import { createServerClient } from "@supabase/ssr" import { cookies } from "next/headers" export async function createClient() { const cookieStore = await cookies() return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return cookieStore.getAll() }, setAll(cookiesToSet, _headers) { try { cookiesToSet.forEach(({ name, value, options }) => cookieStore.set(name, value, options), ) } catch { // setAll from a Server Component cannot write cookies. // proxy.ts (or Edge middleware.ts) refreshes the session. } }, }, }, ) } ``` ```ts import { createServerClient } from "@supabase/ssr" import { NextResponse, type NextRequest } from "next/server" export async function updateSession(request: NextRequest) { let supabaseResponse = NextResponse.next({ request }) const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return request.cookies.getAll() }, setAll(cookiesToSet, headers) { cookiesToSet.forEach(({ name, value }) => request.cookies.set(name, value)) supabaseResponse = NextResponse.next({ request }) cookiesToSet.forEach(({ name, value, options }) => supabaseResponse.cookies.set(name, value, options), ) Object.entries(headers).forEach(([key, value]) => supabaseResponse.headers.set(key, value), ) }, }, }, ) await supabase.auth.getClaims() return supabaseResponse } ``` ```ts import { type NextRequest } from "next/server" import { updateSession } from "@/lib/supabase/proxy" export async function proxy(request: NextRequest) { return await updateSession(request) } export const config = { matcher: [ "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", ], } ``` On an Edge-only project, the same `updateSession` call is exported as `middleware` from `middleware.ts`. Do not also add `proxy.ts`. ## Server Actions and forms - Put `"use server"` at the top of an actions file, or inside the function body. Do not export non-async values from a `"use server"` file. - Every action re-checks auth with `getClaims()`. An action is a public HTTP endpoint even if no button calls it. - After a write the signed-in user must see on the next render, call `updateTag("notes")` from `next/cache` inside the Server Action. `updateTag` throws outside a Server Action. - In a Route Handler, call `revalidateTag(tag, "max")` for stale-while-revalidate, or `revalidateTag(tag, { expire: 0 })` when the next read must wait. The single-argument `revalidateTag(tag)` is deprecated. `revalidatePath` still invalidates one path. Do not force a full `router.refresh()` from the client to fix stale data. ```ts "use server" import { updateTag } from "next/cache" import { z } from "zod" import { createClient } from "@/lib/supabase/server" const NoteInput = z.object({ title: z.string().min(1).max(200) }) export async function createNote(formData: FormData) { const parsed = NoteInput.safeParse({ title: formData.get("title") }) if (!parsed.success) return { ok: false, error: "Invalid title" } const supabase = await createClient() const { data, error } = await supabase.auth.getClaims() if (error || !data) return { ok: false, error: "Not signed in" } const { error: insertError } = await supabase .from("notes") .insert({ title: parsed.data.title, user_id: data.claims.sub }) if (insertError) return { ok: false, error: insertError.message } updateTag("notes") return { ok: true } } ``` ## Deploying on Vercel - Set `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` in the Vercel project for Preview and Production. - Keep the Supabase secret key out of the client bundle. Search the build for `NEXT_PUBLIC_` names before shipping. - Add every deployed URL (production and preview pattern) to Supabase Auth's redirect allow list, or OAuth and magic links fail. ## Done checklist 1. `npx tsc --noEmit` and `next build` pass, or you said why they could not run. 2. New tables have RLS enabled plus policies, in a migration file. 3. No `getSession()` is used for authorization, and no `select("*")` was added. 4. Session refresh calls `getClaims()` from `proxy.ts`, or from `middleware.ts` only if Edge is required, and returns the response `setAll` last built. 5. A Server Action that must show its own write calls `updateTag`. No single-argument `revalidateTag(tag)`. ## Claude Code - When you add a Supabase client, put the helpers in `lib/supabase/client.ts` (browser), `lib/supabase/server.ts` (server), and `lib/supabase/proxy.ts` (session refresh). The root `proxy.ts` only calls the helper. Do not create another copy inside a component. - After editing auth or data code, run `npx tsc --noEmit` if the repo has a `tsconfig.json`, and say whether it passed. ```` ### Agents Install path: `AGENTS.md` Plain text: https://loadout-blush.vercel.app/packs/nextjs-supabase/files/AGENTS.md ```` # Next.js 16.4 + Supabase SSR Pinned on 2026-11-04: Next.js 16.4.5 (App Router, Nov 2026 security release), React 19.3, `@supabase/ssr` 0.12.7, `@supabase/supabase-js`. Do not generate Pages Router or `@supabase/auth-helpers-nextjs`. On the Supabase client, pass `getAll` and `setAll` only. Do not pass `get`, `set`, or `remove`. ## Routing and components - Server Components are the default. Add `"use client"` only when the file uses state, effects, browser APIs, or event handlers. Push that file to a leaf component. - `params` and `searchParams` are Promises. Always `await` them. Synchronous access typechecks in places and crashes at runtime. - `cookies()`, `headers()`, and `draftMode()` from `next/headers` are async. `await` them. - On Next.js 16 the Supabase session refresh belongs in `proxy.ts`, and the export is `proxy`. `proxy.ts` runs on the Node.js runtime. That runtime cannot be set to Edge. Setting `runtime` in `proxy.ts` throws. - `middleware.ts` is deprecated and still runs, including on the Edge runtime. Keep it only when the interceptor must stay on Edge, and export `middleware`. Do not rename that file to `proxy.ts`. Do not treat `middleware.ts` as dead code. A file Next never calls will not refresh the session. - Do not ship both `proxy.ts` and `middleware.ts`. Next.js uses one interceptor. - New `create-next-app` projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. ```tsx export default async function Page({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params return

{id}

} ``` ## Supabase clients - Install `@supabase/supabase-js` and `@supabase/ssr`. Never import `@supabase/auth-helpers-nextjs`. - Env names from the current docs: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`. The secret key and the service-role key stay server-only, with no `NEXT_PUBLIC_` prefix. - Browser code uses `createBrowserClient`. Server Components, Server Actions, and Route Handlers use `createServerClient` with `cookies.getAll` / `cookies.setAll`. - `setAll` receives a second argument, the cache headers. Apply `Cache-Control`, `Expires`, and `Pragma` on the response. Skipping them lets a CDN store one user's session cookie and serve it to someone else. - In a Server Component, `setAll` cannot write cookies. Catch and ignore that error. The write happens in `proxy.ts`, or in the `middleware.ts` you kept for Edge. - Put the server client in `lib/supabase/server.ts` and the refresh helper in `lib/supabase/proxy.ts`. The root `proxy.ts` only calls that helper. If the app lives in `src/`, put `proxy.ts` in `src/` and the helpers in `src/lib/supabase/`. ## Auth - To decide whether a request is allowed, call `supabase.auth.getClaims()`. It verifies the JWT (locally against JWKS on asymmetric keys, which new projects use). - Use `getUser()` only when you need the current user row from the Auth server. Use `getSession()` only to read the raw token, and never trust `session.user` for authorization. - The refresh helper calls `getClaims()` immediately after `createServerClient`. Do not run other code between those two calls. It copies cookies onto both the request and the response, applies the cache headers, and returns the response that `setAll` last built. An earlier response does not carry the refreshed cookies, so the user is signed out on the next request. - Pages and actions still call `getClaims()` themselves. Proxy is not the only lock. - Sign-in and sign-out go through Server Actions, not a client `fetch` to your own route. ## Database - Every table in `public` has RLS enabled. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. - Select named columns. Do not `.select("*")` and do not return the whole row to the client. - Validate mutation input with Zod, then check `getClaims()`, then write. Return a typed `{ ok, error }` object, not a thrown string. ```ts const { data, error } = await supabase .from("notes") .select("id, title, created_at") .eq("user_id", claims.sub) ``` The server client the action imports, and the refresh helper `proxy.ts` calls. `claims` in the query above is `data.claims` from `getClaims()`. ```ts import { createServerClient } from "@supabase/ssr" import { cookies } from "next/headers" export async function createClient() { const cookieStore = await cookies() return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return cookieStore.getAll() }, setAll(cookiesToSet, _headers) { try { cookiesToSet.forEach(({ name, value, options }) => cookieStore.set(name, value, options), ) } catch { // setAll from a Server Component cannot write cookies. // proxy.ts (or Edge middleware.ts) refreshes the session. } }, }, }, ) } ``` ```ts import { createServerClient } from "@supabase/ssr" import { NextResponse, type NextRequest } from "next/server" export async function updateSession(request: NextRequest) { let supabaseResponse = NextResponse.next({ request }) const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return request.cookies.getAll() }, setAll(cookiesToSet, headers) { cookiesToSet.forEach(({ name, value }) => request.cookies.set(name, value)) supabaseResponse = NextResponse.next({ request }) cookiesToSet.forEach(({ name, value, options }) => supabaseResponse.cookies.set(name, value, options), ) Object.entries(headers).forEach(([key, value]) => supabaseResponse.headers.set(key, value), ) }, }, }, ) await supabase.auth.getClaims() return supabaseResponse } ``` ```ts import { type NextRequest } from "next/server" import { updateSession } from "@/lib/supabase/proxy" export async function proxy(request: NextRequest) { return await updateSession(request) } export const config = { matcher: [ "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", ], } ``` On an Edge-only project, the same `updateSession` call is exported as `middleware` from `middleware.ts`. Do not also add `proxy.ts`. ## Server Actions and forms - Put `"use server"` at the top of an actions file, or inside the function body. Do not export non-async values from a `"use server"` file. - Every action re-checks auth with `getClaims()`. An action is a public HTTP endpoint even if no button calls it. - After a write the signed-in user must see on the next render, call `updateTag("notes")` from `next/cache` inside the Server Action. `updateTag` throws outside a Server Action. - In a Route Handler, call `revalidateTag(tag, "max")` for stale-while-revalidate, or `revalidateTag(tag, { expire: 0 })` when the next read must wait. The single-argument `revalidateTag(tag)` is deprecated. `revalidatePath` still invalidates one path. Do not force a full `router.refresh()` from the client to fix stale data. ```ts "use server" import { updateTag } from "next/cache" import { z } from "zod" import { createClient } from "@/lib/supabase/server" const NoteInput = z.object({ title: z.string().min(1).max(200) }) export async function createNote(formData: FormData) { const parsed = NoteInput.safeParse({ title: formData.get("title") }) if (!parsed.success) return { ok: false, error: "Invalid title" } const supabase = await createClient() const { data, error } = await supabase.auth.getClaims() if (error || !data) return { ok: false, error: "Not signed in" } const { error: insertError } = await supabase .from("notes") .insert({ title: parsed.data.title, user_id: data.claims.sub }) if (insertError) return { ok: false, error: insertError.message } updateTag("notes") return { ok: true } } ``` ## Deploying on Vercel - Set `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` in the Vercel project for Preview and Production. - Keep the Supabase secret key out of the client bundle. Search the build for `NEXT_PUBLIC_` names before shipping. - Add every deployed URL (production and preview pattern) to Supabase Auth's redirect allow list, or OAuth and magic links fail. ## Done checklist 1. `npx tsc --noEmit` and `next build` pass, or you said why they could not run. 2. New tables have RLS enabled plus policies, in a migration file. 3. No `getSession()` is used for authorization, and no `select("*")` was added. 4. Session refresh calls `getClaims()` from `proxy.ts`, or from `middleware.ts` only if Edge is required, and returns the response `setAll` last built. 5. A Server Action that must show its own write calls `updateTag`. No single-argument `revalidateTag(tag)`. ```` ### Copilot Install path: `.github/copilot-instructions.md` Plain text: https://loadout-blush.vercel.app/packs/nextjs-supabase/files/copilot-instructions.md ```` # Next.js 16.4 + Supabase SSR Pinned on 2026-11-04: Next.js 16.4.5 (App Router, Nov 2026 security release), React 19.3, `@supabase/ssr` 0.12.7, `@supabase/supabase-js`. Do not generate Pages Router or `@supabase/auth-helpers-nextjs`. On the Supabase client, pass `getAll` and `setAll` only. Do not pass `get`, `set`, or `remove`. ## Routing and components - Server Components are the default. Add `"use client"` only when the file uses state, effects, browser APIs, or event handlers. Push that file to a leaf component. - `params` and `searchParams` are Promises. Always `await` them. Synchronous access typechecks in places and crashes at runtime. - `cookies()`, `headers()`, and `draftMode()` from `next/headers` are async. `await` them. - On Next.js 16 the Supabase session refresh belongs in `proxy.ts`, and the export is `proxy`. `proxy.ts` runs on the Node.js runtime. That runtime cannot be set to Edge. Setting `runtime` in `proxy.ts` throws. - `middleware.ts` is deprecated and still runs, including on the Edge runtime. Keep it only when the interceptor must stay on Edge, and export `middleware`. Do not rename that file to `proxy.ts`. Do not treat `middleware.ts` as dead code. A file Next never calls will not refresh the session. - Do not ship both `proxy.ts` and `middleware.ts`. Next.js uses one interceptor. - New `create-next-app` projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. ```tsx export default async function Page({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params return

{id}

} ``` ## Supabase clients - Install `@supabase/supabase-js` and `@supabase/ssr`. Never import `@supabase/auth-helpers-nextjs`. - Env names from the current docs: `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`. The secret key and the service-role key stay server-only, with no `NEXT_PUBLIC_` prefix. - Browser code uses `createBrowserClient`. Server Components, Server Actions, and Route Handlers use `createServerClient` with `cookies.getAll` / `cookies.setAll`. - `setAll` receives a second argument, the cache headers. Apply `Cache-Control`, `Expires`, and `Pragma` on the response. Skipping them lets a CDN store one user's session cookie and serve it to someone else. - In a Server Component, `setAll` cannot write cookies. Catch and ignore that error. The write happens in `proxy.ts`, or in the `middleware.ts` you kept for Edge. - Put the server client in `lib/supabase/server.ts` and the refresh helper in `lib/supabase/proxy.ts`. The root `proxy.ts` only calls that helper. If the app lives in `src/`, put `proxy.ts` in `src/` and the helpers in `src/lib/supabase/`. ## Auth - To decide whether a request is allowed, call `supabase.auth.getClaims()`. It verifies the JWT (locally against JWKS on asymmetric keys, which new projects use). - Use `getUser()` only when you need the current user row from the Auth server. Use `getSession()` only to read the raw token, and never trust `session.user` for authorization. - The refresh helper calls `getClaims()` immediately after `createServerClient`. Do not run other code between those two calls. It copies cookies onto both the request and the response, applies the cache headers, and returns the response that `setAll` last built. An earlier response does not carry the refreshed cookies, so the user is signed out on the next request. - Pages and actions still call `getClaims()` themselves. Proxy is not the only lock. - Sign-in and sign-out go through Server Actions, not a client `fetch` to your own route. ## Database - Every table in `public` has RLS enabled. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. - Select named columns. Do not `.select("*")` and do not return the whole row to the client. - Validate mutation input with Zod, then check `getClaims()`, then write. Return a typed `{ ok, error }` object, not a thrown string. ```ts const { data, error } = await supabase .from("notes") .select("id, title, created_at") .eq("user_id", claims.sub) ``` The server client the action imports, and the refresh helper `proxy.ts` calls. `claims` in the query above is `data.claims` from `getClaims()`. ```ts import { createServerClient } from "@supabase/ssr" import { cookies } from "next/headers" export async function createClient() { const cookieStore = await cookies() return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return cookieStore.getAll() }, setAll(cookiesToSet, _headers) { try { cookiesToSet.forEach(({ name, value, options }) => cookieStore.set(name, value, options), ) } catch { // setAll from a Server Component cannot write cookies. // proxy.ts (or Edge middleware.ts) refreshes the session. } }, }, }, ) } ``` ```ts import { createServerClient } from "@supabase/ssr" import { NextResponse, type NextRequest } from "next/server" export async function updateSession(request: NextRequest) { let supabaseResponse = NextResponse.next({ request }) const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { cookies: { getAll() { return request.cookies.getAll() }, setAll(cookiesToSet, headers) { cookiesToSet.forEach(({ name, value }) => request.cookies.set(name, value)) supabaseResponse = NextResponse.next({ request }) cookiesToSet.forEach(({ name, value, options }) => supabaseResponse.cookies.set(name, value, options), ) Object.entries(headers).forEach(([key, value]) => supabaseResponse.headers.set(key, value), ) }, }, }, ) await supabase.auth.getClaims() return supabaseResponse } ``` ```ts import { type NextRequest } from "next/server" import { updateSession } from "@/lib/supabase/proxy" export async function proxy(request: NextRequest) { return await updateSession(request) } export const config = { matcher: [ "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", ], } ``` On an Edge-only project, the same `updateSession` call is exported as `middleware` from `middleware.ts`. Do not also add `proxy.ts`. ## Server Actions and forms - Put `"use server"` at the top of an actions file, or inside the function body. Do not export non-async values from a `"use server"` file. - Every action re-checks auth with `getClaims()`. An action is a public HTTP endpoint even if no button calls it. - After a write the signed-in user must see on the next render, call `updateTag("notes")` from `next/cache` inside the Server Action. `updateTag` throws outside a Server Action. - In a Route Handler, call `revalidateTag(tag, "max")` for stale-while-revalidate, or `revalidateTag(tag, { expire: 0 })` when the next read must wait. The single-argument `revalidateTag(tag)` is deprecated. `revalidatePath` still invalidates one path. Do not force a full `router.refresh()` from the client to fix stale data. ```ts "use server" import { updateTag } from "next/cache" import { z } from "zod" import { createClient } from "@/lib/supabase/server" const NoteInput = z.object({ title: z.string().min(1).max(200) }) export async function createNote(formData: FormData) { const parsed = NoteInput.safeParse({ title: formData.get("title") }) if (!parsed.success) return { ok: false, error: "Invalid title" } const supabase = await createClient() const { data, error } = await supabase.auth.getClaims() if (error || !data) return { ok: false, error: "Not signed in" } const { error: insertError } = await supabase .from("notes") .insert({ title: parsed.data.title, user_id: data.claims.sub }) if (insertError) return { ok: false, error: insertError.message } updateTag("notes") return { ok: true } } ``` ## Deploying on Vercel - Set `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` in the Vercel project for Preview and Production. - Keep the Supabase secret key out of the client bundle. Search the build for `NEXT_PUBLIC_` names before shipping. - Add every deployed URL (production and preview pattern) to Supabase Auth's redirect allow list, or OAuth and magic links fail. ## Done checklist 1. `npx tsc --noEmit` and `next build` pass, or you said why they could not run. 2. New tables have RLS enabled plus policies, in a migration file. 3. No `getSession()` is used for authorization, and no `select("*")` was added. 4. Session refresh calls `getClaims()` from `proxy.ts`, or from `middleware.ts` only if Edge is required, and returns the response `setAll` last built. 5. A Server Action that must show its own write calls `updateTag`. No single-argument `revalidateTag(tag)`. ```` # Cursor rules for Unity 6 > Unity 6 C# rules that refuse obsolete 2022 / UNet patterns. Input System defaults, current APIs, four files ready for Cursor, Claude, AGENTS.md, and Copilot. Pack: Unity 6 (`unity-6`) Page: https://loadout-blush.vercel.app/packs/unity-6 ## What it does Keeps agents off the calls Unity 6 removed or replaced: FindObjectOfType, Rigidbody.velocity, and the legacy Input Manager. Also stops the two Unity-specific footguns, deleting .meta files and running dotnet build. ## Who it's for People using an AI agent inside a Unity 6 (6000.x) project, including Unity MCP setups. ## Versions pinned - Unity: 6.3 LTS (6000.3.x), APIs checked against 6000.6 docs on 2026-10-15 - Input System: com.unity.inputsystem (Unity 6 new-project default) - Note: FindFirstObjectByType is valid on 6.0 but obsolete on 6.6. This pack tells the agent to use FindAnyObjectByType instead, which is valid on both. Last tested: 2026-10-15 ## How it was checked doc-verified ## Sources - https://unity.com/releases/unity-6/support - https://docs.unity.com/en-us/engine/6000.0/manual/upgrade-guides/upgrade-guide-unity6 - https://docs.unity.com/en-us/engine/6000.6/script-reference/unityengine/rigidbody/linearvelocity - https://docs.unity.com/en-us/engine/6000.6/manual/scripting/fundamental-unity-types/instanceid-to-entityid-migration ## Other free packs - [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter): Safe defaults for any AI coding agent in any stack. Tool-agnostic rules for Cursor, Claude Code, AGENTS.md, and Copilot so agents stay scoped and stop guessing. - [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase): Rules pinned to Next.js 16 and Supabase SSR โ€” the APIs that actually work with React 19. Same advice in all four agent file formats, snippet-checked. - [Godot 4 CLAUDE.md](https://loadout-blush.vercel.app/packs/godot-4): GDScript 2.0 rules that reject Godot 3 APIs. Written for Godot 4.x, parse-tested where it counts, shipped for every major AI coding tool. ## Install ### Cursor Path: `.cursor/rules/unity-6.mdc` 1. Download the Cursor zip, or copy the .mdc file from this page. 2. Save it as .cursor/rules/unity-6.mdc. 3. Commit it. Cursor reads project rules from that folder. ### Claude Code Path: `CLAUDE.md` 1. Download the Claude zip, or copy CLAUDE.md. 2. Put CLAUDE.md in the project root. 3. Claude Code reads it as project memory on the next session. ### AGENTS.md Path: `AGENTS.md` 1. Download the Agents zip, or copy AGENTS.md. 2. Put AGENTS.md in the project root. 3. Agents that read AGENTS.md, including Codex and Cursor, pick it up there. ### GitHub Copilot Path: `.github/copilot-instructions.md` 1. Download the Copilot zip, or copy the instructions file. 2. Save it as .github/copilot-instructions.md. 3. Copilot reads repository instructions from that path. ## Files ### Cursor Install path: `.cursor/rules/unity-6.mdc` Plain text: https://loadout-blush.vercel.app/packs/unity-6/files/cursor.mdc ```` --- description: Unity 6.3 LTS C# rules. Input System, linearVelocity, no FindObjectOfType, never touch .meta files. globs: "**/*.cs" alwaysApply: false --- # Unity 6 C# rules Pinned to Unity 6.3 LTS (6000.3.x, supported through December 2027). The same calls are valid on the 6000.6 update line checked 2026-10-15, with one exception called out below. Do not emit Unity 2022 or earlier APIs. ## Project files - Never delete, rename, or hand-edit a `.meta` file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. - Do not run `dotnet build` to "check" a Unity project. The editor compiles assemblies itself. A bare `dotnet build` fails or compiles the wrong set of asmdefs. - Edit scripts under `Assets/`. Do not write into `Library/`, `Temp/`, `Obj/`, or `Logs/`. ## Finding objects - `Object.FindObjectOfType` and `FindObjectsOfType` are obsolete. Do not use them. - When any match is fine, use `Object.FindAnyObjectByType()`. Do not call it from `Update` or `FixedUpdate`. Cache the result in `Awake` or `Start`. - On Unity 6.6 and newer, `FindFirstObjectByType` is also obsolete, because it depended on InstanceID ordering. Do not use it. If you need a specific object, query with `FindObjectsByType()` and sort by something real, such as sibling index. - Prefer a serialized reference (`[SerializeField] private Player player;`) over any Find call. ## Input and physics - Read input through the Input System package (`UnityEngine.InputSystem`). Do not call `Input.GetAxis`, `Input.GetKey`, or `Input.GetButton`. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. - Read buttons in `Update`. Write to a Rigidbody in `FixedUpdate`. - The velocity property is `Rigidbody.linearVelocity` (world space, units per second). `Rigidbody.velocity` does not exist in Unity 6. Do not assign `linearVelocity` every physics step. Use `AddForce` for ongoing motion and set `linearVelocity` only for an instant change such as a jump. - Cache `GetComponent()` once. Do not call `GetComponent`, `Find`, or `Camera.main` inside `Update`. ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` ## Data and safety - Expose designer fields with `[SerializeField] private`. Do not make gameplay fields public just so the Inspector can see them. - Put tuneable numbers (damage, speeds, drop tables) on a ScriptableObject asset, not in a hardcoded constant inside a behaviour. - Compare tags with `CompareTag("Player")`, not `tag == "Player"`. - Null-check `Keyboard.current` and action references. They are null when the device is missing or the domain reloads. ## Async and timing - For waits, prefer `Awaitable` (`await Awaitable.WaitForSecondsAsync(1f)`) or a coroutine. Do not use `Thread.Sleep` or `Task.Delay` on the main thread. - Unity objects are not thread-safe. Touch `Transform`, `GameObject`, and components only on the main thread. - Check `this != null` after an `await`. The object may have been destroyed while the method was suspended. ## Scenes and prefabs - Do not write YAML into `.unity`, `.prefab`, or `.asset` files by hand. Change them in the editor or through an editor script. - Load scenes by name or build index with `SceneManager.LoadSceneAsync`. Add the scene to the build profile first. - Instantiate prefabs from a serialized reference, not `Resources.Load`, unless the project already uses Resources. ## Done checklist 1. The Console shows no compile errors after the editor recompiles. 2. No obsolete-API warnings were introduced (`FindObjectOfType`, `velocity`, `Input.*`). 3. You said whether Play Mode was actually tested. ```` ### Claude Install path: `CLAUDE.md` Plain text: https://loadout-blush.vercel.app/packs/unity-6/files/CLAUDE.md ```` # Unity 6 C# rules Pinned to Unity 6.3 LTS (6000.3.x, supported through December 2027). The same calls are valid on the 6000.6 update line checked 2026-10-15, with one exception called out below. Do not emit Unity 2022 or earlier APIs. ## Project files - Never delete, rename, or hand-edit a `.meta` file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. - Do not run `dotnet build` to "check" a Unity project. The editor compiles assemblies itself. A bare `dotnet build` fails or compiles the wrong set of asmdefs. - Edit scripts under `Assets/`. Do not write into `Library/`, `Temp/`, `Obj/`, or `Logs/`. ## Finding objects - `Object.FindObjectOfType` and `FindObjectsOfType` are obsolete. Do not use them. - When any match is fine, use `Object.FindAnyObjectByType()`. Do not call it from `Update` or `FixedUpdate`. Cache the result in `Awake` or `Start`. - On Unity 6.6 and newer, `FindFirstObjectByType` is also obsolete, because it depended on InstanceID ordering. Do not use it. If you need a specific object, query with `FindObjectsByType()` and sort by something real, such as sibling index. - Prefer a serialized reference (`[SerializeField] private Player player;`) over any Find call. ## Input and physics - Read input through the Input System package (`UnityEngine.InputSystem`). Do not call `Input.GetAxis`, `Input.GetKey`, or `Input.GetButton`. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. - Read buttons in `Update`. Write to a Rigidbody in `FixedUpdate`. - The velocity property is `Rigidbody.linearVelocity` (world space, units per second). `Rigidbody.velocity` does not exist in Unity 6. Do not assign `linearVelocity` every physics step. Use `AddForce` for ongoing motion and set `linearVelocity` only for an instant change such as a jump. - Cache `GetComponent()` once. Do not call `GetComponent`, `Find`, or `Camera.main` inside `Update`. ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` ## Data and safety - Expose designer fields with `[SerializeField] private`. Do not make gameplay fields public just so the Inspector can see them. - Put tuneable numbers (damage, speeds, drop tables) on a ScriptableObject asset, not in a hardcoded constant inside a behaviour. - Compare tags with `CompareTag("Player")`, not `tag == "Player"`. - Null-check `Keyboard.current` and action references. They are null when the device is missing or the domain reloads. ## Async and timing - For waits, prefer `Awaitable` (`await Awaitable.WaitForSecondsAsync(1f)`) or a coroutine. Do not use `Thread.Sleep` or `Task.Delay` on the main thread. - Unity objects are not thread-safe. Touch `Transform`, `GameObject`, and components only on the main thread. - Check `this != null` after an `await`. The object may have been destroyed while the method was suspended. ## Scenes and prefabs - Do not write YAML into `.unity`, `.prefab`, or `.asset` files by hand. Change them in the editor or through an editor script. - Load scenes by name or build index with `SceneManager.LoadSceneAsync`. Add the scene to the build profile first. - Instantiate prefabs from a serialized reference, not `Resources.Load`, unless the project already uses Resources. ## Done checklist 1. The Console shows no compile errors after the editor recompiles. 2. No obsolete-API warnings were introduced (`FindObjectOfType`, `velocity`, `Input.*`). 3. You said whether Play Mode was actually tested. ## Claude Code - If a Unity MCP bridge is connected, prefer it for scene and asset changes. Do not recreate assets by writing YAML into `.unity` or `.prefab` files by hand. - After a script change, say that the editor must recompile. Do not claim the scene runs unless Play Mode was actually entered. ```` ### Agents Install path: `AGENTS.md` Plain text: https://loadout-blush.vercel.app/packs/unity-6/files/AGENTS.md ```` # Unity 6 C# rules Pinned to Unity 6.3 LTS (6000.3.x, supported through December 2027). The same calls are valid on the 6000.6 update line checked 2026-10-15, with one exception called out below. Do not emit Unity 2022 or earlier APIs. ## Project files - Never delete, rename, or hand-edit a `.meta` file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. - Do not run `dotnet build` to "check" a Unity project. The editor compiles assemblies itself. A bare `dotnet build` fails or compiles the wrong set of asmdefs. - Edit scripts under `Assets/`. Do not write into `Library/`, `Temp/`, `Obj/`, or `Logs/`. ## Finding objects - `Object.FindObjectOfType` and `FindObjectsOfType` are obsolete. Do not use them. - When any match is fine, use `Object.FindAnyObjectByType()`. Do not call it from `Update` or `FixedUpdate`. Cache the result in `Awake` or `Start`. - On Unity 6.6 and newer, `FindFirstObjectByType` is also obsolete, because it depended on InstanceID ordering. Do not use it. If you need a specific object, query with `FindObjectsByType()` and sort by something real, such as sibling index. - Prefer a serialized reference (`[SerializeField] private Player player;`) over any Find call. ## Input and physics - Read input through the Input System package (`UnityEngine.InputSystem`). Do not call `Input.GetAxis`, `Input.GetKey`, or `Input.GetButton`. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. - Read buttons in `Update`. Write to a Rigidbody in `FixedUpdate`. - The velocity property is `Rigidbody.linearVelocity` (world space, units per second). `Rigidbody.velocity` does not exist in Unity 6. Do not assign `linearVelocity` every physics step. Use `AddForce` for ongoing motion and set `linearVelocity` only for an instant change such as a jump. - Cache `GetComponent()` once. Do not call `GetComponent`, `Find`, or `Camera.main` inside `Update`. ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` ## Data and safety - Expose designer fields with `[SerializeField] private`. Do not make gameplay fields public just so the Inspector can see them. - Put tuneable numbers (damage, speeds, drop tables) on a ScriptableObject asset, not in a hardcoded constant inside a behaviour. - Compare tags with `CompareTag("Player")`, not `tag == "Player"`. - Null-check `Keyboard.current` and action references. They are null when the device is missing or the domain reloads. ## Async and timing - For waits, prefer `Awaitable` (`await Awaitable.WaitForSecondsAsync(1f)`) or a coroutine. Do not use `Thread.Sleep` or `Task.Delay` on the main thread. - Unity objects are not thread-safe. Touch `Transform`, `GameObject`, and components only on the main thread. - Check `this != null` after an `await`. The object may have been destroyed while the method was suspended. ## Scenes and prefabs - Do not write YAML into `.unity`, `.prefab`, or `.asset` files by hand. Change them in the editor or through an editor script. - Load scenes by name or build index with `SceneManager.LoadSceneAsync`. Add the scene to the build profile first. - Instantiate prefabs from a serialized reference, not `Resources.Load`, unless the project already uses Resources. ## Done checklist 1. The Console shows no compile errors after the editor recompiles. 2. No obsolete-API warnings were introduced (`FindObjectOfType`, `velocity`, `Input.*`). 3. You said whether Play Mode was actually tested. ```` ### Copilot Install path: `.github/copilot-instructions.md` Plain text: https://loadout-blush.vercel.app/packs/unity-6/files/copilot-instructions.md ```` # Unity 6 C# rules Pinned to Unity 6.3 LTS (6000.3.x, supported through December 2027). The same calls are valid on the 6000.6 update line checked 2026-10-15, with one exception called out below. Do not emit Unity 2022 or earlier APIs. ## Project files - Never delete, rename, or hand-edit a `.meta` file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. - Do not run `dotnet build` to "check" a Unity project. The editor compiles assemblies itself. A bare `dotnet build` fails or compiles the wrong set of asmdefs. - Edit scripts under `Assets/`. Do not write into `Library/`, `Temp/`, `Obj/`, or `Logs/`. ## Finding objects - `Object.FindObjectOfType` and `FindObjectsOfType` are obsolete. Do not use them. - When any match is fine, use `Object.FindAnyObjectByType()`. Do not call it from `Update` or `FixedUpdate`. Cache the result in `Awake` or `Start`. - On Unity 6.6 and newer, `FindFirstObjectByType` is also obsolete, because it depended on InstanceID ordering. Do not use it. If you need a specific object, query with `FindObjectsByType()` and sort by something real, such as sibling index. - Prefer a serialized reference (`[SerializeField] private Player player;`) over any Find call. ## Input and physics - Read input through the Input System package (`UnityEngine.InputSystem`). Do not call `Input.GetAxis`, `Input.GetKey`, or `Input.GetButton`. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. - Read buttons in `Update`. Write to a Rigidbody in `FixedUpdate`. - The velocity property is `Rigidbody.linearVelocity` (world space, units per second). `Rigidbody.velocity` does not exist in Unity 6. Do not assign `linearVelocity` every physics step. Use `AddForce` for ongoing motion and set `linearVelocity` only for an instant change such as a jump. - Cache `GetComponent()` once. Do not call `GetComponent`, `Find`, or `Camera.main` inside `Update`. ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` ## Data and safety - Expose designer fields with `[SerializeField] private`. Do not make gameplay fields public just so the Inspector can see them. - Put tuneable numbers (damage, speeds, drop tables) on a ScriptableObject asset, not in a hardcoded constant inside a behaviour. - Compare tags with `CompareTag("Player")`, not `tag == "Player"`. - Null-check `Keyboard.current` and action references. They are null when the device is missing or the domain reloads. ## Async and timing - For waits, prefer `Awaitable` (`await Awaitable.WaitForSecondsAsync(1f)`) or a coroutine. Do not use `Thread.Sleep` or `Task.Delay` on the main thread. - Unity objects are not thread-safe. Touch `Transform`, `GameObject`, and components only on the main thread. - Check `this != null` after an `await`. The object may have been destroyed while the method was suspended. ## Scenes and prefabs - Do not write YAML into `.unity`, `.prefab`, or `.asset` files by hand. Change them in the editor or through an editor script. - Load scenes by name or build index with `SceneManager.LoadSceneAsync`. Add the scene to the build profile first. - Instantiate prefabs from a serialized reference, not `Resources.Load`, unless the project already uses Resources. ## Done checklist 1. The Console shows no compile errors after the editor recompiles. 2. No obsolete-API warnings were introduced (`FindObjectOfType`, `velocity`, `Input.*`). 3. You said whether Play Mode was actually tested. ```` # Godot 4 CLAUDE.md > GDScript 2.0 rules that reject Godot 3 APIs. Written for Godot 4.x, parse-tested where it counts, shipped for every major AI coding tool. Pack: Godot 4 (`godot-4`) Page: https://loadout-blush.vercel.app/packs/godot-4 ## What it does Stops agents writing Godot 3 into a Godot 4 project: KinematicBody2D, yield, export var, and move_and_slide(velocity). Pinned to Godot 4.7.2 with an explicit rename table from the official upgrade guide. ## Who it's for People using Cursor, Claude Code, or Copilot on a Godot 4 game, especially anyone who has seen the agent emit Godot 3 code. ## Versions pinned - Godot: 4.7.2-stable (18 August 2026) - GDScript: 2.0 Last tested: 2026-10-15 ## How it was checked doc-verified; GDScript sample parsed by Godot 4.7.2 headless (--check-only), with a Godot 3 control script correctly rejected ## Sources - https://godotengine.org/article/maintenance-release-godot-4-7-2/ - https://docs.godotengine.org/en/4.7/tutorials/physics/using_character_body_2d.html - https://docs.godotengine.org/en/stable/tutorials/migrating/upgrading_to_godot_4.html ## Other free packs - [AGENTS.md template for vibe coding](https://loadout-blush.vercel.app/packs/vibe-coder-starter): Safe defaults for any AI coding agent in any stack. Tool-agnostic rules for Cursor, Claude Code, AGENTS.md, and Copilot so agents stay scoped and stop guessing. - [Next.js Supabase Cursor rules](https://loadout-blush.vercel.app/packs/nextjs-supabase): Rules pinned to Next.js 16 and Supabase SSR โ€” the APIs that actually work with React 19. Same advice in all four agent file formats, snippet-checked. - [Cursor rules for Unity 6](https://loadout-blush.vercel.app/packs/unity-6): Unity 6 C# rules that refuse obsolete 2022 / UNet patterns. Input System defaults, current APIs, four files ready for Cursor, Claude, AGENTS.md, and Copilot. ## Install ### Cursor Path: `.cursor/rules/godot-4.mdc` 1. Download the Cursor zip, or copy the .mdc file from this page. 2. Save it as .cursor/rules/godot-4.mdc. 3. Commit it. Cursor reads project rules from that folder. ### Claude Code Path: `CLAUDE.md` 1. Download the Claude zip, or copy CLAUDE.md. 2. Put CLAUDE.md in the project root. 3. Claude Code reads it as project memory on the next session. ### AGENTS.md Path: `AGENTS.md` 1. Download the Agents zip, or copy AGENTS.md. 2. Put AGENTS.md in the project root. 3. Agents that read AGENTS.md, including Codex and Cursor, pick it up there. ### GitHub Copilot Path: `.github/copilot-instructions.md` 1. Download the Copilot zip, or copy the instructions file. 2. Save it as .github/copilot-instructions.md. 3. Copilot reads repository instructions from that path. ## Files ### Cursor Install path: `.cursor/rules/godot-4.mdc` Plain text: https://loadout-blush.vercel.app/packs/godot-4/files/cursor.mdc ```` --- description: Godot 4.7 GDScript 2.0. CharacterBody, move_and_slide(), @export, and a Godot 3 ban list. globs: "**/*.gd" alwaysApply: false --- # Godot 4.7 GDScript 2.0 Pinned to Godot 4.7.2 stable (18 August 2026), GDScript 2.0. Write only Godot 4 code. The list at the bottom is banned even if an old tutorial or an older model suggests it. ## Scenes and scripts - Do not delete `.godot/`, `project.godot`, `.import`, or `.uid` files. Do not hand-edit `.import` files. - Put gameplay code on the node that owns the behavior. Use `@onready` to cache child nodes. Do not call `get_node()` every frame. - `@export` is for designer-facing values only. Give it a type and a default. ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` ## Movement - Bodies are `CharacterBody2D` and `CharacterBody3D`. They own a `velocity` property (`Vector2` or `Vector3`). - Set `velocity`, then call `move_and_slide()` with no arguments. Do not pass the velocity, an up vector, or a delta into `move_and_slide`. - Do not multiply horizontal `velocity` by `delta`. `move_and_slide()` applies the timestep. Gravity is the exception: `velocity.y += gravity * delta` before the call. - Read input with `Input.get_vector` or `Input.is_action_pressed` using actions from the Input Map. Do not hardcode key scancodes in gameplay code. - Run movement in `_physics_process`, not `_process`. ## Signals and loading - Connect with a Callable: `button.pressed.connect(_on_pressed)`. Disconnect with `disconnect`. Emit with `hit.emit(amount)`, not `emit_signal("hit", amount)`. - Declare a signal as `signal hit(amount: int)`. - Load a scene with `preload("res://player.tscn")` when the path is fixed, and instance it with `instantiate()`, not `instance()`. - Change scene with `get_tree().change_scene_to_file("res://main.tscn")`. - Read and write files with `FileAccess.open`. List directories with `DirAccess`. Both are static. There is no `File.new()`. ## Never write these (Godot 3, or removed) | Do not write | Write instead | | --- | --- | | `KinematicBody2D`, `KinematicBody` | `CharacterBody2D`, `CharacterBody3D` | | `yield(...)`, `yield(self, "completed")` | `await` | | `export var`, `export(int)`, `onready var` | `@export var`, `@onready var` | | `move_and_slide(velocity)` | set `velocity`, then `move_and_slide()` | | `connect("pressed", self, "_on_pressed")` | `pressed.connect(_on_pressed)` | | `emit_signal("hit", n)` | `hit.emit(n)` | | `packed.instance()` | `packed.instantiate()` | | `File.new()`, `Directory.new()` | `FileAccess`, `DirAccess` | | `Spatial`, `SpatialMaterial` | `Node3D`, `StandardMaterial3D` | | `rand_range(a, b)` | `randf_range(a, b)` | | `PoolStringArray`, `PoolIntArray` | `PackedStringArray`, `PackedInt32Array` | | `change_scene("res://x.tscn")` | `change_scene_to_file("res://x.tscn")` | | `OS.get_window_size()`, `OS.window_fullscreen` | `DisplayServer` window methods | If you are about to type any name in the left column, stop and use the right column. ## Typing and timing - Use static types on variables, parameters, and return values (`var hp: int = 10`, `func hit(n: int) -> void`). Use `:=` only when the type is obvious from the right side. - Wait for a timer with `await get_tree().create_timer(1.0).timeout`. - Animate with `var tween := create_tween()`. Do not create a `Tween` node with `Tween.new()`. - Mark editor scripts with `@tool` on the first line, and check `Engine.is_editor_hint()` inside them. - Property accessors use the GDScript 2.0 `get:` / `set(value):` blocks, not `setget`. ## Done checklist 1. The Godot editor shows no parser errors on the edited scripts. 2. Nothing from the ban list appears in the diff. 3. You said whether the scene was actually run. ```` ### Claude Install path: `CLAUDE.md` Plain text: https://loadout-blush.vercel.app/packs/godot-4/files/CLAUDE.md ```` # Godot 4.7 GDScript 2.0 Pinned to Godot 4.7.2 stable (18 August 2026), GDScript 2.0. Write only Godot 4 code. The list at the bottom is banned even if an old tutorial or an older model suggests it. ## Scenes and scripts - Do not delete `.godot/`, `project.godot`, `.import`, or `.uid` files. Do not hand-edit `.import` files. - Put gameplay code on the node that owns the behavior. Use `@onready` to cache child nodes. Do not call `get_node()` every frame. - `@export` is for designer-facing values only. Give it a type and a default. ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` ## Movement - Bodies are `CharacterBody2D` and `CharacterBody3D`. They own a `velocity` property (`Vector2` or `Vector3`). - Set `velocity`, then call `move_and_slide()` with no arguments. Do not pass the velocity, an up vector, or a delta into `move_and_slide`. - Do not multiply horizontal `velocity` by `delta`. `move_and_slide()` applies the timestep. Gravity is the exception: `velocity.y += gravity * delta` before the call. - Read input with `Input.get_vector` or `Input.is_action_pressed` using actions from the Input Map. Do not hardcode key scancodes in gameplay code. - Run movement in `_physics_process`, not `_process`. ## Signals and loading - Connect with a Callable: `button.pressed.connect(_on_pressed)`. Disconnect with `disconnect`. Emit with `hit.emit(amount)`, not `emit_signal("hit", amount)`. - Declare a signal as `signal hit(amount: int)`. - Load a scene with `preload("res://player.tscn")` when the path is fixed, and instance it with `instantiate()`, not `instance()`. - Change scene with `get_tree().change_scene_to_file("res://main.tscn")`. - Read and write files with `FileAccess.open`. List directories with `DirAccess`. Both are static. There is no `File.new()`. ## Never write these (Godot 3, or removed) | Do not write | Write instead | | --- | --- | | `KinematicBody2D`, `KinematicBody` | `CharacterBody2D`, `CharacterBody3D` | | `yield(...)`, `yield(self, "completed")` | `await` | | `export var`, `export(int)`, `onready var` | `@export var`, `@onready var` | | `move_and_slide(velocity)` | set `velocity`, then `move_and_slide()` | | `connect("pressed", self, "_on_pressed")` | `pressed.connect(_on_pressed)` | | `emit_signal("hit", n)` | `hit.emit(n)` | | `packed.instance()` | `packed.instantiate()` | | `File.new()`, `Directory.new()` | `FileAccess`, `DirAccess` | | `Spatial`, `SpatialMaterial` | `Node3D`, `StandardMaterial3D` | | `rand_range(a, b)` | `randf_range(a, b)` | | `PoolStringArray`, `PoolIntArray` | `PackedStringArray`, `PackedInt32Array` | | `change_scene("res://x.tscn")` | `change_scene_to_file("res://x.tscn")` | | `OS.get_window_size()`, `OS.window_fullscreen` | `DisplayServer` window methods | If you are about to type any name in the left column, stop and use the right column. ## Typing and timing - Use static types on variables, parameters, and return values (`var hp: int = 10`, `func hit(n: int) -> void`). Use `:=` only when the type is obvious from the right side. - Wait for a timer with `await get_tree().create_timer(1.0).timeout`. - Animate with `var tween := create_tween()`. Do not create a `Tween` node with `Tween.new()`. - Mark editor scripts with `@tool` on the first line, and check `Engine.is_editor_hint()` inside them. - Property accessors use the GDScript 2.0 `get:` / `set(value):` blocks, not `setget`. ## Done checklist 1. The Godot editor shows no parser errors on the edited scripts. 2. Nothing from the ban list appears in the diff. 3. You said whether the scene was actually run. ## Claude Code - If a Godot MCP bridge is connected, use it to inspect the scene tree instead of guessing node paths. - Do not claim a scene runs unless Godot was actually launched. Say "not run" when it was not. ```` ### Agents Install path: `AGENTS.md` Plain text: https://loadout-blush.vercel.app/packs/godot-4/files/AGENTS.md ```` # Godot 4.7 GDScript 2.0 Pinned to Godot 4.7.2 stable (18 August 2026), GDScript 2.0. Write only Godot 4 code. The list at the bottom is banned even if an old tutorial or an older model suggests it. ## Scenes and scripts - Do not delete `.godot/`, `project.godot`, `.import`, or `.uid` files. Do not hand-edit `.import` files. - Put gameplay code on the node that owns the behavior. Use `@onready` to cache child nodes. Do not call `get_node()` every frame. - `@export` is for designer-facing values only. Give it a type and a default. ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` ## Movement - Bodies are `CharacterBody2D` and `CharacterBody3D`. They own a `velocity` property (`Vector2` or `Vector3`). - Set `velocity`, then call `move_and_slide()` with no arguments. Do not pass the velocity, an up vector, or a delta into `move_and_slide`. - Do not multiply horizontal `velocity` by `delta`. `move_and_slide()` applies the timestep. Gravity is the exception: `velocity.y += gravity * delta` before the call. - Read input with `Input.get_vector` or `Input.is_action_pressed` using actions from the Input Map. Do not hardcode key scancodes in gameplay code. - Run movement in `_physics_process`, not `_process`. ## Signals and loading - Connect with a Callable: `button.pressed.connect(_on_pressed)`. Disconnect with `disconnect`. Emit with `hit.emit(amount)`, not `emit_signal("hit", amount)`. - Declare a signal as `signal hit(amount: int)`. - Load a scene with `preload("res://player.tscn")` when the path is fixed, and instance it with `instantiate()`, not `instance()`. - Change scene with `get_tree().change_scene_to_file("res://main.tscn")`. - Read and write files with `FileAccess.open`. List directories with `DirAccess`. Both are static. There is no `File.new()`. ## Never write these (Godot 3, or removed) | Do not write | Write instead | | --- | --- | | `KinematicBody2D`, `KinematicBody` | `CharacterBody2D`, `CharacterBody3D` | | `yield(...)`, `yield(self, "completed")` | `await` | | `export var`, `export(int)`, `onready var` | `@export var`, `@onready var` | | `move_and_slide(velocity)` | set `velocity`, then `move_and_slide()` | | `connect("pressed", self, "_on_pressed")` | `pressed.connect(_on_pressed)` | | `emit_signal("hit", n)` | `hit.emit(n)` | | `packed.instance()` | `packed.instantiate()` | | `File.new()`, `Directory.new()` | `FileAccess`, `DirAccess` | | `Spatial`, `SpatialMaterial` | `Node3D`, `StandardMaterial3D` | | `rand_range(a, b)` | `randf_range(a, b)` | | `PoolStringArray`, `PoolIntArray` | `PackedStringArray`, `PackedInt32Array` | | `change_scene("res://x.tscn")` | `change_scene_to_file("res://x.tscn")` | | `OS.get_window_size()`, `OS.window_fullscreen` | `DisplayServer` window methods | If you are about to type any name in the left column, stop and use the right column. ## Typing and timing - Use static types on variables, parameters, and return values (`var hp: int = 10`, `func hit(n: int) -> void`). Use `:=` only when the type is obvious from the right side. - Wait for a timer with `await get_tree().create_timer(1.0).timeout`. - Animate with `var tween := create_tween()`. Do not create a `Tween` node with `Tween.new()`. - Mark editor scripts with `@tool` on the first line, and check `Engine.is_editor_hint()` inside them. - Property accessors use the GDScript 2.0 `get:` / `set(value):` blocks, not `setget`. ## Done checklist 1. The Godot editor shows no parser errors on the edited scripts. 2. Nothing from the ban list appears in the diff. 3. You said whether the scene was actually run. ```` ### Copilot Install path: `.github/copilot-instructions.md` Plain text: https://loadout-blush.vercel.app/packs/godot-4/files/copilot-instructions.md ```` # Godot 4.7 GDScript 2.0 Pinned to Godot 4.7.2 stable (18 August 2026), GDScript 2.0. Write only Godot 4 code. The list at the bottom is banned even if an old tutorial or an older model suggests it. ## Scenes and scripts - Do not delete `.godot/`, `project.godot`, `.import`, or `.uid` files. Do not hand-edit `.import` files. - Put gameplay code on the node that owns the behavior. Use `@onready` to cache child nodes. Do not call `get_node()` every frame. - `@export` is for designer-facing values only. Give it a type and a default. ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` ## Movement - Bodies are `CharacterBody2D` and `CharacterBody3D`. They own a `velocity` property (`Vector2` or `Vector3`). - Set `velocity`, then call `move_and_slide()` with no arguments. Do not pass the velocity, an up vector, or a delta into `move_and_slide`. - Do not multiply horizontal `velocity` by `delta`. `move_and_slide()` applies the timestep. Gravity is the exception: `velocity.y += gravity * delta` before the call. - Read input with `Input.get_vector` or `Input.is_action_pressed` using actions from the Input Map. Do not hardcode key scancodes in gameplay code. - Run movement in `_physics_process`, not `_process`. ## Signals and loading - Connect with a Callable: `button.pressed.connect(_on_pressed)`. Disconnect with `disconnect`. Emit with `hit.emit(amount)`, not `emit_signal("hit", amount)`. - Declare a signal as `signal hit(amount: int)`. - Load a scene with `preload("res://player.tscn")` when the path is fixed, and instance it with `instantiate()`, not `instance()`. - Change scene with `get_tree().change_scene_to_file("res://main.tscn")`. - Read and write files with `FileAccess.open`. List directories with `DirAccess`. Both are static. There is no `File.new()`. ## Never write these (Godot 3, or removed) | Do not write | Write instead | | --- | --- | | `KinematicBody2D`, `KinematicBody` | `CharacterBody2D`, `CharacterBody3D` | | `yield(...)`, `yield(self, "completed")` | `await` | | `export var`, `export(int)`, `onready var` | `@export var`, `@onready var` | | `move_and_slide(velocity)` | set `velocity`, then `move_and_slide()` | | `connect("pressed", self, "_on_pressed")` | `pressed.connect(_on_pressed)` | | `emit_signal("hit", n)` | `hit.emit(n)` | | `packed.instance()` | `packed.instantiate()` | | `File.new()`, `Directory.new()` | `FileAccess`, `DirAccess` | | `Spatial`, `SpatialMaterial` | `Node3D`, `StandardMaterial3D` | | `rand_range(a, b)` | `randf_range(a, b)` | | `PoolStringArray`, `PoolIntArray` | `PackedStringArray`, `PackedInt32Array` | | `change_scene("res://x.tscn")` | `change_scene_to_file("res://x.tscn")` | | `OS.get_window_size()`, `OS.window_fullscreen` | `DisplayServer` window methods | If you are about to type any name in the left column, stop and use the right column. ## Typing and timing - Use static types on variables, parameters, and return values (`var hp: int = 10`, `func hit(n: int) -> void`). Use `:=` only when the type is obvious from the right side. - Wait for a timer with `await get_tree().create_timer(1.0).timeout`. - Animate with `var tween := create_tween()`. Do not create a `Tween` node with `Tween.new()`. - Mark editor scripts with `@tool` on the first line, and check `Engine.is_editor_hint()` inside them. - Property accessors use the GDScript 2.0 `get:` / `set(value):` blocks, not `setget`. ## Done checklist 1. The Godot editor shows no parser errors on the edited scripts. 2. Nothing from the ban list appears in the diff. 3. You said whether the scene was actually run. ```` # Fix pages # Godot 3 code in Godot 4 In Godot 4 use CharacterBody2D not KinematicBody2D; await not yield; @export not export var; set velocity then move_and_slide() with no args. Agents still paste Godot 3 into a Godot 4 project. The names that show up are KinematicBody2D, yield, export var, and move_and_slide(velocity). The Godot 4 pack is written to stop that paste. It is pinned to Godot 4.7.2-stable (18 August 2026) and GDScript 2.0. The rename table on this page is the ban list copied from that pack. Bodies are CharacterBody2D and CharacterBody3D. They own a velocity property, Vector2 or Vector3. Set velocity, then call move_and_slide() with no arguments. Do not pass the velocity, an up vector, or a delta into move_and_slide. Do not multiply horizontal velocity by delta. move_and_slide() applies the timestep. Gravity is the exception: velocity.y += gravity * delta before the call. Read input with Input.get_vector or Input.is_action_pressed, using actions from the Input Map. Do not hardcode key scancodes in gameplay code. Run movement in _physics_process, not _process. Coroutines use await, not yield. yield(...) and yield(self, "completed") are on the ban list. A timer wait is await get_tree().create_timer(1.0).timeout. Designer-facing values use @export with a type and a default. onready var becomes @onready var, used to cache child nodes. Do not call get_node() every frame. Connect a signal with a Callable: button.pressed.connect(_on_pressed). Disconnect with disconnect. Emit with hit.emit(amount), not emit_signal("hit", amount). Declare the signal as signal hit(amount: int). Load a fixed path with preload and instance it with instantiate(), not instance(). Change scene with get_tree().change_scene_to_file. Read and write files with FileAccess.open. List directories with DirAccess. Both are static. There is no File.new(). Spatial and SpatialMaterial become Node3D and StandardMaterial3D. rand_range(a, b) becomes randf_range(a, b). PoolStringArray and PoolIntArray become PackedStringArray and PackedInt32Array. change_scene("res://x.tscn") becomes change_scene_to_file("res://x.tscn"). OS.get_window_size() and OS.window_fullscreen move to DisplayServer window methods. If a name is in the left column of the table, stop and use the right column. Last verified 2026-10-15. doc-verified; GDScript sample parsed by Godot 4.7.2 headless (--check-only), with a Godot 3 control script correctly rejected. ## The rule Write only Godot 4 code. The list at the bottom is banned even if an old tutorial or an older model suggests it. In Godot 4 use CharacterBody2D not KinematicBody2D; await not yield; @export not export var; set velocity then move_and_slide() with no args. ## Sample ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` ## Rename table | Do not write | Write instead | | --- | --- | | `KinematicBody2D`, `KinematicBody` | `CharacterBody2D`, `CharacterBody3D` | | `yield(...)`, `yield(self, "completed")` | `await` | | `export var`, `export(int)`, `onready var` | `@export var`, `@onready var` | | `move_and_slide(velocity)` | set `velocity`, then `move_and_slide()` | | `connect("pressed", self, "_on_pressed")` | `pressed.connect(_on_pressed)` | | `emit_signal("hit", n)` | `hit.emit(n)` | | `packed.instance()` | `packed.instantiate()` | | `File.new()`, `Directory.new()` | `FileAccess`, `DirAccess` | | `Spatial`, `SpatialMaterial` | `Node3D`, `StandardMaterial3D` | | `rand_range(a, b)` | `randf_range(a, b)` | | `PoolStringArray`, `PoolIntArray` | `PackedStringArray`, `PackedInt32Array` | | `change_scene("res://x.tscn")` | `change_scene_to_file("res://x.tscn")` | | `OS.get_window_size()`, `OS.window_fullscreen` | `DisplayServer` window methods | Pack: https://loadout-blush.vercel.app/packs/godot-4 Page: https://loadout-blush.vercel.app/fixes/godot-3-code-in-godot-4 Last tested: 2026-10-15 # Next.js 16 middleware.ts vs proxy.ts In Next.js 16 the request interceptor is proxy.ts exporting proxy. middleware.ts is deprecated and still runs, including on the Edge runtime. proxy.ts runs on Node.js only. Agents still treat a Next.js 16 middleware.ts file as dead code. The filename is deprecated in favor of proxy, and middleware.ts still runs. The Next.js + Supabase pack pins Next.js 16.4.5, React 19.3, @supabase/ssr 0.12.7, and @supabase/supabase-js (current, installed alongside @supabase/ssr). Do not generate Pages Router or @supabase/auth-helpers-nextjs. Migrate when you do not need Edge. Rename middleware.ts to proxy.ts and rename the exported function to proxy. The proxy runtime is Node.js and cannot be configured. Keep middleware.ts when the interceptor must stay on Edge. Next.js 16 still runs that file. It is deprecated and will be removed in a future version. For a Supabase session in this pack, use proxy.ts and export proxy. proxy.ts refreshes the session by calling getClaims(), copies cookies onto both the request and the response, and returns the response that setAll last built. getClaims() verifies the JWT, locally against JWKS on asymmetric keys, which new projects use. Pages and actions still call getClaims() themselves. Proxy is not the only lock. A middleware.ts file that already refreshes the session keeps doing that until you migrate it. In a Server Component, setAll cannot write cookies. Catch and ignore that error. Refresh the session in proxy.ts, or in the middleware.ts file you kept for Edge. setAll receives a second argument, the cache headers. Apply Cache-Control, Expires, and Pragma on the response. Skipping them lets a CDN store one user's session cookie and serve it to someone else. New create-next-app projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. Browser code uses createBrowserClient. Server Components, Server Actions, and Route Handlers use createServerClient with cookies.getAll and cookies.setAll. Install @supabase/supabase-js and @supabase/ssr. Never import @supabase/auth-helpers-nextjs. Env names from the current docs are NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY. The secret key and the service-role key stay server-only, with no NEXT_PUBLIC_ prefix. Use getSession() only to read the raw token, and never trust session.user for authorization. Use getUser() only when you need the current user row from the Auth server. Sign-in and sign-out go through Server Actions, not a client fetch to your own route. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule On Next.js 16, rename middleware.ts to proxy.ts and rename the export to proxy, unless you need the Edge runtime. middleware.ts is deprecated and still runs. proxy.ts runs on the Node.js runtime, which cannot be set to Edge. Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/nextjs-16-middleware-to-proxy Last tested: 2026-11-04 # Unity 6 obsolete FindObjectOfType and Input calls In Unity 6 replace obsolete FindObjectOfType and FindObjectsOfType calls. Prefer a [SerializeField] reference or FindAnyObjectByType() for any instance; read input through UnityEngine.InputSystem. The Unity 6 pack pins Unity 6.3 LTS (6000.3.x), APIs checked against 6000.6 docs on 2026-10-15. Object.FindObjectOfType and FindObjectsOfType are obsolete in Unity 6. Unity 6000.3 docs name FindFirstObjectByType as the direct replacement, and the faster FindAnyObjectByType when any instance is fine. The pack uses FindAnyObjectByType(), valid on Unity 6.0 through 6.6. On Unity 6.6 and newer, FindFirstObjectByType is also obsolete because it depended on InstanceID ordering. For a specific object, use FindObjectsByType() and sort by something real, such as sibling index. Prefer a [SerializeField] reference over any Find call. Expose designer fields with [SerializeField] private instead of public gameplay fields. Cache results in Awake or Start; never call Find, GetComponent, or Camera.main in Update. Read input through the Input System package, UnityEngine.InputSystem. Input.GetAxis, Input.GetKey, and Input.GetButton throw when the project is set to the new Input System only, the Unity 6 default for new projects. Read buttons in Update and write to a Rigidbody in FixedUpdate. Null-check Keyboard.current and action references: they can be null when the device is missing or the domain reloads. Unity 6 renamed Rigidbody.velocity to Rigidbody.linearVelocity. The old name is obsolete. linearVelocity is a world-space vector in units per second. Cache GetComponent() once. Use AddForce for ongoing motion and set linearVelocity only for an instant change such as a jump, rather than assigning it every physics step. The sample below is copied from the pack: it caches the body in Awake, reads input in Update, and applies the jump in FixedUpdate. Last verified 2026-10-15. doc-verified. ## The rule Prefer [SerializeField] references. Use FindAnyObjectByType() when any instance is fine; cache lookups in Awake or Start. Read input through UnityEngine.InputSystem and use Rigidbody.linearVelocity. ## Sample ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` Pack: https://loadout-blush.vercel.app/packs/unity-6 Page: https://loadout-blush.vercel.app/fixes/unity-6-findobjectoftype-obsolete Last tested: 2026-10-15 # Supabase SSR: getClaims, not getSession, on the server Use supabase.auth.getClaims() to protect server pages and data. Never trust getSession() for authorization: it reads the cookie without revalidating it, and anyone can forge that cookie. The Next.js + Supabase pack pins Next.js 16.4.5 and @supabase/ssr 0.12.7. In server code such as proxy.ts, getSession() reads the session from the cookie without revalidating it. A forged cookie must never decide who can read a page or write data. Never authorize with session.user. Use getClaims() to protect pages and data. It verifies the JWT signature on every call. With asymmetric signing keys, the default for new projects, verification happens locally against cached JWKS. With symmetric keys, it calls the Auth server. getClaims() also refreshes the session when the access token is close to expiring. Use getUser() only when you need an up-to-date user record from the Auth server; it makes a network call. Use getSession() only when you need the raw access or refresh token. Reading a token is different from verifying the identity allowed to use server data. Keep the authorization check on the server with getClaims(). Every Server Action re-checks auth with getClaims(). An action is a public HTTP endpoint even if no button calls it. Validate mutation input, check claims, then write. Pages also check claims themselves. proxy.ts refreshes the session, copies cookies onto both the request and the response, and returns the response that setAll last built. Proxy is not the only lock. For the Next.js 16 interceptor filename and cookie handling, see /fixes/nextjs-16-middleware-to-proxy. Browser code uses createBrowserClient; Server Components, Server Actions, and Route Handlers use createServerClient with cookies.getAll and cookies.setAll. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule Protect pages, data, and every Server Action with getClaims(). Use getUser() only for an up-to-date Auth user record. Use getSession() only for raw access/refresh tokens, never session.user for authorization. Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/supabase-ssr-getsession-vs-getclaims Last tested: 2026-11-04 # Cursor .mdc rule frontmatter mistakes Cursor project rules need a .mdc file in .cursor/rules with description, globs, and alwaysApply frontmatter. A plain .md file there is ignored. Choose the fields for the intended attachment mode. The Vibe Coder Starter pack ships a Cursor .mdc rule alongside its other formats. 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. Project rules live in .cursor/rules and must use the .mdc extension. A plain .md file in that directory is ignored. Frontmatter fields are description, globs, and alwaysApply. With alwaysApply: true, the rule is always included; globs and description are ignored. With alwaysApply: false plus globs, the rule is auto-attached when a matching file is in context. Separate multiple glob patterns with commas. A glob needs to match the files you want the rule to cover. With alwaysApply: false and a description but no globs, Agent pulls the rule in when relevant based on that description. This is Apply Intelligently. With alwaysApply: false and neither description nor globs, the rule is included only when you @-mention it. If Apply Intelligently never applies, make sure a description is set; for specific files, make sure the glob matches. Loadout ships this frontmatter in its .mdc files. The vibe-coder-starter rule sets alwaysApply: true and globs: "**/*"; the glob is ignored in that mode. The Unity game pack sets globs: "**/*.cs" with alwaysApply: false, while Godot uses globs: "**/*.gd" with alwaysApply: false. Those game rules attach when a matching file is in context. Keep rules under 500 lines. Rules do not affect Cursor Tab. Check the file extension, the frontmatter fields, and the attachment mode when a project rule never applies. Last verified 2026-10-15. doc-verified. ## The rule Use .mdc files in .cursor/rules. Set alwaysApply: true for always-included rules; otherwise set globs for matching files or description for Apply Intelligently. Separate glob patterns with commas. Keep rules under 500 lines. Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/cursor-mdc-rule-frontmatter Last tested: 2026-10-15 # Godot 4 setget, Tween.new, and @tool In Godot 4 property accessors use the GDScript 2.0 get: and set(value): blocks, not setget. Animate with create_tween(). Do not create a Tween node with Tween.new(). Mark editor scripts with @tool on the first line, and check Engine.is_editor_hint() inside them. Agents still paste Godot 3 syntax into a Godot 4 script after they have stopped writing KinematicBody2D. The misses that are not the body rename are setget, Tween.new(), and an editor script with no @tool check. The Godot 4 pack is written to stop that paste. It is pinned to Godot 4.7.2-stable (18 August 2026) and GDScript 2.0. The other fix page copies the ban list from the rules file. This page is the typing and timing section of that same file, plus the project files the scenes section tells you not to delete. Property accessors use the GDScript 2.0 get: and set(value): blocks, not setget. Use static types on variables, parameters, and return values (var hp: int = 10, func hit(n: int) -> void). Use := only when the type is obvious from the right side. @export is for designer-facing values only. Give it a type and a default. Put gameplay code on the node that owns the behavior. Use @onready to cache child nodes. Do not call get_node() every frame. Animate with var tween := create_tween(). Do not create a Tween node with Tween.new(). The call returns the tween you animate with. It is not a node you construct with Tween.new(), and it is not a row in the rename table. var tween := create_tween() uses := because the type is obvious from the right side, which is the typing rule in the same section. Mark editor scripts with @tool on the first line, and check Engine.is_editor_hint() inside them. Both are required by the pack. Do not delete .godot/, project.godot, .import, or .uid files. Do not hand-edit .import files. The done checklist is the Godot editor shows no parser errors on the edited scripts, nothing from the ban list appears in the diff, and you said whether the scene was actually run. Last verified 2026-10-15. doc-verified; GDScript sample parsed by Godot 4.7.2 headless (--check-only), with a Godot 3 control script correctly rejected. ## The rule Property accessors use the GDScript 2.0 get: and set(value): blocks, not setget. Animate with create_tween(). Do not create a Tween node with Tween.new(). Mark editor scripts with @tool on the first line, and check Engine.is_editor_hint() inside them. Pack: https://loadout-blush.vercel.app/packs/godot-4 Page: https://loadout-blush.vercel.app/fixes/godot-4-setget-tweens-and-tool Last tested: 2026-10-15 # Unity 6 Input System vs Input.GetAxis In Unity 6 read input through the Input System package (UnityEngine.InputSystem). Do not call Input.GetAxis, Input.GetKey, or Input.GetButton. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. Agents still call the old Input class inside a Unity 6 project. Input.GetAxis, Input.GetKey, and Input.GetButton throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. The Unity 6 pack is written to stop that paste. It is pinned to Unity 6.3 LTS (6000.3.x), APIs checked against 6000.6 docs on 2026-10-15. The input package it names is com.unity.inputsystem (Unity 6 new-project default). Do not emit Unity 2022 or earlier APIs. Read input through the Input System package (UnityEngine.InputSystem). Read buttons in Update. Write to a Rigidbody in FixedUpdate. The sample caches the body in Awake, sets a jump flag from Keyboard.current.spaceKey.wasPressedThisFrame in Update, and applies it in FixedUpdate. Null-check Keyboard.current and action references. They are null when the device is missing or the domain reloads. Unity 6 renamed Rigidbody.velocity to Rigidbody.linearVelocity. The old name is obsolete. linearVelocity is a world-space vector in units per second. Do not assign linearVelocity every physics step. Use AddForce for ongoing motion and set linearVelocity only for an instant change such as a jump. The sample does that jump by writing body.linearVelocity with the existing x and z and a new y. Cache GetComponent() once. Do not call GetComponent, Find, or Camera.main inside Update. Prefer a serialized reference over any Find call. Expose designer fields with [SerializeField] private. Do not make gameplay fields public just so the Inspector can see them. The done checklist says the Console shows no compile errors after the editor recompiles, no obsolete-API warnings were introduced (FindObjectOfType, velocity, Input.*), and you said whether Play Mode was actually tested. Last verified 2026-10-15. doc-verified. ## The rule Read input through the Input System package (UnityEngine.InputSystem). Do not call Input.GetAxis, Input.GetKey, or Input.GetButton. Those throw when the project is set to the new Input System only, which is the Unity 6 default for new projects. ## Sample ```csharp using UnityEngine; using UnityEngine.InputSystem; public class Jumper : MonoBehaviour { [SerializeField] private float jumpSpeed = 6f; private Rigidbody body; private bool jumpPressed; private void Awake() { body = GetComponent(); } private void Update() { jumpPressed = Keyboard.current != null && Keyboard.current.spaceKey.wasPressedThisFrame; } private void FixedUpdate() { if (!jumpPressed) return; body.linearVelocity = new Vector3(body.linearVelocity.x, jumpSpeed, body.linearVelocity.z); jumpPressed = false; } } ``` Pack: https://loadout-blush.vercel.app/packs/unity-6 Page: https://loadout-blush.vercel.app/fixes/unity-6-input-system-vs-input Last tested: 2026-10-15 # Next.js 16 params and cookies are async In Next.js 16 params and searchParams are Promises. Always await them. cookies(), headers(), and draftMode() from next/headers are async. Await them. Synchronous access typechecks in places and crashes at runtime. Agents still treat params and searchParams as plain objects, and they still call cookies(), headers(), and draftMode() without await. Synchronous access typechecks in places and crashes at runtime. The Next.js + Supabase pack is written to stop that paste. It pins Next.js 16.4.5, React 19.3, @supabase/ssr 0.12.7, and @supabase/supabase-js (current, installed alongside @supabase/ssr). Do not generate Pages Router or @supabase/auth-helpers-nextjs. When to keep middleware.ts, and when to migrate it to proxy.ts, is covered on the proxy page. params and searchParams are Promises. Always await them. The sample page types params as Promise<{ id: string }>, awaits that promise, and then renders id. cookies(), headers(), and draftMode() from next/headers are async. Await them on every call. Server Components are the default. Add "use client" only when the file uses state, effects, browser APIs, or event handlers. Push that file to a leaf component. New create-next-app projects enable Cache Components. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. Read the cookie with await cookies() inside the component that needs it, and do not store that result on a cached response. Browser code uses createBrowserClient. Server Components, Server Actions, and Route Handlers use createServerClient with cookies.getAll and cookies.setAll. Awaiting cookies() does not decide whether the request is allowed. To decide whether a request is allowed, call supabase.auth.getClaims(). Use getSession() only to read the raw token, and never trust session.user for authorization. The done checklist is npx tsc --noEmit and next build pass, or you said why they could not run. New tables have RLS enabled plus policies, in a migration file. No getSession() is used for authorization, and no select("*") was added. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule params and searchParams are Promises. Always await them. cookies(), headers(), and draftMode() from next/headers are async. Await them. Synchronous access typechecks in places and crashes at runtime. ## Sample ```tsx export default async function Page({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params return

{id}

} ``` Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/nextjs-16-async-params-and-cookies Last tested: 2026-11-04 # CLAUDE.md vs AGENTS.md for Claude Code Claude Code reads CLAUDE.md files, including a nested CLAUDE.md in a subfolder, and .claude/rules/. It does not read AGENTS.md on its own, root or nested. Put stack-specific rules in a nested CLAUDE.md in that subfolder or .claude/rules/, not a second copy of the root CLAUDE.md. If you want one shared file, CLAUDE.md can import it with an @AGENTS.md line. Put AGENTS.md in the project root for agents that read it, including Codex and Cursor. Agents still paste one long CLAUDE.md, or they drop a nested AGENTS.md and expect Claude Code to read 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. Claude Code reads CLAUDE.md in the project root as project memory on the next session. It also reads a nested CLAUDE.md in a subfolder, and markdown files in .claude/rules/. Copy CLAUDE.md into the project root. Keep this file short. Put stack-specific rules in a nested CLAUDE.md in that subfolder or .claude/rules/, not a second copy of this file. Claude Code does not read AGENTS.md on its own, root or nested. If you want one shared file, import it with an @AGENTS.md line. Those lines are in the pack's CLAUDE.md. They are not repeated in AGENTS.md, the Cursor .mdc rule, or the Copilot instructions. A nested AGENTS.md does not replace the root CLAUDE.md. Put AGENTS.md in the project root for agents that read AGENTS.md, including Codex and Cursor. That root file is the shared rule set in this pack. Claude Code uses it when CLAUDE.md imports it with an @AGENTS.md line. Cursor project rules in this pack are .mdc files in .cursor/rules, with description, globs, and alwaysApply frontmatter. A plain .md file in that directory is ignored. That trap is /fixes/cursor-mdc-rule-frontmatter. GitHub Copilot reads .github/copilot-instructions.md. Do not spawn extra agents for a one-file edit. Use them only when the user asked for parallel work. That line is also only in the pack's CLAUDE.md. The shared rules still apply in every format. Never read, print, or commit secrets: .env, .env.* (except *.example), keys, tokens, or credential files. Do not run git commit, git push, git reset, or force-push unless the user asked for that exact action. Last verified 2026-10-15. doc-verified. ## The rule Put CLAUDE.md in the project root and keep it short. Put stack-specific rules in a nested CLAUDE.md in that subfolder or .claude/rules/. Claude Code does not read AGENTS.md on its own, root or nested. If you want one shared file, CLAUDE.md can import it with an @AGENTS.md line. Put AGENTS.md in the project root for agents that read it, including Codex and Cursor. Do not spawn extra agents for a one-file edit unless the user asked for parallel work. Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/claude-code-claude-md-vs-agents-md Last tested: 2026-10-15 # Supabase RLS with no policy is deny-all Enable RLS on every public table and add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. A table without RLS is readable and writable through the Data API under the default grants. Agents add a table in public and then either leave RLS off or enable RLS and write no policies. Those are different failures, and both are in the database section of the Next.js + Supabase pack. The pack pins Next.js 16.4.5, React 19.3, @supabase/ssr 0.12.7, and @supabase/supabase-js (current, installed alongside @supabase/ssr). Do not generate Pages Router or @supabase/auth-helpers-nextjs. When to keep middleware.ts is /fixes/nextjs-16-middleware-to-proxy. Enable RLS on every table in public. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. Do not add a select, insert, update, and delete policy on every table. A missing policy denies that operation. A table without RLS is readable and writable through the Data API under the default grants. The env name from the current docs is NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY. The secret key and the service-role key stay server-only, with no NEXT_PUBLIC_ prefix. Put the policies in a migration file. The done checklist says new tables have RLS enabled plus policies, in a migration file. Select named columns. Do not .select("*") and do not return the whole row to the client. The sample in the pack reads notes with .select("id, title, created_at") and .eq("user_id", claims.sub). That query is not a policy. The policies decide which operations the Data API allows. Do not add select("*") to get a column you forgot. Name the column. Validate mutation input with Zod, then check getClaims(), then write. Return a typed { ok, error } object, not a thrown string. An action is a public HTTP endpoint even if no button calls it, so every action re-checks auth with getClaims(). getClaims() is how you decide whether a request is allowed. getSession() only reads the raw token, and you never trust session.user for authorization. That split is /fixes/supabase-ssr-getsession-vs-getclaims. The interceptor filename is a different trap, on /fixes/nextjs-16-middleware-to-proxy. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule Enable RLS on every public table. Add policies only for the operations clients should be allowed to do, because any operation without a policy is denied. Put those policies in a migration file. A table without RLS is readable and writable through the Data API under the default grants. Select named columns. Do not select("*"). ## Sample ```ts const { data, error } = await supabase .from("notes") .select("id, title, created_at") .eq("user_id", claims.sub) ``` Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/supabase-rls-no-policy-is-deny-all Last tested: 2026-11-04 # Unity 6 .meta files and dotnet build Never delete, rename, or hand-edit a Unity .meta file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. Do not run dotnet build to check a Unity project. The editor compiles assemblies itself. A bare dotnet build fails or compiles the wrong set of asmdefs. The Unity 6 pack pins Unity 6.3 LTS (6000.3.x), APIs checked against 6000.6 docs on 2026-10-15. The pack says it also stops the two Unity-specific footguns, deleting .meta files and running dotnet build. FindObjectOfType is /fixes/unity-6-findobjectoftype-obsolete. Input.GetAxis is /fixes/unity-6-input-system-vs-input. This page is the project-files section of the same rules file. Do not emit Unity 2022 or earlier APIs. Never delete, rename, or hand-edit a .meta file. Unity stores the asset GUID there. Deleting one reimports the asset and breaks every reference to it. Leave the .meta file next to the asset. Edit scripts under Assets/. Do not write into Library/, Temp/, Obj/, or Logs/. Do not run dotnet build to check a Unity project. The editor compiles assemblies itself. A bare dotnet build fails or compiles the wrong set of asmdefs. The done checklist is the Console, not a dotnet command: the Console shows no compile errors after the editor recompiles, no obsolete-API warnings were introduced (FindObjectOfType, velocity, Input.*), and you said whether Play Mode was actually tested. Do not write YAML into .unity, .prefab, or .asset files by hand. Change them in the editor or through an editor script. Load scenes by name or build index with SceneManager.LoadSceneAsync. Add the scene to the build profile first. Instantiate prefabs from a serialized reference, not Resources.Load, unless the project already uses Resources. Prefer a [SerializeField] reference over any Find call, and expose designer fields with [SerializeField] private. Last verified 2026-10-15. doc-verified. ## The rule Never delete, rename, or hand-edit a .meta file. Do not run dotnet build to check a Unity project. Edit scripts under Assets/. Do not write YAML into .unity, .prefab, or .asset files by hand. Pack: https://loadout-blush.vercel.app/packs/unity-6 Page: https://loadout-blush.vercel.app/fixes/unity-6-meta-files-and-dotnet-build Last tested: 2026-10-15 # Godot 4 move_and_slide and delta In Godot 4 set velocity, then call move_and_slide() with no arguments. Do not multiply horizontal velocity by delta. move_and_slide() applies the timestep. Gravity is the exception: velocity.y += gravity * delta before the call. Run movement in _physics_process, not _process. Agents still multiply velocity by delta, pass velocity into move_and_slide, or run the move in _process. The Godot 4 pack is written to stop that paste. It is pinned to Godot 4.7.2-stable (18 August 2026) and GDScript 2.0. KinematicBody2D, yield, and export var are the rename page, /fixes/godot-3-code-in-godot-4. setget, Tween.new(), and @tool are /fixes/godot-4-setget-tweens-and-tool. This page is the movement section of the same rules file. Bodies are CharacterBody2D and CharacterBody3D. They own a velocity property, Vector2 or Vector3. Set velocity, then call move_and_slide() with no arguments. Do not pass the velocity, an up vector, or a delta into move_and_slide. Do not multiply horizontal velocity by delta. move_and_slide() applies the timestep. Gravity is the exception: velocity.y += gravity * delta before the call. Applying delta to horizontal velocity and then calling move_and_slide() runs the timestep twice. Read input with Input.get_vector or Input.is_action_pressed, using actions from the Input Map. Do not hardcode key scancodes in gameplay code. Run movement in _physics_process, not _process. The sample in the pack extends CharacterBody2D, exports speed as a float with a default, caches the sprite with @onready, reads Input.get_vector of the ui_left, ui_right, ui_up, and ui_down actions, assigns velocity = input * speed, and calls move_and_slide() with no arguments inside _physics_process. It does not multiply by delta. Give @export a type and a default. It is for designer-facing values only. Use @onready to cache child nodes. Do not call get_node() every frame. Put gameplay code on the node that owns the behavior. The done checklist is the Godot editor shows no parser errors on the edited scripts, nothing from the ban list appears in the diff, and you said whether the scene was actually run. Last verified 2026-10-15. doc-verified; GDScript sample parsed by Godot 4.7.2 headless (--check-only), with a Godot 3 control script correctly rejected. ## The rule 1. Set velocity, then call move_and_slide() with no arguments. 2. Do not multiply horizontal velocity by delta. 3. Gravity is the exception: velocity.y += gravity * delta before the call. 4. Run movement in _physics_process, not _process. 5. Read input from the Input Map. ## Sample ```gdscript extends CharacterBody2D @export var speed: float = 200.0 @onready var sprite: Sprite2D = $Sprite2D func _physics_process(_delta: float) -> void: var input := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") velocity = input * speed move_and_slide() ``` Pack: https://loadout-blush.vercel.app/packs/godot-4 Page: https://loadout-blush.vercel.app/fixes/godot-4-move-and-slide-and-delta Last tested: 2026-10-15 # Next.js 16 revalidateTag and Cache Components In Next.js 16, revalidateTag takes a cache profile. Pass the max profile for stale-while-revalidate. The single-argument call is deprecated. Inside a Server Action, use updateTag(tag) when the next request must see the user's own write. Agents still call revalidateTag with only a tag, or they call router.refresh() from the client after a write. The Next.js + Supabase pack pins Next.js 16.4.5, React 19.3, @supabase/ssr 0.12.7, and @supabase/supabase-js (current, installed alongside @supabase/ssr). The pack's Server Action calls updateTag after a write. revalidateTag needs a profile. The single-argument call is deprecated. Async params are /fixes/nextjs-16-async-params-and-cookies. The interceptor filename is /fixes/nextjs-16-middleware-to-proxy. revalidateTag(tag, profile) marks the tagged data stale. The next request starts a revalidation and is served stale content while it runs. Pass revalidateTag(tag, "max"). That profile is a one-year window. Another cacheLife profile, or an object with an expire number of seconds, sets a different window. revalidateTag(tag, { expire: 0 }) never serves stale content, so the next request blocks. Use that when the data must be gone immediately and you cannot call updateTag. revalidateTag(tag) with no profile is deprecated. It behaves like { expire: 0 }, still runs if TypeScript errors are suppressed, and that behavior may be removed. It can be called in Server Functions and Route Handlers. It cannot be called in a Client Component or in proxy. updateTag(tag) is the read-your-own-writes call. It expires the tag immediately, and the next request waits for fresh data. updateTag can only be called from a Server Action. A Route Handler that calls it throws, so a webhook uses revalidateTag instead. revalidatePath still invalidates one page or layout path. revalidateTag invalidates every cached entry that carries that tag. A revalidation starts when a later request uses the tag, not when you call revalidateTag. A tag does nothing until cached data carries it. Inside a "use cache" function or component, call cacheTag from next/cache. On a cached fetch, pass next.tags. Tags are case-sensitive and must not exceed 256 characters. A longer tag is never stored, so revalidating it does nothing. New create-next-app projects enable Cache Components. An existing app sets cacheComponents and partialPrefetching to true in next.config.ts. Do not cache a response that depends on a cookie or a user. Authenticated reads stay dynamic. Checked against https://nextjs.org/docs/app/api-reference/functions/revalidateTag and https://nextjs.org/docs/app/api-reference/functions/updateTag. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule Call revalidateTag with a profile. The recommended profile is "max". Do not call the single-argument form. In a Server Action, use updateTag when the next request must wait for fresh data. Do not call updateTag from a Route Handler, a Client Component, or proxy. Tag cached data with cacheTag inside "use cache", or with the fetch next.tags option. ## Docs - https://nextjs.org/docs/app/api-reference/functions/revalidateTag - https://nextjs.org/docs/app/api-reference/functions/updateTag - https://nextjs.org/docs/app/getting-started/caching Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/nextjs-16-revalidate-tag-and-cache-components Last tested: 2026-11-04 # Supabase Edge Function secrets Supabase Edge Functions read secrets with Deno.env.get. Locally they load supabase/functions/.env when the stack starts. Production secrets are set in the Dashboard or with supabase secrets set, and a deployed function reads a new secret without a redeploy. A custom secret name cannot start with SUPABASE_. Agents still put an Edge Function secret in the Next.js .env, name a custom secret with a SUPABASE_ prefix, or expect the project-root .env to reach the function. The Next.js + Supabase pack pins Next.js 16.4.5, React 19.3, @supabase/ssr 0.12.7, and @supabase/supabase-js (current, installed alongside @supabase/ssr). It covers Auth, RLS, and the publishable key in the Next.js app. It does not set Edge Function secrets. RLS is /fixes/supabase-rls-no-policy-is-deny-all. getClaims() is /fixes/supabase-ssr-getsession-vs-getclaims. Local and production load secrets differently. Locally, Edge Functions read supabase/functions/.env, loaded on supabase start. A .env.example is not enough, because the runtime reads the values. A root .env is what config.toml reads through env(). The function still needs the value in supabase/functions/.env. A file such as .env.local is read only when you pass it to supabase functions serve with --env-file. If Deno.env.get comes back empty, restart the stack or serve with that flag, and confirm you edited the file that runtime reads. Add supabase/functions/.env to .gitignore. Production secrets are set in the Dashboard or with the CLI. supabase secrets set NAME=value sets one secret. supabase secrets set --env-file .env pushes every name in that file. supabase secrets list shows the names on the remote project. Creating or deleting a production secret requires the Owner or Administrator role. Developers can view secrets and cannot change them. A deployed function reads a new secret immediately, with no redeploy. A secret name cannot start with SUPABASE_. That prefix is reserved, and the Dashboard and the Management API reject it. Read a secret with Deno.env.get(name). Do not print the value. Return whether it is set. Inside an Edge Function, Supabase injects the newer SUPABASE_URL, SUPABASE_DB_URL, SUPABASE_PUBLISHABLE_KEYS, SUPABASE_SECRET_KEYS, and SUPABASE_JWKS. It still injects the legacy SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY. SUPABASE_PUBLISHABLE_KEYS and SUPABASE_SECRET_KEYS are JSON dictionaries. Parse them and pass the default entry to createClient. SUPABASE_SECRET_KEYS bypasses Row Level Security, so use it in the function and never in a browser. NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY are the Next.js app names. They do not replace supabase/functions/.env. Checked against https://supabase.com/docs/guides/functions/secrets. Last verified 2026-11-04. doc-verified; TypeScript snippets pass tsc --strict (TypeScript 5, @types/react 19) with zod and the Supabase client stubbed. ## The rule Read Edge Function secrets with Deno.env.get. Put local values in supabase/functions/.env, not only in the Next.js root .env. Set production secrets with supabase secrets set or the Dashboard. Do not start a custom secret name with SUPABASE_. Do not print the secret value. ## Docs - https://supabase.com/docs/guides/functions/secrets Pack: https://loadout-blush.vercel.app/packs/nextjs-supabase Page: https://loadout-blush.vercel.app/fixes/supabase-edge-function-secrets Last tested: 2026-11-04 # Godot 4 signal connect: Callable, not a string In Godot 4 connect a signal with a Callable: button.pressed.connect(_on_pressed). Do not pass a signal name, a target, and a method string to connect. Emit with hit.emit(amount), not emit_signal. Agents still paste the Godot 3 connect call, with a signal name, a target, and a method name. The Godot 4 pack is written to stop that paste. It is pinned to Godot 4.7.2-stable (18 August 2026) and GDScript 2.0. The rename table on /fixes/godot-3-code-in-godot-4 bans connect("pressed", self, "_on_pressed") and emit_signal("hit", n). Movement and delta are /fixes/godot-4-move-and-slide-and-delta. This page is the signals section of the same rules file. The recommended call is Signal.connect, not Object.connect. button.pressed.connect(_on_pressed) passes the method as a Callable. The stable Godot 4.7 Signal class page calls that the recommended and fastest option: a missing signal or a missing callable is a compile-time error, not only a runtime error. Object.connect("pressed", _on_pressed) and button.pressed.connect(Callable(self, "_on_pressed")) still exist. Those forms check the names at runtime. Use a string only when the name comes from data, such as a configuration file. Otherwise call connect on the signal. The upgrade guide says the Godot 3 connection syntax changed. The conversion tool writes the string-based syntax, which is still present in Godot 4, and recommends the Signal-based syntax so a wrong name is not a runtime-only error. Godot 4 Object.connect takes a StringName and a Callable. The Godot 3 call that passes a target and a method string does not match that signature. That three-argument form is the one the pack bans. Declare the signal as signal hit(amount: int). Emit with hit.emit(amount). Object.emit_signal still exists and takes the name as a string. The pack bans emit_signal("hit", n). Disconnect with pressed.disconnect(_on_pressed). A signal can be connected once to the same Callable. Connecting it again returns ERR_INVALID_PARAMETER unless the connection used CONNECT_REFERENCE_COUNTED. Check is_connected first. Extra arguments go through Callable.bind, and arguments passed to emit come first. If the callable's object is freed, the connection is lost. Checked against https://docs.godotengine.org/en/stable/classes/class_signal.html. Last verified 2026-10-15. doc-verified; GDScript sample parsed by Godot 4.7.2 headless (--check-only), with a Godot 3 control script correctly rejected. ## The rule Connect with a Callable on the signal: button.pressed.connect(_on_pressed). Do not call connect("pressed", self, "_on_pressed"). Emit with hit.emit(amount), not emit_signal("hit", amount). Declare the signal as signal hit(amount: int). Use a string name only when the name is built from data. ## Docs - https://docs.godotengine.org/en/stable/classes/class_signal.html - https://docs.godotengine.org/en/stable/tutorials/migrating/upgrading_to_godot_4.html Pack: https://loadout-blush.vercel.app/packs/godot-4 Page: https://loadout-blush.vercel.app/fixes/godot-4-signal-connect-callable Last tested: 2026-10-15 # Copilot copilot-instructions.md vs applyTo 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. 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. ## The rule Put repository-wide Copilot instructions in .github/copilot-instructions.md. Put path-specific instructions in .github/instructions/NAME.instructions.md with an applyTo glob. Separate multiple globs with commas. Do not expect a file named .github/instructions.md to do either job. When the feature reads both and the path matches, keep the rules consistent, because both files are used. ## Docs - https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions - https://docs.github.com/en/copilot/reference/custom-instructions-support - https://docs.github.com/en/copilot/concepts/prompting-and-context/custom-instructions Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/copilot-instructions-vs-applyto Last tested: 2026-10-15 # Cursor .cursorrules vs AGENTS.md Cursor Agent reads Team Rules, .mdc files in .cursor/rules, User Rules, and plain AGENTS.md or CLAUDE.md. A plain .md file in .cursor/rules is ignored. A root .cursorrules file is legacy and will be deprecated. When Team Rules, Project Rules, and User Rules conflict, precedence is Team Rules, then Project Rules, then User Rules. The Vibe Coder Starter pack ships AGENTS.md, CLAUDE.md, and a .mdc rule under .cursor/rules. 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. A plain .md file in .cursor/rules is ignored. A root .cursorrules file is legacy. Attachment modes are /fixes/cursor-mdc-rule-frontmatter. Claude Code file choice is /fixes/claude-code-claude-md-vs-agents-md. Project rules are .mdc files in .cursor/rules, including subfolders. A plain .md file there is ignored, because it has no frontmatter for description, globs, and alwaysApply. Use AGENTS.md for plain markdown. Create one with /create-rule or New Cursor Rule in the command palette, and commit it. The CLI reads those project rules, plus a root AGENTS.md and a root CLAUDE.md, and applies them together. AGENTS.md has no metadata. A root file applies across the repo. A nested AGENTS.md applies when Agent works on files in that directory or its children. Nested instructions combine with parents, and more specific instructions take precedence. Cursor reads CLAUDE.md the same way it reads AGENTS.md. A root CLAUDE.md is picked up automatically and is always applied, regardless of an alwaysApply frontmatter setting. Conditional rules belong in .cursor/rules. User Rules in Customize, under Rules, sync with the account and apply in every project. Files in ~/.cursor/rules stay on that machine and do not sync. Team Rules on Team and Enterprise plans, from the dashboard, can take a glob. **/*.py limits the rule to matching files, and no glob means every conversation. Enforce this rule stops members from disabling it. Leave Enable this rule immediately unchecked and the rule stays a draft. On a conflict, Team Rules take precedence, then Project Rules, then User Rules. @service-template.ts points Agent at a file. The file is not inlined into the prompt, so required text belongs in the rule body. Rules apply to Agent chat and do not apply to Tab completion, Inline Edit, or Bugbot PR reviews. Migrate .cursorrules by copying it into a new rule, setting Always Apply, and deleting the old file. Checked against https://cursor.com/docs/rules and https://cursor.com/help/customization/rules. Last verified 2026-10-15. doc-verified. ## The rule Put project rules in .cursor/rules as .mdc files, or use plain AGENTS.md. A plain .md file in .cursor/rules is ignored. A root .cursorrules file is legacy and will be deprecated: copy it into a new rule, set Always Apply, and delete it. On a conflict, Team Rules take precedence, then Project Rules, then User Rules. Keep each rule under 500 lines. ## Docs - https://cursor.com/docs/rules - https://cursor.com/help/customization/rules - https://cursor.com/docs/cli/using Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/cursor-rule-sources-and-precedence Last tested: 2026-10-15 # Claude Code .claude/rules paths 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. 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. ## The rule Put Claude Code rules in .claude/rules as markdown. Leave paths off to load the file every session, at the same priority as .claude/CLAUDE.md. Set paths to load it only when a matching file is read or edited. paths is the only frontmatter field that is read. If the YAML does not parse, the rule loads every session. ## Docs - https://code.claude.com/docs/en/memory Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/claude-code-rules-paths Last tested: 2026-10-15 # Unity 6 Awaitable vs Task.Delay In Unity 6, wait with Awaitable.WaitForSecondsAsync from the main thread, or use a coroutine. Thread.Sleep suspends the calling thread, so do not call it on the main thread. WaitForSecondsAsync can only be called from the main thread and always completes there. A destroyed MonoBehaviour acts as if it is null. Check this != null after an await, or pass a cached destroyCancellationToken. Agents still paste Thread.Sleep or Task.Delay into a Unity 6 script and then touch a Transform. The Unity 6 pack is written to stop that paste. It is pinned to Unity 6.3 LTS (6000.3.x), APIs checked against 6000.6 docs on 2026-10-15. Obsolete Find calls are /fixes/unity-6-findobjectoftype-obsolete. Input.GetAxis is /fixes/unity-6-input-system-vs-input. .meta files and dotnet build are /fixes/unity-6-meta-files-and-dotnet-build. This page is the async and timing section of that rules file. The pack prefers Awaitable, await Awaitable.WaitForSecondsAsync(1f), or a coroutine. Do not use Thread.Sleep or Task.Delay on the main thread. Thread.Sleep suspends the calling thread, so on the main thread it blocks that thread. WaitForSecondsAsync can only be called from the main thread and always completes there. A CancellationToken canceled during the wait throws OperationCanceledException and aborts the wait. Later lines run only if that exception is caught. Awaitable is usually preferable to Task, and instances are pooled. Awaiting the same instance twice can result in an exception or a deadlock. Task.Delay does not suspend the thread. A Task started on the main thread resumes on the next frame Update through UnitySynchronizationContext, and Task has no update-loop scheduling. Awaitable does, through NextFrameAsync, FixedUpdateAsync, MainThreadAsync, and BackgroundThreadAsync. Those thread switches apply only in the method that calls them. Background work keeps running after Play mode exits. Cancel it with Application.exitCancellationToken. Most Unity APIs can be called only from the main thread. Touch Transform, GameObject, and components only there. A destroyed MonoBehaviour acts as if it is null, so obj == null is true, while the null-conditional and null-coalescing operators are not supported. Check this != null after an await. Cache destroyCancellationToken before the object is destroyed and pass it to WaitForSecondsAsync. The token is raised on destroy. Checked against https://docs.unity3d.com/6000.3/Documentation/Manual/async-awaitable-introduction.html and https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Awaitable.WaitForSecondsAsync.html. Last verified 2026-10-15. doc-verified. ## The rule Wait with Awaitable.WaitForSecondsAsync on the main thread, or use a coroutine. Do not call Thread.Sleep or Task.Delay on the main thread. Do not await the same Awaitable instance twice. After an await, check this != null, or pass a cached destroyCancellationToken. Touch Transform, GameObject, and components only on the main thread. ## Docs - https://docs.unity3d.com/6000.3/Documentation/Manual/async-awaitable-introduction.html - https://docs.unity3d.com/6000.3/Documentation/Manual/async-awaitable-continuations.html - https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Awaitable.WaitForSecondsAsync.html - https://docs.unity3d.com/6000.3/Documentation/ScriptReference/MonoBehaviour.html - https://docs.unity3d.com/6000.3/Documentation/ScriptReference/MonoBehaviour-destroyCancellationToken.html - https://learn.microsoft.com/en-us/dotnet/api/system.threading.thread.sleep Pack: https://loadout-blush.vercel.app/packs/unity-6 Page: https://loadout-blush.vercel.app/fixes/unity-6-awaitable-vs-task-delay Last tested: 2026-10-15 # AGENTS.md vs .cursorrules AGENTS.md is plain Markdown project instructions for any coding agent that reads it, including Cursor. Put it in the repo root. Use .cursor/rules/*.mdc when the instruction should apply only in Cursor. A root .cursorrules file is legacy and will be deprecated. Loadout free packs ship both AGENTS.md and a .cursor/rules file. Use AGENTS.md when one instruction file should travel with the repo. Use .cursor/rules/*.mdc when the instruction is for Cursor alone. A root .cursorrules file is the old Cursor-only file. The Vibe Coder Starter pack ships both AGENTS.md and .cursor/rules/vibe-coder-starter.mdc, plus CLAUDE.md and .github/copilot-instructions.md. 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. Every Loadout free zip does the same. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. Cursor precedence is /fixes/cursor-rule-sources-and-precedence. .mdc frontmatter is /fixes/cursor-mdc-rule-frontmatter. AGENTS.md is a README for agents: standard Markdown, with no required fields. Put it at the repository root. A nested AGENTS.md covers a subproject. The AGENTS.md site says the closest file to the edited file wins, and a chat prompt overrides the file. The format is for agents that adopted it, including Cursor, Codex, Amp, Jules, Gemini CLI, Windsurf, Aider, and Zed. The Agentic AI Foundation under the Linux Foundation stewards it. Checked against https://agents.md/. Cursor picks up a root AGENTS.md automatically. A nested file applies when Agent works in that directory or its children. Nested instructions combine with parents, and more specific instructions take precedence. AGENTS.md has no description, globs, or alwaysApply. A .mdc file uses those fields for Always Apply, Apply Intelligently, Apply to Specific Files, or Apply Manually. A plain .md file in .cursor/rules is ignored. Checked against https://cursor.com/docs/rules. The .cursorrules file in the project root is legacy and will be deprecated. Create a new Cursor rule, copy the text, set Always Apply, and delete .cursorrules. If other agents should read that text, put it in AGENTS.md. Loadout does not ship .cursorrules. Each free zip puts AGENTS.md at the root and the Cursor rule at .cursor/rules/.mdc. vibe-coder-starter sets alwaysApply: true and globs: "**/*". Unity 6 sets globs: "**/*.cs" with alwaysApply: false. Godot 4 sets globs: "**/*.gd" with alwaysApply: false. The Next.js pack sets alwaysApply: false and globs: "{app,src,lib,components}/**/*.{ts,tsx},proxy.ts,middleware.ts,**/*.sql". Those globs attach only in Cursor. Checked against https://cursor.com/help/customization/rules. Last verified 2026-10-15. doc-verified. ## The rule Use AGENTS.md for project instructions any agent that reads the open file should follow, including Cursor. Use .cursor/rules/*.mdc when the rule should apply only in Cursor, with description, globs, and alwaysApply. Do not start a new .cursorrules file. It is legacy and will be deprecated. Loadout free zips include both AGENTS.md and the .mdc. ## Docs - https://agents.md/ - https://cursor.com/docs/rules - https://cursor.com/help/customization/rules Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/agents-md-vs-cursorrules Last tested: 2026-10-15 # GitHub Copilot copilot-instructions.md GitHub Copilot reads repository-wide project instructions from .github/copilot-instructions.md. Path-specific instructions are NAME.instructions.md files under .github/instructions. Cursor reads .cursor/rules/*.mdc, AGENTS.md, and CLAUDE.md, and its rules docs do not name the Copilot file. Every Loadout free zip includes .github/copilot-instructions.md. GitHub Copilot looks for repository-wide project instructions at .github/copilot-instructions.md. The Vibe Coder Starter pack ships that 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. .cursorrules, .cursor/rules, and a file named .github/instructions.md are different paths. applyTo files are /fixes/copilot-instructions-vs-applyto. AGENTS.md versus .cursorrules is /fixes/agents-md-vs-cursorrules. Create .github/copilot-instructions.md in the repository root. The body is Markdown, and whitespace between instructions is ignored. Copilot uses the file as soon as you save it. Path-specific instructions are NAME.instructions.md files under .github/instructions, with an applyTo glob. On GitHub.com, only Copilot cloud agent and Copilot code review read those path-specific files. Copilot Chat on GitHub.com reads personal instructions, the repository-wide file, and organization instructions. Agent instructions are AGENTS.md, or a root CLAUDE.md or GEMINI.md, on the surfaces that support them. They sit beside .github/copilot-instructions.md. Checked against https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions. Cursor project rules are .mdc files in .cursor/rules. Cursor also reads AGENTS.md and CLAUDE.md. A root .cursorrules file is legacy and will be deprecated. Those docs do not list .github/copilot-instructions.md. Copilot's custom-instruction docs do not list .cursor/rules or .cursorrules. 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. On GitHub, personal instructions come first, then repository instructions, then organization instructions, and all relevant sets are still provided. The cheat sheet names .github/copilot-instructions.md as the repo-wide file. Checked against https://docs.github.com/en/copilot/reference/custom-instructions-support and https://cursor.com/docs/rules. Every Loadout free zip includes .github/copilot-instructions.md at that path, plus AGENTS.md, CLAUDE.md, and .cursor/rules/.mdc. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. Copy the Copilot file into the project's .github directory. Copy the .mdc into .cursor/rules for Cursor. Copy AGENTS.md to the root for agents that read the open file. The Copilot file carries the same rules, written for the path Copilot reads. Last verified 2026-10-15. doc-verified. ## The rule Put GitHub Copilot repository instructions in .github/copilot-instructions.md. Do not put that file at .github/instructions.md, .cursorrules, or .cursor/rules. Cursor reads .mdc files, AGENTS.md, and CLAUDE.md. Every Loadout free zip includes .github/copilot-instructions.md. ## Docs - https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions - https://docs.github.com/en/copilot/reference/custom-instructions-support - https://docs.github.com/en/copilot/reference/customization-cheat-sheet - https://cursor.com/docs/rules - https://cursor.com/help/customization/rules Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/github-copilot-instructions-md Last tested: 2026-10-15 # Codex CLI AGENTS.md Codex reads AGENTS.override.md if that file is non-empty, otherwise AGENTS.md. It checks ~/.codex once, unless CODEX_HOME is set, then one file per directory from the project root down to the current directory. CLAUDE.md, .cursor/rules, and .github/copilot-instructions.md are not on that list unless you add the filename to project_doc_fallback_filenames. Every Loadout free zip ships AGENTS.md at the project root. The Vibe Coder Starter pack ships AGENTS.md at the project root for Codex. 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. Cursor rule files are /fixes/cursor-rule-sources-and-precedence. The Copilot path is /fixes/github-copilot-instructions-md. Codex builds the instruction chain when a run starts. Global scope is ~/.codex, unless CODEX_HOME is set. It uses only the first non-empty file there: AGENTS.override.md, otherwise AGENTS.md. Project scope starts at the project root, typically the Git root, and walks down to the current directory. If there is no project root, only the current directory is checked. Each directory contributes at most one file, in this order: AGENTS.override.md, AGENTS.md, then project_doc_fallback_filenames. The sample config sets that list to [] and project_doc_max_bytes to 32768. Empty files are skipped. Codex stops adding files once the combined size reaches 32 KiB. Files are joined from the root down with blank lines. A closer file overrides earlier guidance because it appears later. Checked against https://developers.openai.com/codex/guides/agents-md and https://developers.openai.com/codex/config-sample. CLAUDE.md is what Claude Code reads. It does not read AGENTS.md on its own, root or nested. .cursor/rules/*.mdc is a Cursor project rule. GitHub Copilot reads .github/copilot-instructions.md. Codex discovery does not name those paths. A filename is ignored unless it is AGENTS.override.md, AGENTS.md, or listed in project_doc_fallback_filenames. Set project_doc_fallback_filenames in ~/.codex/config.toml, then start a new Codex command. The chain is rebuilt on the next run. Every Loadout free zip includes AGENTS.md at the project root, plus CLAUDE.md, .cursor/rules/.mdc, and .github/copilot-instructions.md. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. None of them ships AGENTS.override.md or a Codex config file. Copy AGENTS.md to the repository root for Codex. Each pack's CLAUDE.md adds a Claude Code section that is not in AGENTS.md, so that section is not in the file Codex reads. The .mdc frontmatter is for Cursor. The Copilot file is the path Copilot reads. Last verified 2026-10-15. doc-verified. ## The rule Put Codex project instructions in AGENTS.md at the repository root. Add AGENTS.override.md in a directory only when that directory should supply the one file Codex reads there. Do not expect Codex to read CLAUDE.md, .cursor/rules, or .github/copilot-instructions.md unless that filename is in project_doc_fallback_filenames. Copy AGENTS.md from a Loadout free zip to the project root. ## Docs - https://developers.openai.com/codex/guides/agents-md - https://developers.openai.com/codex/config-sample Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/codex-cli-agents-md Last tested: 2026-10-15 # Cursor .mdc and AGENTS.md together Cursor applies a root AGENTS.md and .cursor/rules/*.mdc together. The docs do not name a winner when those files disagree. Applicable rules are merged. On a conflict, Team Rules take precedence, then Project Rules, then User Rules. Nested AGENTS.md files combine with parent AGENTS.md files, and the closer file takes precedence among those files. That line does not mention an .mdc file. Keep a shared instruction in one file, or keep the copies the same. The rules docs call AGENTS.md an alternative to .cursor/rules. The CLI still applies a root AGENTS.md as rules alongside .cursor/rules. The Vibe Coder Starter pack ships both. The markdown after the .mdc frontmatter matches AGENTS.md. 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. Frontmatter is /fixes/cursor-mdc-rule-frontmatter. A root AGENTS.md has no globs, so it is not limited to one extension. A nested AGENTS.md applies in that directory and its children and is combined with the parents. An .mdc file is in the chat only when its frontmatter includes it. alwaysApply: true includes it every time and ignores globs. alwaysApply: false with globs waits for a matching file. A rule that is not included is absent from the merge. The root AGENTS.md is still there. The docs do not rank AGENTS.md against an .mdc file inside Project Rules. The same filename in two folders does not create an override: both apply when their conditions match. A root CLAUDE.md is always applied as well. See /fixes/claude-code-claude-md-vs-agents-md. Checked against https://cursor.com/docs/rules, https://cursor.com/help/customization/rules, and https://cursor.com/docs/cli/using. Put shared text in AGENTS.md, and use an .mdc file only for a Cursor attachment mode that does not contradict it. If both copies stay, edit them together. Every Loadout free zip does that. The free packs are MIT licensed: /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. vibe-coder-starter sets alwaysApply: true and globs: "**/*", so the glob is ignored and both files are always on. Unity 6 uses globs: "**/*.cs" with alwaysApply: false. Godot 4 uses globs: "**/*.gd" with alwaysApply: false. The Next.js pack uses alwaysApply: false and globs: "{app,src,lib,components}/**/*.{ts,tsx},proxy.ts,middleware.ts,**/*.sql". Those attach on a match. AGENTS.md still applies when no matching file is in context. Last verified 2026-10-15. doc-verified. ## The rule Keep a shared instruction in AGENTS.md, or copy it into .cursor/rules/*.mdc and keep the two bodies the same. Do not write a contradictory always-on line in each file. Cursor merges the rules that apply. It does not name a winner between AGENTS.md and an .mdc file. On a conflict across rule types, Team Rules take precedence, then Project Rules, then User Rules. Loadout free packs are MIT licensed and ship both files. ## Docs - https://cursor.com/docs/rules - https://cursor.com/help/customization/rules - https://cursor.com/docs/cli/using Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/cursor-mdc-and-agents-md Last tested: 2026-10-15 # Windsurf rules and AGENTS.md Windsurf Cascade reads workspace rules from .devin/rules/*.md when that folder exists, otherwise .windsurf/rules/*.md. The legacy root file .windsurfrules is still read. Root AGENTS.md is always on. A nested AGENTS.md is treated as a glob for that directory. Global rules are ~/.codeium/windsurf/memories/global_rules.md, capped at 6,000 characters; each workspace rule file is capped at 12,000. The Vibe Coder Starter pack ships AGENTS.md at the project root. Windsurf Cascade processes AGENTS.md through the same Rules engine as its own rule files. A root AGENTS.md is always on. A subdirectory AGENTS.md is auto-globbed for that directory. 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. Cursor rule files are /fixes/cursor-rule-sources-and-precedence. Claude Code is /fixes/claude-code-claude-md-vs-agents-md. Workspace rules belong in .devin/rules/*.md. That path is preferred and takes precedence. .windsurf/rules/*.md remains a fallback for older projects. The single-file .windsurfrules at the workspace root is still read, but new rules should go under .devin/rules. Each workspace rule file may set a trigger frontmatter value: always_on, model_decision, glob, or manual. Glob rules also set globs. Global rules live in ~/.codeium/windsurf/memories/global_rules.md and are always on, with a 6,000-character cap. Workspace rule files are capped at 12,000 characters. Checked against https://docs.devinenterprise.com/desktop/cascade/memories and https://docs.devin.ai/windsurf/plugins/cascade/memories. Cascade memories are auto-generated and local to the machine. They are not a substitute for a committed rule or AGENTS.md. The public Windsurf memories page still documents .windsurf/rules and does not list .devin/rules; the Devin Desktop memories page is the one that names .devin/rules as preferred. Loadout free zips do not ship .devin/rules, .windsurf/rules, or .windsurfrules. They ship AGENTS.md, which Cascade loads as always-on at the root. Every Loadout free zip includes AGENTS.md at the project root, plus CLAUDE.md, .cursor/rules/.mdc, and .github/copilot-instructions.md. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. Copy AGENTS.md to the repository root for Windsurf Cascade and for Codex. Add .devin/rules only when you need a Windsurf-only trigger such as glob or manual. Keep shared guidance in AGENTS.md so Cursor, Claude Code, Codex, and Copilot stay aligned. Last verified 2026-10-15. doc-verified. ## The rule Prefer .devin/rules/*.md for Windsurf Cascade workspace rules. Keep .windsurf/rules/*.md only as a fallback. Leave a root AGENTS.md for always-on shared guidance that other agents also read. Use a nested AGENTS.md when the rule should attach only under that folder. Do not rely on a root .windsurfrules file for new work: it is legacy and still read, but .devin/rules is preferred. Copy AGENTS.md from a Loadout free zip to the project root so Cascade and other agents share one file. ## Docs - https://docs.devinenterprise.com/desktop/cascade/memories - https://docs.devin.ai/windsurf/plugins/cascade/memories Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/windsurf-rules-and-agents-md Last tested: 2026-10-15 # Aider CONVENTIONS.md vs AGENTS.md Aider does not auto-discover CONVENTIONS.md or AGENTS.md. Create a Markdown conventions file and load it with aider --read CONVENTIONS.md or /read CONVENTIONS.md so it is read-only and prompt-cached. To load it every session, set read: CONVENTIONS.md (or read: [CONVENTIONS.md, AGENTS.md]) in .aider.conf.yml. Every Loadout free zip ships AGENTS.md at the project root; point Aider at that file or copy its text into CONVENTIONS.md. The Vibe Coder Starter pack ships AGENTS.md at the project root. Aider will not pick that file up unless you load it. 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. Codex discovery is /fixes/codex-cli-agents-md. Claude Code is /fixes/claude-code-claude-md-vs-agents-md. Cursor is /fixes/cursor-rule-sources-and-precedence. Aider's conventions page says the easiest way to give the model coding guidelines is a small Markdown file in the chat. Name it CONVENTIONS.md if you like, or use any Markdown path. Prefer aider --read CONVENTIONS.md or the in-chat /read CONVENTIONS.md command so the file is marked read-only and cached when prompt caching is on. Community convention files live in the Aider-AI/conventions repository. Checked against https://aider.chat/docs/usage/conventions.html. To load conventions on every run, put them in .aider.conf.yml. Aider looks for that file in your home directory, the git repo root, and the current directory, in that order; later files win. Set read: CONVENTIONS.md alone, or read: [CONVENTIONS.md, AGENTS.md] for multiple files. Lists can also be YAML bullets under read:. The config docs cover the same read key. Aider does not document automatic discovery of AGENTS.md, CLAUDE.md, .cursor/rules, or .github/copilot-instructions.md. Those paths work only when you --read them or list them under read:. Checked against https://aider.chat/docs/config/aider_conf.html. Every Loadout free zip includes AGENTS.md at the project root, plus CLAUDE.md, .cursor/rules/.mdc, and .github/copilot-instructions.md. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. None of them ships CONVENTIONS.md or .aider.conf.yml. For Aider, copy AGENTS.md to the repo root and run aider --read AGENTS.md, or add read: AGENTS.md to .aider.conf.yml. Keep shared guidance in AGENTS.md so Cursor, Claude Code, Codex, Copilot, and Aider stay aligned. Last verified 2026-10-15. doc-verified. ## The rule Create CONVENTIONS.md (or reuse AGENTS.md) and load it with aider --read or /read so Aider marks it read-only and can prompt-cache it. To always load it, set read: CONVENTIONS.md or read: [CONVENTIONS.md, AGENTS.md] in .aider.conf.yml at the repo root, home directory, or current directory. Aider does not auto-discover CONVENTIONS.md, AGENTS.md, CLAUDE.md, or .cursor/rules. Copy AGENTS.md from a Loadout free zip, then either --read AGENTS.md or set read: AGENTS.md in .aider.conf.yml. ## Docs - https://aider.chat/docs/usage/conventions.html - https://aider.chat/docs/config/aider_conf.html Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/aider-conventions-md Last tested: 2026-10-15 # Continue.dev rules and AGENTS.md Continue project rules are .md files in .continue/rules with YAML frontmatter (name, globs, alwaysApply, description). config.yaml replaces config.json, which is deprecated. The loader also accepts one workspace-root agent file, checking AGENTS.md, then AGENT.md, then CLAUDE.md, and sets alwaysApply: true. When AGENTS.md exists, that file is the agent rule, so a root CLAUDE.md is not loaded beside it. Rules kept only in config.json, .cursor/rules, or .continue/rule/ are missed. The Vibe Coder Starter pack ships AGENTS.md at the project root and a matching CLAUDE.md. Continue's rules page says to add .continue/rules at the top of the workspace. 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. See /fixes/codex-cli-agents-md, /fixes/claude-code-claude-md-vs-agents-md, /fixes/cursor-rule-sources-and-precedence, and /fixes/aider-conventions-md. In .continue/rules, name is the display title, and it is required for YAML rules. globs is one pattern or a list. description is what the agent reads when alwaysApply is false. alwaysApply: true is included on every Agent, Chat, and Edit request. alwaysApply: false waits for a glob match, or for the agent to pull the rule in from the description. If alwaysApply is omitted, the rule is included when there are no globs, or when the globs match. Files load in lexicographical order, so 01-general.md comes before 02-frontend.md. Rules join with newlines in toolbar order and are skipped for autocomplete and apply. A file in .continue/rule/ does not show in the toolbar. An entry in the config.yaml rules list can be a string, a hub slug such as uses: sanity/sanity-opinionated, or a file:// path. If ~/.continue/config.yaml is present, or %USERPROFILE%\.continue\config.yaml on Windows, that file is loaded instead of config.json, and the old systemMessage string becomes a rules list. An accepted agent file is stored as source agentFile with alwaysApply: true, which overrides frontmatter. .continue/rules Markdown is added after that agent file. One does not replace the other. The break sits after the exists check, not inside it. On the VS Code extension, fileExists returns false for a missing file, so a missing AGENTS.md ends the search before AGENT.md and CLAUDE.md. See https://github.com/continuedev/continue/blob/main/core/config/markdown/loadMarkdownRules.ts and https://github.com/continuedev/continue/blob/main/extensions/vscode/src/VsCodeIde.ts. Every Loadout free zip includes AGENTS.md and CLAUDE.md at the project root, plus .cursor/rules/.mdc and .github/copilot-instructions.md. The packs are /packs/vibe-coder-starter, /packs/nextjs-supabase, /packs/unity-6, and /packs/godot-4. None of them ships .continue/rules, config.yaml, or config.json. With both root files present, the agent-file slot is AGENTS.md. Last verified 2026-10-15. doc-verified. ## The rule Put Continue project rules in .continue/rules/*.md with name, globs, description, and alwaysApply set for the attachment you want. Keep shared guidance in a root AGENTS.md. That file is the agent-file rule when it exists, and Continue forces alwaysApply: true on it. .continue/rules is still loaded after it. Do not keep the only copy in config.json: config.yaml replaces it, and a present ~/.continue/config.yaml is loaded instead. Do not use a folder named .continue/rule. Do not expect a root CLAUDE.md to load beside AGENTS.md, and do not expect a missing AGENTS.md on VS Code to fall through to AGENT.md or CLAUDE.md. Copy AGENTS.md from a Loadout free zip, then add a .continue/rules file for a Continue-only glob or description. ## Docs - https://docs.continue.dev/customize/deep-dives/rules - https://docs.continue.dev/reference - https://docs.continue.dev/reference/yaml-migration Pack: https://loadout-blush.vercel.app/packs/vibe-coder-starter Page: https://loadout-blush.vercel.app/fixes/continue-dev-rules-and-agents-md Last tested: 2026-10-15