← AGENTS.md Generator

AGENTS.md for Next.js (TypeScript)

A ready-to-use instructions file for Claude Code, Cursor, Codex and other coding agents in Next.js (TypeScript) repos. Save as AGENTS.md (or CLAUDE.md) at the repo root.

# Project agent instructions (Next.js (TypeScript))

## Commands
- Test: `pnpm test`
- Lint/typecheck: `pnpm lint && pnpm tsc --noEmit`
- Run both before saying a task is done; paste the output.

## Stack rules
- Use the App Router conventions already in the repo. Server Components by default; add "use client" only when needed.

## Workflow
1. Read relevant files first. Never guess APIs.
2. Plan in 3-5 bullets, then make the smallest diff that works.
3. No drive-by refactors. Stay in scope.
4. If uncertain, stop and ask.

## Guardrails
- No new dependencies without asking.
- Never read, print or commit secrets (.env, keys).
- No destructive commands (rm -rf, force push, DB drops).
- Never delete or skip failing tests to go green.

Customize in the generator

Why these rules

Agents fail most on: guessing APIs, sprawling diffs, adding dependencies, and "fixing" tests by deleting them. Each line above targets one of those failure modes.

More: Agent Tools Directory · buildlog pack

Get one practical AI/dev tip a week

Free. No spam. Unsubscribe anytime.