Guides for Claude Code, Codex and Cursor
Every example on these pages is a real file from a real generated Next.js repo. Copy what you need, or generate the whole set for your stack.
- CLAUDE.md template for Next.js, from a real repoA CLAUDE.md template for Next.js you can copy, a real one from a generated repo, where the file goes, what belongs in it, and the mistakes that get it ignored.Updated October 4, 2026
- AGENTS.md examples, from a real Next.js repoWhat AGENTS.md is, a template to copy, real root and nested AGENTS.md files from a generated Next.js repo, and how Codex, Cursor and Claude Code load them.Updated October 4, 2026
- CLAUDE.md vs AGENTS.md: which one you needCLAUDE.md is for Claude Code. AGENTS.md is the shared file Codex, Cursor and others read. Which tool reads what, and how to run both without them drifting.Updated October 4, 2026
- Cursor rules for Next.js, with real .mdc examplesHow Cursor rules work: the .mdc format, globs, alwaysApply and the four rule types, plus real Next.js rules from a generated repo that you can copy.Updated October 4, 2026
- Claude Code skills, with 28 real examplesA Claude Code skill is a SKILL.md file that becomes a slash command Claude can also load on its own. How to write one, what to avoid, and 28 real examples.Updated October 4, 2026
- Claude Code hooks, with 7 real guard scriptsClaude Code hooks are scripts that run before or after a tool call. A PreToolUse hook that exits 2 blocks it. The settings.json shape, matchers and real guards.Updated October 4, 2026
- Claude Code subagents, with 7 real examplesA Claude Code subagent is a markdown file in .claude/agents/ with its own prompt, tools and context window. How to write one, when to use it, and real examples.Updated October 4, 2026
- The Claude Code setup for a Next.js appThe best Claude Code setup for a Next.js repo: a short CLAUDE.md, path-scoped rules, skills, subagents, guard hooks and MCP. What goes where, with real files.Updated October 4, 2026