agentleFS
aniq-ui-proaniq-ui-pro/agent-skills/skills/nextjs-claude-md/SKILL.md

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

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
  1. Very specific:

    Write instruction files from what the code does, then prove that every command and path in them exists.

    line 8
  2. Distinctive:

    Check: it lists every app you expect.

    line 15
  3. Very specific:

    Look before you write: If it reports a CLAUDE.md, AGENTS.md or rule files under .claude/ already, read them and plan edits.

    line 17
  4. Distinctive:

    Check: you can name the file each new line will go in.

    line 19
  5. Distinctive:

    Check: no line appears in two files.

    line 27
  6. Very specific:

    Leave out file trees, dependency lists, secrets and long docs.

    line 40
  7. Distinctive:

    Check: every line names a command, a path, an env name or a rule that someone could verify in the code.

    line 43
  8. Distinctive:

    Check: 0 errors. Fix the file, not the checker, and read each WARN.

    line 49
  9. Distinctive:

    Check: the line count in the checker's last line.

    line 53
  10. Very specific:

    Confirm it loads: Ask the user to run /context all in a new session: the root file is listed under Memory files.

    line 55
  11. Distinctive:

    Check: the user confirms it, or your report says it is not confirmed yet.

    line 58

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

  1. 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.
  2. 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.
  3. 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.md followed by Claude-only lines. Check: no line appears in two files.
  4. 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.json permissions, not here. Check: every line names a command, a path, an env name or a rule that someone could verify in the code.
  5. 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.
  6. 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.
  7. Confirm it loads. Ask the user to run /context all in 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.