DEV Community

Piekwerk
Piekwerk

Posted on

A free, validator-tested agent config kit for Next.js: what's inside

We sell agent config kits, and one of them is free. Not a trial, not
a crippled variant: the full Next.js kit, MIT licensed. This post is
a walkthrough of what is inside and why each piece is there, so you
can judge it before downloading, or just steal the structure and
build your own. Both are fine outcomes.

The layout

AGENTS.md                     112 lines, always-on baseline
CLAUDE.md                      40 lines, Claude-specific layer
.github/copilot-instructions.md 18 lines
.cursor/rules/00-core.mdc      always-apply core rules
.cursor/rules/10-stack.mdc     glob: app/**, components/**
.cursor/rules/20-testing.mdc   glob: **/*.test.*, __tests__/**
.cursor/rules/30-safety.mdc    always-apply safety rails
skills/                        8 on-demand skill files
Enter fullscreen mode Exit fullscreen mode

One kit covers four assistants from the same source of truth. The
Next.js-specific parts are tagged so regenerating for Svelte or
Rails is a find-and-replace away.

The always-on baseline

112 lines, and every line passed a three-question filter before it
earned a place: does a machine already check this, would following it
change behavior this session, is it a command with a concrete
trigger. The sections:

  • Project context (6 lines): what this is, what it is not.
  • Commands (12 lines): dev, build, test, lint, typecheck. Every command verified to exist by the validator.
  • Code style (8 lines): only what the linter cannot express.
  • Testing expectations (8 lines): what must have a test, what the definition of covered means here.
  • Safety rules (10 lines): env files, migrations, destructive commands. First third of the file, where compliance is strongest.
  • Definition of done (8 lines): the checklist the agent echoes before claiming finished.

The scoped rules

Four .mdc files. The split follows one principle: always-on
context is the expensive kind, so it stays minimal and depth goes
into files that load when their globs match.

  • 00-core (always): behavior rails, response format, stopping conditions.
  • 10-stack (app/components): Next.js conventions, server/client component boundaries, data-fetching patterns.
  • 20-testing (test files): factory conventions, what to mock, coverage expectations.
  • 30-safety (always): the rules that must never be rationalized away, kept short for exactly that reason.

The skills

Eight files the agent loads on demand rather than always:
plan-first-smallest-diff, investigate-before-fix, tdd-loop,
verify-and-stop, session-handoff, release-checklist,
migration-safety, dependency-upgrade. Each is a short procedure for
one recurring situation. On-demand loading keeps them out of the
token budget until invoked.

What the validator checks

Every kit, including the free one, passes the same battery:

required files present (AGENTS.md, CLAUDE.md, .cursorrules or rules/)
CLAUDE.md within the 300-line budget
3-5 .mdc rule files, frontmatter with description + activation mode
no placeholder text ("TODO", "your-project-name", lorem)
every command referenced in config exists in package.json/scripts
every path referenced in config exists on disk
8 required skill files present
Enter fullscreen mode Exit fullscreen mode

The placeholder check sounds trivial until you count the published
config templates that ship with "your-api-key-here" in them.

What the kit will not do

It will not make a bad repo good. Config amplifies project
discipline, it does not replace it. It will not fit every team: if
your conventions differ, the kit is the starting draft, edited in an
afternoon. And it does not include hooks for destructive-command
blocking; that part is setup-specific and covered in a separate post.

Get it

Free Next.js kit (MIT): piekwerk.gumroad.com/l/free-sample-nextjs. No email
wall, no trial timer. The other 11 stacks (Python, Go, Rust, Rails,
and more) are in the full pack if Next.js is not your stack.

Related reading

Top comments (0)