Agent kit· v1.0.0

Ship Rules

Production rules for Next.js + TypeScript, generated for every AI coding tool.

18 production rules for Next.js, TypeScript, Tailwind, Drizzle/Prisma, Stripe, auth and testing, generated into AGENTS.md, CLAUDE.md, Cursor, Copilot and Windsurf formats from one source.

  • Cursor
  • Claude Code
  • OpenAI Codex
  • GitHub Copilot
  • Windsurf
  • Next.js
  • TypeScript

What you get out of it

  1. 01Every AI tool on the team follows the same production rules
  2. 02Fewer security holes in Server Actions, webhooks and caching
  3. 03Rules load by file path, so context stays small
  4. 04One edit in rules/*.md updates all five tool formats
  5. 05CI catches outdated or hand-edited rule files
€29

One-time purchase · incl. VAT

Overview

One set of rules. Every coding agent.

Your team uses Cursor, someone else swears by Claude Code, CI runs Codex, and Copilot reviews the pull requests. Each tool reads its own rules file in its own format, and most repos have one of them half filled in. Agents then guess. They cache per-user data, skip the auth check in a Server Action, trust the price that comes from the client, or put "use client" on a whole layout.

Ship Rules is a production rulebook for Next.js + TypeScript apps, written once in plain Markdown and generated into the native format of every major AI coding tool.

18 rules, 150 concrete instructions

Core principles, architecture, TypeScript strictness, React Server Components, data fetching and caching, security (OWASP-aligned), authentication and authorisation, Drizzle or Prisma, Stripe payments, Tailwind CSS, accessibility (WCAG 2.2 AA), performance and Core Web Vitals, testing, error handling, logging, i18n, SEO, and git and pull request hygiene.

These are concrete instructions an agent can act on, not vague advice. A few examples:

  • Every Server Action validates its arguments and checks authorisation for the specific resource, because Server Actions are public endpoints.
  • With Cache Components, every "use cache" gets a cacheLife, a cacheTag and an invalidation path (updateTag in Server Actions, revalidateTag(tag, "max") in webhooks).
  • Stripe webhooks verify the signature against the raw body and are idempotent by event ID. Prices are always computed on the server.
  • drizzle-kit push and prisma db push only touch throwaway local databases. Shared databases change through reviewed migrations.

The rules are written against Next.js 16 and React 19 (async request APIs, proxy.ts, Cache Components), and they tell the agent to check the installed versions first, so they also hold up on Next.js 14 and 15 projects.

Native format for each tool

scripts/sync-rules.mjs (zero dependencies) turns rules/*.md into:

  • AGENTS.md for Codex and every tool that reads it. At 31.4 KiB it stays inside Codex's default 32 KiB limit.
  • CLAUDE.md that imports AGENTS.md, or split mode with .claude/rules/*.md and paths: frontmatter.
  • .cursor/rules/*.mdc with description, globs and alwaysApply.
  • .github/copilot-instructions.md plus 14 path-specific .instructions.md files with applyTo.
  • .windsurf/rules/*.md with always_on, glob or model_decision triggers, plus .windsurfrules for older versions.

Only three rules load on every request (core, TypeScript, security). The rest attach when the agent touches matching files, so you don't pay for the Stripe rules while it edits a button.

All generated files are already in the pack, so you can copy them and you're done. When you change a rule, run the script and every tool is in sync again. --check fails CI when someone hand-edits a generated file or forgets to regenerate, and deleting a rule removes its generated files.

Made to be changed

Add a rules/05-project.md with your own stack decisions and commands, delete the Stripe rule if you don't take payments, or tighten the globs to your folder structure. The format is plain Markdown with five frontmatter fields.

Rules steer agents; they don't replace your linter, type checks, tests or reviews. The rules tell the agent to run those before it calls a task done.

Made for

  • Developers using Cursor, Claude Code, Codex, Copilot or Windsurf on Next.js apps
  • Teams where people use different AI coding tools on one codebase
  • Tech leads who want agents to follow security and quality standards
  • Agencies shipping Next.js projects for clients

Inside the tool

Features

  • 18 production rules

    Architecture, TypeScript, RSC, caching, security, auth, database, Stripe, Tailwind, accessibility, performance, testing, errors, logging, i18n, SEO, git and core principles.

  • Native output for 5 tool families

    AGENTS.md, CLAUDE.md, Cursor .mdc, Copilot repository and path-specific instructions, Windsurf rules plus the legacy .windsurfrules.

  • Zero-dependency generator

    sync-rules.mjs runs on plain Node.js 18+, with --targets, --out, --claude split mode and stale file cleanup.

  • Current Next.js knowledge

    Written for Next.js 16 and React 19: async request APIs, proxy.ts, use cache with cacheLife and cacheTag, updateTag, Server Action security.

  • CI check

    --check exits with code 1 when generated files are missing, stale or edited by hand, so rules never drift between tools.

Demo

See it work

Generate every format
terminal

$node scripts/sync-rules.mjs

write AGENTS.md

write CLAUDE.md

write .cursor/rules/00-core.mdc

write .cursor/rules/01-architecture.mdc

...

write .github/copilot-instructions.md

write .github/instructions/08-payments-stripe.instructions.md

...

write .windsurf/rules/17-git-pr.md

write .windsurfrules

sync-rules: 18 rules → 54 files (54 written, 0 unchanged, 0 removed).

Keep tools in sync in CI
terminal

$node scripts/sync-rules.mjs --check

out of date: AGENTS.md

out of date: .cursor/rules/05-security.mdc

out of date: .github/copilot-instructions.md

out of date: .windsurf/rules/05-security.md

sync-rules --check failed. Run: node scripts/sync-rules.mjs

(exit code 1)

What the agent does differently
prompt

You

Add a server action so customers can change the shipping address of an open order.

Agent

I'll put it in src/features/orders/actions.ts:

1. Parse the input with a zod schema (orderId, address fields); return field errors instead of throwing.

2. requireUser(), then load the order and check it belongs to this user and is still open. Server Actions are public endpoints.

3. Update inside a transaction, then updateTag(`order:${orderId}`) so the order page shows the new address immediately.

4. Return { ok: true } or { ok: false, error } for useActionState.

Tests: unauthenticated, another user's order, shipped order, invalid postcode, happy path.

What's inside

The exact contents of the zip you download.

ship-rules.zip
  • ship-rules/
  • rules/18 source rules in Markdown with frontmatter (id, title, description, globs, alwaysApply)
  • sync-rules.mjsGenerator for all formats, with --check for CI
  • AGENTS.mdAll rules for Codex and other AGENTS.md tools (31.4 KiB)
  • CLAUDE.mdClaude Code entry point that imports AGENTS.md
  • rules/18 Cursor .mdc rules
  • .github/copilot-instructions.md and 14 path-specific .instructions.md files
  • , .windsurfrules18 Windsurf rules and the short legacy file
  • README.md, README.de.md, LICENSE.mdSetup per tool, customisation and licence (EN and DE)

Install

  1. Copy the rules and the generator into your repository root:

    cp -R ship-rules/rules ship-rules/scripts your-app/
    cd your-app && node scripts/sync-rules.mjs

    Or copy the pre-generated files (AGENTS.md, CLAUDE.md, .cursor/, .github/, .windsurf/, .windsurfrules) directly.

  2. Back up an existing CLAUDE.md, AGENTS.md or .github/copilot-instructions.md first; the generator writes these files.

  3. Open the repo in your tool. Cursor, Copilot, Windsurf, Codex and Claude Code pick up their files automatically.

  4. Optional: add node scripts/sync-rules.mjs --check to CI.

For Claude Code with path-scoped loading: node scripts/sync-rules.mjs --claude split.

Requirements

  • One or more of: Cursor, Claude Code, OpenAI Codex, GitHub Copilot, Windsurf, or another tool that reads AGENTS.md
  • Node.js 18+ to regenerate files (not needed to use the pre-generated files)
  • A Next.js + TypeScript project (rules also cover Tailwind, Drizzle/Prisma and Stripe where you use them)

Works with

  • Cursor
  • Claude Code
  • OpenAI Codex
  • GitHub Copilot
  • Windsurf
  • Next.js
  • TypeScript

Frequently asked

Which tools are supported?

Cursor (`.cursor/rules/*.mdc`), Claude Code (`CLAUDE.md`, optionally `.claude/rules/`), OpenAI Codex (`AGENTS.md`), GitHub Copilot (`.github/copilot-instructions.md` and `.github/instructions/*.instructions.md`) and Windsurf (`.windsurf/rules/` and `.windsurfrules`). Other tools that read `AGENTS.md` work too, for example Zed, Jules and Amp. Aider and Gemini CLI work if you point them at the file.

Do I need Next.js 16?

No. The rules describe current Next.js 16 and React 19 behaviour, and they tell the agent to check the installed versions before using version-specific APIs. On Next.js 14 or 15 the agent follows the older caching model and APIs that your project actually uses.

We don't use Stripe or Prisma. Is it still useful?

Yes. Delete the rules you don't need and run the sync; their generated files are removed. Payment and database rules only load when matching files are touched anyway. The database rule covers Drizzle and Prisma.

How do I add our own conventions?

Create a file such as `rules/05-project.md` with frontmatter (id, title, description, globs, alwaysApply) and Markdown bullets, then run `node scripts/sync-rules.mjs`. Your rule then shows up in every tool format. Never edit the generated files directly, because `--check` flags them.

Won't this fill the context window?

Only three rules load on every request: core, TypeScript and security. The others are path-scoped in Cursor, Copilot, Windsurf and Claude Code split mode. AGENTS.md contains everything and stays inside Codex's default 32 KiB limit.

Licence and updates?

Use it in unlimited projects of your own and for your clients. Reselling or publishing the rule files themselves is not allowed. The one-time purchase includes 12 months of updates, for example when a tool changes its rule format, and downloads stay available forever.

Can I get a refund?

It's digital content that you can download straight away. At checkout you agree that delivery starts immediately and that your right of withdrawal expires (§ 356 (5) BGB). If a tool doesn't pick up the rules or something else doesn't work, write to us and we'll sort it out with you.

Changelog

  1. v1.0.0Latest

    1.0.0: First release with 18 rules (150 rule bullets) and a generator for AGENTS.md, CLAUDE.md (import and split mode), Cursor, GitHub Copilot and Windsurf, including a --check mode for CI.

Agent kit

Claude Code Agency Kit

Subagents, slash commands, hooks and guard rails for client web projects.

€99

Skill

SEO Surgeon

Technical SEO audits that end in a prioritized fix list.

€49

Skill

GEO Visibility

Get found, understood and cited by AI assistants and AI search.

€59