brillz
Claude Code12 min readMay 20, 2026

Claude Code Templates: The Definitive 2026 Guide

Claude Code templates are not boilerplate. They are the CLAUDE.md, structure, and conventions that let one builder ship what an agency quotes for. The playbook we use on every Brillz project.

Most teams reach for Claude Code templates the way they reach for create-next-app: as boilerplate. That is the wrong mental model, and it is why their projects end up looking the same and behaving the same.

A template is not the code. A template is the architecture of context — the instructions, conventions, and prohibitions that every prompt in your project inherits. Get that file right, and one builder ships in 252 hours what a team would quote for in six months. Get it wrong, and you spend your first 20 hours re-litigating the same fifty decisions.

What Claude Code Templates Actually Are

A Claude Code template is a pre-configured project structure paired with a CLAUDE.md instruction file that tells Claude how to work inside your codebase. It is not boilerplate. Boilerplate is code you delete. A template is architectural intelligence — the design tokens, file conventions, framework version warnings, naming rules, and explicit anti-patterns that every prompt in the project inherits as system context.

The boilerplate is what Claude writes. The template is what tells Claude how.

A production-grade template typically includes:

  • A CLAUDE.md at the repo root: tech stack, conventions, design system, what to avoid.
  • An AGENTS.md for invariants every coding agent must respect — framework breaking changes, deprecated APIs, version gates.
  • A folder structure with empty placeholder files (app/, lib/, components/) and one or two seeded examples of the project's idioms.
  • A .claude/ config with allowed permissions, slash commands, and hooks where relevant.
  • A supabase/migrations/ or equivalent data-layer convention so schema changes follow a predictable shape.

Five files. Roughly 500 lines of instruction text. A 4–8 hour onboarding cost collapses to 30 minutes, and — more importantly — every subsequent prompt produces output that matches your house style instead of Claude's defaults.

Why Templates Matter More Than You Think

When we started Bohemy, our first three days were not building features. They were Claude rediscovering things we already knew: that we use Tailwind v4 not v3, that our buttons are 4px radius not 8, that admin tables in our codebase use server actions not API routes. Every conversation re-litigated the same fifty decisions, and we paid the cost in tokens, in turns, and in mental load.

After we wrote our CLAUDE.md, those fifty decisions stopped showing up in conversations. They became invisible — handled in the system context, never in the chat. We measured the difference. Setup time on the next project dropped from ~6 hours to ~30 minutes. Conversation length dropped from an average of 38 turns to ~31. Across a year, that is hundreds of hours.

Templates compound. The CLAUDE.md we wrote for project one became 80% of the template for project two. Each ship sweeps a few more decisions back into the template. By the third project, the file is doing the work of a senior engineer who has already onboarded.

This is what people mean when they say AI accelerates senior teams more than junior ones. The acceleration is not Claude writing better code — it is Claude being able to inherit better context. Juniors do not have the context yet, so they cannot load it. Seniors do, so they can.

The numbers behind Bohemy — 252 hours from blank repo to production SaaS — are not Claude being magical. They are us not retyping the same fifty instructions across eight hundred prompts.

The CLAUDE.md File: Your Template's Brain

The CLAUDE.md is the highest-leverage file in your codebase. It gets loaded into every conversation's system context. What you put in it determines what Claude treats as default behavior versus what it asks about every turn.

A production-grade CLAUDE.md has seven sections, in this order:

1. Project overview. What the codebase is, who uses it, what stage. Two sentences. Claude uses this for judgment calls — a pre-launch consumer marketplace gets different defaults than a regulated B2B SaaS.

2. Tech stack. Exact versions of framework, database, payments, email, analytics. Be specific: "Next.js 16.2.6 (App Router, TypeScript strict)" not "Next.js (latest)". Version drift is where Claude hallucinates APIs that no longer exist or recommends Pages-Router patterns inside an App-Router project.

3. Design system tokens. Colors, typography, spacing, radius. These should be exact CSS values, not vibes. If your highlight is #E4E4E7, write #E4E4E7. Claude does math on hex codes; it cannot intuit "subtle off-white".

4. File structure. Where things go. app/ for routes, lib/ for shared logic, components/ui/ for primitives, supabase/migrations/ for DB changes. If you don't write this down, Claude makes plausible guesses that produce 12 inconsistent versions of the same convention.

5. Coding standards. What's allowed, what isn't. "No any." "Tailwind classes over CSS modules." "Server Components by default; 'use client' only when state or browser APIs are needed." One-line rules — the more declarative the better.

6. Naming conventions. kebab-case routes, PascalCase components, camelCase functions, SCREAMING_SNAKE_CASE constants. Boring, but the cost of not writing it is a codebase with three competing styles inside the same module.

7. What NOT to do. The most underused section. "Never use shadows on cards." "No emoji in UI." "No comments unless behavior is non-obvious." Prohibitions teach more than instructions, because they remove a whole branch of plausible output that you do not want.

A trimmed example from a real SaaS project:

# Bohemy — Two-sided proptech marketplace

