Which file do I need?
Each AI coding tool reads its own file from its own place. Find your tool, put the file where the table says, and check when it actually gets loaded. Every file name opens a generator for that format.
| AI tool | File | Where it goes | When it's loaded |
|---|---|---|---|
| Agent rules and tool config | |||
| Cursor | <rule-name>.mdc | Goes in: .cursor/rules/ | Loaded: Per rule: always, when globs match the files in play, when the agent finds the description relevant, or on @-mention. |
| Claude Code | SKILL.md | Goes in: .claude/skills/<skill-name>/, or ~/.claude/skills/ for all projects | Loaded: Name and description at startup. The full file only when a task matches or you run /skill-name. |
| Claude Code | CLAUDE.md | Goes in: Repo root, or ~/.claude/CLAUDE.md for all projects | Loaded: Every session, in full. A CLAUDE.md in a subfolder loads when Claude works there. |
| Codex, Cursor, Copilot coding agent and others | AGENTS.md | Goes in: Repo root. Nested files cover their subfolder. | Loaded: At the start of each task. For Claude Code, add @AGENTS.md to CLAUDE.md. |
| Claude Code, Claude Desktop, Cursor | .mcp.json | Goes in: Repo root for Claude Code. Claude Desktop uses claude_desktop_config.json; Cursor uses .cursor/mcp.json. | Loaded: At startup, so restart after editing. Claude Code asks before using servers from .mcp.json. |
| Windsurf | <rule-name>.md | Goes in: .windsurf/rules/ | Loaded: Per rule trigger: always on, glob match, model decision, or manual @-mention. |
| GitHub Copilot | copilot-instructions.md | Goes in: .github/ | Loaded: With every Copilot Chat, code review and coding agent request in the repo. Not used for inline completions. |
| ChatGPT / OpenAI API | openai-custom-instructions.md | Goes in: prompts/, as a copy you version | Loaded: Only when pasted into ChatGPT custom instructions or sent as the system message. |
| Gemini API / AI Studio | gemini-system-instructions.json | Goes in: prompts/, as a copy you version | Loaded: Only when passed as systemInstruction or pasted into AI Studio. |
| Ignore files | |||
| Cursor | .cursorignore | Goes in: Repo root | Loaded: Always. Indexing and AI features skip matching files (best effort: terminal commands can still read them). |
| Claude Code | .claudeignore | Goes in: Repo root | Loaded: Keep it as your pattern list, and mirror secret paths in permissions.deny in .claude/settings.json, the setting Claude Code documents for blocking reads. |
| Reference docs | |||
| Any LLM or crawler | llms.txt | Goes in: Repo root, or your site root as /llms.txt | Loaded: Only when a tool or person fetches it. Nothing loads it automatically. |
| Any agent | ARCHITECTURE.md | Goes in: Repo root | Loaded: When your rules file points to it, or when the agent explores the repo. |
| Planning docs | |||
| Any agent | PRD.md | Goes in: Repo root | Loaded: When your rules file tells the agent to read it. |
| Any agent | DESIGN.md | Goes in: Repo root | Loaded: When your rules file tells the agent to read it, usually before UI work. |
| Any agent | TASK.md | Goes in: Repo root | Loaded: At the start and end of a task, if your rules say to read and update it. |
| Any agent | MEMORY.md | Goes in: Repo root | Loaded: At session start, if your rules say so. Agents add lessons as they go. |
What a good rule looks like
Agents follow rules they can check. Swap advice for commands, paths and explicit “never” lines.
Give commands, not wishes
CLAUDE.md or AGENTS.md## Guidelines - Write clean code. - Follow best practices. - Make sure tests pass.
## Commands - Test one file: pnpm vitest run src/lib/date.test.ts - Typecheck: pnpm tsc --noEmit - Never run pnpm db:reset. It wipes the shared dev database.
Why it works: The agent can run each line as written, and the "never" rule names the exact command and the reason.
Scope rules to the files they cover
.cursor/rules/components.mdc--- alwaysApply: true --- Use React best practices.
--- globs: src/components/**/*.tsx alwaysApply: false --- - Reuse Button and Input from @/components/ui; never add a UI library. - One component per file, named export, props typed with an interface.
Why it works: It loads only when a component file is in play, and every line is something the model can check.
Tell a skill when to run
SKILL.md--- name: helper description: Helps with code. ---
--- name: db-migration description: Writes and reviews Prisma migrations. Use when schema.prisma changes or the user asks for a migration. ---
Why it works: Claude picks a skill by its description, so say what it does and when to use it.
Copy-ready starters
Complete files from the preset library. Copy one as it is, or open it to change the stack, commands and rules before you download it.
- Next.js 15 App RouterCursor Rules
.cursor/rules/nextjs-15.mdc
Enforce React Server Components (RSC) by default; restrict 'use client' strictly to interactive leaf components.
- Automated Code ReviewerClaude Skill
.claude/skills/codebase-auditor/SKILL.md
Scope scanning to the repository and skip .env files, keys, and credential stores.
- Multi-Agent System OrchestrationAGENTS.md
AGENTS.md
Define subagent roles: Lead Architect, Frontend Engineer, Backend Specialist, Security Reviewer.
- Python FastAPI & Pydantic v2Cursor Rules
.cursor/rules/fastapi.mdc
Use strict Pydantic v2 BaseModels with Field validation for all input and output schemas.
- React 19 & ViteCopilot
.github/copilot-instructions.md
Use React 19 action hooks (useActionState, useOptimistic, useFormStatus) for async mutations.
- Tailwind CSS v4Cursor Rules
.cursor/rules/tailwind-v4.mdc
Configure themes directly in globals.css using
@themeand@import 'tailwindcss';. - GitHub Operations MCPMCP Config
.mcp.json or claude_desktop_config.json
Uses official
@modelcontextprotocol/server-githubpackage via npx.
Frequently asked questions
CLAUDE.md vs AGENTS.md: which do I need?
Claude Code reads CLAUDE.md. AGENTS.md is the shared file that OpenAI Codex, Cursor, GitHub Copilot's coding agent and a growing list of other agents read. If your team uses more than one tool, put the rules in AGENTS.md and add the line @AGENTS.md to CLAUDE.md so Claude Code imports the same file.
Why is Cursor ignoring my rules?
Usually it's the frontmatter. A rule with alwaysApply: false and no globs only loads when the agent decides its description is relevant, or when you @-mention it. Check that the file is in .cursor/rules/, that globs match the files you are editing, and that the description says when the rule applies. Rules don't affect Tab autocomplete at all.
How long should CLAUDE.md be?
Aim for under 200 lines. Claude Code loads the whole file into every session, so each line costs context and competes with the others for attention. Keep build and test commands, the folder layout and hard "never" rules in it. Move long procedures into skills or separate docs that the file points to.
Where do Claude Code skills go?
Each skill is a folder with a SKILL.md inside: .claude/skills/<skill-name>/SKILL.md for one project, or ~/.claude/skills/<skill-name>/SKILL.md for all of your projects. Claude Code keeps only each skill's name and description in context, and loads the full file when a task matches it or when you type /skill-name.
How do I stop AI tools from reading my .env files?
For Cursor, list secrets such as .env*, *.pem and *.key in .cursorignore at the repo root. For Claude Code, add deny rules like Read(./.env) and Read(./.env.*) under permissions.deny in .claude/settings.json, which is the setting Claude Code documents for blocking file reads. Neither replaces keeping secrets out of the repo.
Do AI tools read PRD.md, TASK.md or ARCHITECTURE.md automatically?
No. Agents load their own rules file (CLAUDE.md, AGENTS.md or Cursor rules) and nothing else on their own. Name the other docs in that file, for example "Read PRD.md and TASK.md before you start", and the agent opens them when it needs them. In CLAUDE.md you can also write @PRD.md, but that loads the file into every session.
Can it write rules from my existing code?
Yes. Click Read your code and point it at a GitHub repository or a local folder. Besides the manifest, it reads a sample of your source files and any existing CLAUDE.md, AGENTS.md or Cursor rules, then writes only the conventions most of the code follows, such as test layout, file naming, import alias, error classes and logger, each with how many files back it. The examples in the file quote a real function from your code.
Does AI Skill Studio upload my code?
No. Presets, code reading, editing and ZIP export all run in your browser, and nothing you type or import is sent to DevScratchpad. Reading a local folder happens entirely in your browser. Reading a GitHub repository is the only network call, and your browser sends it straight to GitHub.