nextjs-claude-md
Skill1 starsChanged 2 days agoMITView on GitHub
Drafts and checks CLAUDE.md (and AGENTS.md) files for a Next.js App Router project, with or without a NestJS API beside it. Use when a repository has no CLAUDE.md yet, when /init produced a generic one, when asked to write, update, audit or shorten CLAUDE.md or AGENTS.md, or after scripts, ports, folders or the i18n setup changed.
- Reads credentials
In this repository10 other files it gives its agents.
- add-admin-dashboardSkill
- app-screenshotsSkill
- design-rulesSkill
- docs-checkSkill
- i18n-keys-checkSkill
- nextjs-hooksSkill
- production-checkSkill
- rtl-checkSkill
- template-rebrandSkill
- vps-deploySkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Write instruction files from what the code does, then prove that every command and path in them exists.
- Distinctive: line 15
Check: it lists every app you expect.
- Very specific: line 17
Look before you write: If it reports a CLAUDE.md, AGENTS.md or rule files under .claude/ already, read them and plan edits.
- Distinctive: line 19
Check: you can name the file each new line will go in.
- Distinctive: line 27
Check: no line appears in two files.
- Very specific: line 40
Leave out file trees, dependency lists, secrets and long docs.
- Distinctive: line 43
Check: every line names a command, a path, an env name or a rule that someone could verify in the code.
- Distinctive: line 49
Check: 0 errors. Fix the file, not the checker, and read each WARN.
- Distinctive: line 53
Check: the line count in the checker's last line.
- Very specific: line 55
Confirm it loads: Ask the user to run /context all in a new session: the root file is listed under Memory files.
- Distinctive: line 58
Check: the user confirms it, or your report says it is not confirmed yet.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md for a Next.js (+ NestJS) project
Write instruction files from what the code does, then prove that every command
and path in them exists. Two read-only Node scripts (Node 20+, no packages):
scripts/facts.mjs reads package.json files, folders, .env.example names,
i18n and config; scripts/check.mjs checks a finished file.
- Read the facts. At the repository root run
node ${CLAUDE_SKILL_DIR}/scripts/facts.mjs .Check: it lists every app you expect. "Apps: 0" means the wrong folder. - Look before you write. If it reports a CLAUDE.md, AGENTS.md or rule
files under
.claude/already, read them and plan edits. Never overwrite one. Check: you can name the file each new line will go in. - Choose the files. One app: one CLAUDE.md. Several apps: a short root
CLAUDE.md (apps, ports, run and check commands, how the apps connect, rules
shared by all) plus one CLAUDE.md in each app folder, which Claude Code
loads only when it works there. If the team also uses Codex, Cursor or
Copilot, put the shared text in AGENTS.md and make CLAUDE.md
@AGENTS.mdfollowed by Claude-only lines. Check: no line appears in two files. - Write only what the code does not show at a glance, in this order:
- Commands: exact script names from package.json (
dev,build,lint,typecheck), and say so when there is no test script. - Ports and links between apps: env names from
.env.example, never their values; which ones are compiled in (NEXT_PUBLIC_*). - Conventions, each with a real file to copy: the message file layout and
locales; logical classes (
ms-*,text-start) when a locale is RTL; the data chain (API client folder, query hooks); forms; exact versions when facts.mjs reports no ranges. - Gotchas that fail quietly: a namespace list, a mock that must answer, a schema that syncs only in development, generated files.
- Leave out file trees, dependency lists, secrets and long docs. A rule with
no exceptions ("never read .env") belongs in
.claude/settings.jsonpermissions, not here. Check: every line names a command, a path, an env name or a rule that someone could verify in the code.
- Commands: exact script names from package.json (
- Check every file.
node ${CLAUDE_SKILL_DIR}/scripts/check.mjs CLAUDE.md, then each app's file and AGENTS.md (--root <dir>when the file is not in the project it describes). Check: 0 errors. Fix the file, not the checker, and read each WARN. - Keep it short. The checker fails a file over 200 lines, the length the Claude Code docs recommend staying under. Check: the line count in the checker's last line.
- Confirm it loads. Ask the user to run
/context allin a new session: the root file is listed under Memory files. App files load on demand, when Claude reads a file in that folder. Check: the user confirms it, or your report says it is not confirmed yet.
Report the files written, their line counts, the checker's last line for each, and any line you were unsure of.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