Tech Stack

  • Next.js 16 (App Router, TypeScript strict)
  • Supabase (Postgres + Auth + RLS)
  • Stripe (Connect + subscriptions)
  • Resend (transactional email)
  • PostHog (EU region)

Design tokens

  • bg: #0A0A0A · surface: #111111
  • fg: #EDEDED · muted: #888 · subtle: #555
  • highlight: #E4E4E7 (zinc-200) — eyebrows, hover borders, small marks only
  • signal: blue-500 family — score badges 9–10 only, max 1–2 per viewport
  • radius: 4px everywhere · 1px borders, no shadows

File structure

  • app/(marketing)/ — public funnel pages
  • app/(dashboard)/ — authed agent UI
  • app/api/ — webhook handlers only; prefer server actions
  • lib/scoring/ — pure functions, fully unit-tested
  • supabase/migrations/ — sequential, never edited after merge

Rules

  • Server Components by default; 'use client' only with reason
  • RLS on every table; never service-role from the browser
  • No any. If a type is hard, fix the source.
  • One senior reviewer per PR. No pair-of-juniors approvals.

Never

  • Mutate state in render
  • Cross-import between (marketing) and (dashboard) routes
  • Add npm deps without a deletion plan

That is ~400 lines of context Claude inherits on every conversation in this repo. The same file in your codebase replaces a 30-minute onboarding conversation per feature.

**[Get the complete CLAUDE.md System with 5 production templates →](/products/claude-code-starter-kit)**

## 5 Production-Ready Template Patterns

Most projects fall into one of five shapes. The differences are in what the CLAUDE.md emphasizes, not in the stack. Pick the shape closest to what you are building, copy the structure, then adjust the conventions section to match.

### 1. SaaS Platform (Next.js + Supabase + Stripe)

The kitchen-sink template. Two-sided flows, dashboards, Stripe webhooks, RLS, multiple roles. The CLAUDE.md spends most of its weight on data boundaries: which table is owned by which role, which writes go through server actions vs webhooks, and how Stripe events propagate to subscription state. File structure separates `(marketing)/`, `(authed)/`, and `api/webhooks/` into hard groups that never cross-import — Claude will respect those groups in every subsequent build because the file declares them as inviolable. This is the template that powered Bohemy.

### 2. Landing Page + Lead Gen

A different problem. No auth, no dashboards — just conversion. The CLAUDE.md is design-system-heavy: every component documented, every interaction state explicit, every animation timing nailed. We also include a section on "what counts as conversion": email captures, scroll depth, CTA clicks. Claude uses that to decide whether a proposed tweak is worth doing or whether it is decoration. Routes stay flat — `/`, `/about`, `/services`, `/guides/[slug]` — because route depth is a tax on link equity.

### 3. API Service

Backend-only. No `app/`, no React. The CLAUDE.md focuses on contracts: request shapes, error envelopes, idempotency keys, rate limits, retry behavior. We write the OpenAPI spec into the template as a starting point, and every new endpoint has to update it. Edge Functions vs Node Functions is a recurring decision — the template documents which deployment target each route uses and why, so Claude does not redo that decision per route.

### 4. Admin Dashboard

Internal tools, role-based access. Where the SaaS template optimizes for end-users, this one optimizes for the people running the business. The CLAUDE.md goes deep on RLS patterns: read vs write policies, multi-tenant isolation, audit logs on every mutation. Tables are the central primitive — sortable, filterable, exportable — and we standardize one table component instead of letting Claude reinvent it per route. The "Never" section explicitly forbids ad-hoc table implementations.

### 5. Quiz / Funnel System

Multi-step forms, conditional logic, scoring algorithms, lead capture at the end. The CLAUDE.md documents the funnel as a state machine: every step has entry conditions, exit conditions, and a serializable shape that survives refresh. The scoring algorithm lives in its own file with full unit tests — Claude is much better at maintaining a pure function with explicit inputs and outputs than at chasing scoring logic scattered across React components. The template seeds that scoring file with a worked example so the next prompt builds on a real shape, not a blank.

## Prompt Architecture: How to Structure Your Build Prompts

The single biggest mistake we see is treating Claude Code like a chatbot. You write "build me an admin dashboard with users, billing, and a settings page", get back something passable, and then spend three weeks fixing it.

Don't write one big prompt. Write a sequence of small, isolated work packages.

A work package is a unit of work that:

- Has a single domain (auth, billing webhook, users list — never two).
- Has a clear definition of done — one or two acceptance criteria, no more.
- Fits in one conversation so Claude can hold the full mental model without confusion.
- Lands on `main` before the next one starts.

For an admin dashboard, our default work-package sequence is:

1. **Schema + RLS.** One migration, one set of policies, zero UI.
2. **Auth + session.** Login, logout, route protection. No business UI yet.
3. **Users list (read-only).** Server-side rendered, paginated, sortable. No actions.
4. **Users detail (read-only).** Joined data, computed fields. Still no actions.
5. **User edit.** First mutation. Server action, optimistic update, rollback on error.
6. **Bulk actions.** Multi-select, server action, single transaction.
7. **Empty / loading / error states.** The polish pass.

