Claude Code Boilerplate: Templates and Starter Configs
By Tyler Cyert
A Claude Code boilerplate is a pre-configured project template that includes your CLAUDE.md, settings.json, agent definitions, rules, skills, and directory structure — ready to use from the first session. Instead of setting up your agent configuration from scratch for every project, you start with a working template and customize.
Think of it like Create React App, but for your AI coding agent's configuration. The boilerplate handles the scaffolding so you can focus on the work.
What Goes in a Boilerplate
A complete Claude Code boilerplate includes:
| File | Purpose |
|---|---|
CLAUDE.md | Project instructions — stack, conventions, architecture |
.claude/settings.json | Permissions, hooks, environment variables |
.claude/agents/ | Agent definitions for multi-agent workflows |
.claude/skills/ | On-demand skills for specialized procedures |
.claude/rules/ | Scoped rules for file-type conventions |
.gitignore | Entries for CLAUDE.local.md, settings.local.json |
| Working directories | Structured folders with INSTRUCTIONS.md |
Boilerplate by Project Type
Web Application (React + TypeScript)
- CLAUDE.md covers the React stack, component conventions, state management, and routing patterns
- Rules for components (named exports, Props interfaces), API routes (thin handlers, zod validation), and test files (describe blocks, factory functions)
- Hooks for auto-formatting with Prettier and running Vitest after edits
- Permissions allow build/test/lint commands, deny destructive git operations
API Service (Node.js + Express/Fastify)
- CLAUDE.md covers the API stack, endpoint conventions, middleware patterns, and database access
- Rules for route handlers, database queries, and middleware files
- Hooks for auto-formatting and running API tests
- Permissions allow server start/stop, test runs, and database migrations, deny production deployments
Full-Stack Application
- CLAUDE.md covers both frontend and backend, with architecture showing the boundary between them
- Agent definitions for frontend specialist and backend specialist roles
- Working directories separating frontend source, backend source, shared types, and API specs
- Rules for each layer with different conventions
Content/Documentation Project
- CLAUDE.md covers the content structure, style guide, and publishing workflow
- Skills for content creation, editing, and publishing procedures
- Working directories for drafts, reviews, and published content
- Agent definitions for writer, editor, and reviewer roles
Building Your Own Boilerplate
Step 1: Start with a Real Project
The worst boilerplates are theoretical. Start with a project you are actively working on. Get your Claude Code configuration working well for that project, then extract the reusable parts.
Step 2: Identify What Is Project-Specific
Separate configuration that changes per project from configuration that stays the same:
| Reusable (Boilerplate) | Project-Specific (Customize) |
|---|---|
| Permission patterns | Project description |
| Hook configurations | Architecture section |
| Rule templates | Specific build commands |
| Agent role structures | Working directory names |
| Gitignore entries | Environment variables |
Step 3: Template the Variable Parts
In your CLAUDE.md, leave clear markers for sections that need customization. Use descriptive headings so the developer knows what to fill in.
Step 4: Test on a New Project
Apply your boilerplate to a fresh project. Does Claude Code work well from the first session? Are there missing conventions? Does it ask questions your boilerplate should have answered? Iterate until the first session is productive.
Sharing Boilerplates
Team Boilerplates
Keep a shared boilerplate in a team repository. When someone starts a new project, they copy the boilerplate and customize. The boilerplate evolves as the team learns what works.
Community Boilerplates
Share your boilerplate publicly for others to use. Include a README explaining the stack it targets, the conventions it enforces, and how to customize it.
Boilerplates and OpenCode
The instruction content in a Claude Code boilerplate is mostly platform-agnostic. The same conventions, rules, and agent roles work whether loaded by Claude Code (from CLAUDE.md and .claude/) or by OpenCode (from AGENTS.md and .opencode/). Only the file paths and directory names change.
Generating Boilerplates with DotBox
DotBox is built for this. Draw the agents, skills and scripts your projects start with, then copy one setup prompt. Paste it into Claude Code in a fresh folder and it writes the boilerplate — CLAUDE.md, the .claude/ directory with agents, skills and settings.json, executable scripts, and working directories.
Instead of maintaining a template repository and manually keeping it updated, you keep the graph in DotBox and copy a fresh prompt whenever you start a project. When your conventions evolve, change the graph and the next prompt carries the change.