Put secrets and path rules in Cursor .mdc files, not AGENTS.md
AGENTS.md is the repo contract: stack, layout, “don’t invent APIs.” It should stay short and shared.
Path-specific rules belong in Cursor .mdc files with globs, so an agent editing app/api/** does not also rewrite your design tokens, and a UI rule never sees production secrets.
A Next.js App Router split that holds up:
-
Root
AGENTS.md/CLAUDE.md— stack, folders, security defaults, “no invented endpoints.” -
UI rule (
.mdc) — tokens, components, no drive-by restyles. -
API/data rule (
.mdc) — validation, mutations, where env secrets never go. -
Routes rule (
.mdc) — App Router conventions, Server Components first.
Vildanden’s free Agent Config sample ships that shape (plus a short install guide):
- Free download: https://vildanden.gumroad.com/l/xphax
- Landing: https://fairly-charlie-907.rehost.page/
Brand: Vildanden. No personal founder pitch.
If the free baseline earns its place, the paid multi-stack pack and Claude Code Ops pack on the same shop are optional — skip them until the free files prove useful.
Top comments (0)