Each one is one conversation, roughly two to four hours, ending with a deploy. We have never regretted breaking work down further. We have regretted not breaking it down enough — most production bugs we have seen trace back to a prompt that tried to ship two domains in one conversation.

The CLAUDE.md does a second job here: it gives Claude the context to make the right local decisions inside each work package without that context being re-explained at the top of every prompt. The template carries the architecture so each prompt can carry just the task.

**[Download the Prompt Architecture Pack →](/products/prompt-architecture-pack)**

## The 5 Mistakes That Waste Your First 20 Hours

We have watched smart engineers make all of these. Now we just check the list.

**1. No CLAUDE.md.** You will spend hours re-explaining the same five facts about the project — stack, design tokens, file structure, naming, what not to do. The compounding cost is bigger than you think; each new conversation pays it again. Fix: write the file before you write the first feature, even if it is rough. A rough CLAUDE.md beats no CLAUDE.md by an order of magnitude.

**2. Prompts too broad.** "Build me a dashboard" produces a generic dashboard. "Build the users list, server-rendered, paginated, sortable by name and `created_at`, no actions yet" produces what you actually want. The fix is in the work-package framing above — one domain, one acceptance criterion, one conversation.

**3. No design system constraints.** Without explicit tokens, every page looks slightly different. Colors drift, radii drift, spacing drifts. By page 12 the codebase visually looks like four engineers worked on it — because in a sense they did. Fix: tokens in the CLAUDE.md, every component referencing tokens not raw values, and a flat ban on hard-coded hex.

**4. No documentation strategy.** Six months in, you cannot onboard a new engineer or hand off to a contractor. The CLAUDE.md is part of the answer; explicit docstrings on non-obvious functions are the other. Fix: every PR that adds a non-obvious function adds a one-line docstring explaining the why, never the what.

**5. No QA loop.** Claude does not know if the feature works. It only knows if the code compiles. Either you click through every flow yourself, or you build a small test harness — but skipping this is how you ship subtle bugs at twice the rate. Fix: end every work package with a manual click-through against the acceptance criteria. Five minutes that prevents five hours.

The pattern: the mistakes that cost most are not about Claude. They are about the system you build around Claude.

## Real-World: Bohemy in 252 Hours

Bohemy is a two-sided proptech marketplace. Quiz funnel for sellers, scored lead system for agents, Stripe-backed subscriptions, RLS-secured admin, email sequences, SEO foundation. 42+ database tables, 35 API endpoints, 133 deployed routes, 7 cron jobs, 1,058 seeded agent profiles, 11 email templates.

It took 252 hours from empty repo to revenue-ready. One senior builder. No junior team. No offshore.

The template did three specific things to make that possible.

It removed the first 6 hours of setup. The CLAUDE.md was already there. The folder structure was already there. The Supabase migration conventions were already there. Day one was day one of feature work, not day one of "let's agree how this project is shaped".

It made every conversation 10–20% shorter. We measured this. Conversations without CLAUDE.md averaged 38 turns; with the template, ~31. The savings came from never re-explaining design tokens, file paths, or version warnings — exactly the things a senior engineer would carry as background knowledge in their head.

It made the codebase coherent enough to maintain. Six months in, anyone — human or AI — can read the project files and understand the entire system. There is no tribal knowledge. The CLAUDE.md is the tribal knowledge, and it is in version control.

The reason a single builder can outpace an agency is not faster typing. It is that the template stops Claude from reinventing 90% of the project on every prompt. The other 10% is the actual work — the part worth paying for.

Want us to build it for you?

**[Book a strategy call →](https://cal.com/ottogisow/strategy-call)**

Frequently asked

What's the difference between a Claude Code template and boilerplate code?
A template configures how Claude works inside your codebase — the CLAUDE.md, the file structure, the design tokens, the conventions, the prohibitions. Boilerplate is the actual code Claude ends up writing. The template survives every refactor and shapes every subsequent prompt. Boilerplate gets deleted and replaced.
Do I need a separate CLAUDE.md for every project?
Yes. The whole point is project-specific context: framework versions, design tokens, deployment target, naming conventions. A shared CLAUDE.md across projects loses precision fast and starts producing generic output. Keep a personal template repo to seed new projects, then adapt the CLAUDE.md to the project on day one.
How long should a CLAUDE.md be?
Long enough to encode every decision you would otherwise re-explain in conversation. In practice, 200–500 lines for production projects. Past ~700 you're either documenting code (move it to JSDoc) or over-specifying (Claude infers reasonable defaults from a strong tech-stack line).
Do Claude Code templates work with other AI tools like Cursor or Codex?
Most of the content does. CLAUDE.md is Claude-specific by filename, but the same instructions placed in AGENTS.md or referenced from the repo README are loaded by Cursor, Codex, and most modern coding agents. We typically keep a thin AGENTS.md with framework invariants every tool must respect, plus a fuller CLAUDE.md for studio-specific conventions.
How often should I update my Claude Code template?
After every project. Each ship surfaces 2–5 conventions worth backporting into the shared template. The template that worked six months ago is missing today's framework breaking-changes and yesterday's design decisions. Sweep it like a working document, not a one-time setup.