CLAUDE.md Template for Web Apps

A battle-tested CLAUDE.md starting point for TypeScript web apps: commands, conventions, and guardrails Claude Code actually follows.

# Project: [APP NAME]

[One sentence: what this app is and who uses it.]

## Commands
- Dev server: `pnpm dev`
- Type check: `pnpm typecheck`
- Tests: `pnpm test` (single file: `pnpm test path/to/file.test.ts`)
- Lint + format: `pnpm lint`

Always run typecheck and the relevant tests before declaring a change done.

## Architecture
- [FRAMEWORK + VERSION, e.g. Next.js 16 App Router]
- Data layer: all reads/writes go through `lib/[X]`, never query the DB from components.
- State: [e.g. server components by default; client components only for interactivity].

## Conventions
- TypeScript strict; no `any`, no type assertions to silence errors.
- Prefer editing existing files over creating new ones; match surrounding style.
- Keep components under ~150 lines; extract when they grow past that.
- Error handling: fail loudly in dev, degrade gracefully in prod. Never swallow errors silently.

## Do not
- Do not add dependencies without asking.
- Do not edit generated files: [LIST, e.g. `*.gen.ts`, migrations].
- Do not commit: leave commits to me unless I ask.

## Deeper docs
Read these only when the task touches them:
- `docs/[X].md`: [one line on what it covers, e.g. "auth flow and session handling"]
- `docs/[Y].md`: [e.g. "deploy pipeline and environments"]

## Context
- [Anything non-obvious: auth quirks, deploy setup, flaky tests, domain terms.]

How to use

Save as CLAUDE.md in your repo root, fill in the bracketed placeholders, and delete sections that don't apply. Keep it under ~60 lines: models reliably follow a limited number of instructions, so every line here competes with your actual task. The 'Deeper docs' section is the escape valve: point to detail files instead of inlining them, and never duplicate rules your linter already enforces.

More agent prompts

You are a software engineering agent working in the [PRODUCT/TEAM] codebase ([LANGUAGE/STACK]). Your objective is to take an assigned task from description to verified, working code. You may read and modify anything in the repository; you do not push, merge, deploy, or alter CI configuration unless the task explicitly says to.

# Operatin

Coding Agent System Prompt

Autonomous coding agent that matches repo conventions, proves work with passing tests before claiming done, and reports failures truthfully.

Agentintermediate
You are a debugging agent for the [PRODUCT] codebase. Your objective is to find the root cause of a reported bug, fix it with the smallest possible change, and prove the fix. You are not here to refactor, harden, or improve unrelated code: a debugging session that ends in a 40-file diff has failed even if the bug is gone.

# Reproduce Bef

Debugging Agent System Prompt

Root-cause-first debugging agent: no fix until the bug is reproduced, minimal diffs only, and done means the repro dies while the test suite stays green.

Agentintermediate
You are a code migration agent. Your objective is to move the [PRODUCT] codebase from [SOURCE VERSION/FRAMEWORK] to [TARGET VERSION/FRAMEWORK] while preserving behavior exactly. You are a mechanical translator with judgment, not a redesigner: the product must work the same after every step you take.

# The Prime Rule: Migration Changes On

Code Migration Agent System Prompt

Framework-upgrade agent that migrates in build-green slices, verifies every codemod, follows official guides over memory, and never mixes in behavior changes.

Agentadvanced

Search prompts

Find a prompt by title, description, tag, or category.