Hype StackHypeStack

Search

Search the packs, templates, docs, and pages

Guide

Claude Code Templates: CLAUDE.md, Rules, Skills, and Whole Projects

"Claude Code template" means four different files depending on who is asking. Three of them you can write in an afternoon. The fourth is a project, and that is the one that decides whether the first three do anything.

People searching for claude code templates want one of four things: a CLAUDE.md to copy, rules files for a language or framework, a skill to teach the agent a workflow, or a whole project that comes with all three already in place. They get mixed together in every list, so this page takes them one at a time, says what each one is for, and gives you something you can paste.

The four kinds, and which one you are looking for

What people mean by a Claude Code template

A CLAUDE.md

The file Claude Code reads at the start of every session in a repository. It is the place for facts the agent cannot infer from the code: how to run the tests, which commands are forbidden, what the branches mean. One per repo, short, always loaded.

always onone file
Rules files

Markdown in .claude/rules, each scoped to a path with a paths field in its frontmatter, so backend conventions only load when the agent opens a backend file. This is where the architecture lives: error handling, folder layout, what a route is allowed to do.

.claude/rulespath scoped
Skills

A folder with a SKILL.md that teaches the agent a procedure it can invoke: how to run the release, how to review a PR against a checklist, how to write a landing page. Loaded on demand, not on every turn, which is why long instructions belong here and not in CLAUDE.md.

.claude/skillson demand
A project

A repository that ships the three above, already written for its own code, plus the MCP server the agent uses to change it. This is what people mean when they say the agent 'just works' in one codebase and flails in another. The difference is rarely the prompt.

reporules + skills + mcp

The first three are text files and take an afternoon. The fourth is the reason the first three have anything to say.

A CLAUDE.md worth copying

The most common mistake is putting everything in it. CLAUDE.md is loaded on every turn, so every line costs context on every turn, and a two-page file gets skimmed the way a two-page email does. Keep the things that are true for the whole repository and cannot be found by reading code:

markdown
## Project

pnpm monorepo. Apps live in `apps/*`, shared packages in `packages/*`.

## Commands

- `pnpm dev` starts every app. Do not start it: it is already running in another terminal.
- `pnpm --filter <app> test` runs one app's tests. Run these freely.
- `pnpm typecheck` at the root after any change to a shared package.

## Rules that are not negotiable

- Never use `as any`. Find the type.
- Never wrap backend logic in try/catch. The error middleware owns errors.
- Commit messages follow `feat: 🎸 <subject>` / `fix: 🐛 <subject>`.

## Where things are

- Backend routes: `apps/backend/src/routes`. Business logic: `apps/backend/src/features/<domain>/modules`.
- Frontend data fetching goes through HyperFetch clients in `apps/frontend/src/api`.

Everything longer than that belongs in a rules file scoped to the folder it is about.

Rules files that change behaviour

A rule file that says "write clean code" changes nothing. A rule file that names the mechanism does. This is the shape that works, taken from the backend rules the template ships:

markdown
---
paths:
  - "apps/backend/**/*.ts"
---

## Backend error handling

Errors are handled centrally by `src/middleware/error/error-middleware.ts`.

- Do NOT use try/catch in routes, features, modules, queries or mutations.
- Throw `ApplicationError`, `AuthError`, `AuthorizationError` or `ValidationError` with the matching code enum.
- A catch block that only logs is wrong. That error should reach the middleware, which is what reports it to Sentry.

The one exception: cleanup with rethrow (delete the temp file, then `throw error`).

Three things make that rule work where "handle errors properly" fails. It names the file that owns the behaviour. It says what to do instead, with the exact identifiers. And it is scoped, so it costs nothing when the agent is editing a React component.

A rule file earns its place when

  • It names a file or an identifierThe agent can go and look. 'Follow our conventions' gives it nowhere to go.
  • It says what to do insteadA prohibition without a replacement gets worked around in a different wrong way.
  • It is scoped by pathA frontend rule loaded on a database migration is noise, and noise is what gets rules ignored.
  • It would change a diffIf you cannot describe a diff the rule would have prevented, it is a preference, not a rule.

The template ships around forty of these across backend, frontend, testing, voice and infrastructure, most of them path scoped. Twenty-five of them apply only inside one app.

Skills, for the things you do more than twice

A skill is a SKILL.md in its own folder with a name and a description in the frontmatter. The description is what the agent reads to decide whether to use it, so it should say when, not what:

markdown
---
name: preflight
description:
  Ship gate. Run before any push to main, or when asked "is this safe to ship". Detects what kind of change is in the
  tree, runs the typecheck, tests and e2e lanes that change needs, and records the verified tree.
---

1. Detect the change kind from `git diff --name-only origin/main`.
2. App or package code: root `pnpm lint`, `pnpm typecheck`, `pnpm test`.
3. A new or changed pack: also that pack's e2e lane.
4. Record the verified tree hash so the push hook lets main through.

You do not have to write these from scratch. The skills.sh directory has a few hundred, installed with one command, and the template's create pulls eight of them into .agents/skills during scaffolding: design guidelines, React performance patterns, a planner that interrogates a plan against the docs, a teacher that explains the change it made. Claude Code reads them through a .claude/skills link, and Codex, Cursor and Copilot read the same folder directly.

The whole-project template

Here is the part the lists leave out. A CLAUDE.md template from a gist describes somebody else's repository. The rules worth having describe your architecture, and the architecture has to exist before anyone can write rules for it. So a Claude Code template that actually changes how the agent behaves is a project: a codebase with a shape, and the rules, skills and tooling written against that shape.

That is what Hype Stack is. A full-stack TypeScript app (React 19, TanStack Router, Hono, Prisma and Kysely on Postgres) that comes with the rules already written for its own conventions, in every editor's format at once: Claude Code gets .claude/rules/*.md with paths frontmatter, Cursor gets .cursor/rules/*.mdc, Codex and OpenCode get an AGENTS.md, Copilot gets .github/instructions. Pick the editors you use and create writes all of them.

Why the project matters more than the prompt

01

Types are a rule the agent cannot ignore

Backend route types flow into the frontend clients, so when the agent changes a response shape and forgets a consumer, the typecheck fails before the user does. A rule file asks the agent to be careful. A type makes carelessness not compile.

  • Hono
  • HyperFetch
  • pnpm typecheck
02

The MCP server changes the project through the real installer

Adding billing is not the agent inventing a Stripe integration. It is the agent calling the same installer you would run, which copies the pack's frontend, backend and admin files, merges the Prisma models and runs the codemods. Eleven tools, installed with one command.

  • npx @hype-stack/cli@latest mcp install
  • add_packs
  • setup_project
03

The feedback loop is fast enough to run every turn

Rules only help if the agent can check its own work before handing back. The toolchain is TypeScript 6, Vite 8 on Rolldown, oxlint, oxfmt and Vitest 5, so typecheck and lint finish inside the turn instead of after you have already read the diff.

  • tsgo
  • oxlint
  • vitest

What is not in the box: your product. The template knows how a route is written and how an organization owns its records. It does not know what your app does, and the rules it ships will not write your domain for you. That part is still the agent and you, working in a repo where the boring decisions are already made and enforced.

Six project templates, each with the rules, skills and MCP server in placeA multi-tenant SaaS, an AI agent app, an internal records tool, a collaborative canvas, a scheduling app and a personal site. Scaffold one and Claude Code reads the conventions on the first turn.Browse templates
Hype Stack

What is Hype Stack?

Every product starts with the same month of work nobody pays you for: sign-up and login, teams and permissions, taking payments, notifications, an admin panel to run the business. Hype Stack is that month, already built and tested. Start from the free open-source app, add the pieces you need with one command, and keep going on the part that is actually your idea.

Everything lands as real code in your own repository, so there is nothing to rent and nothing anyone can switch off. For the engineers: React 19, Hono, Postgres, and a desktop build, typed end to end.

See it running

Templates are curated project starters built on this stack: a layout, feature packs, a custom theme, and bonus pages. The previews below are recordings of the real apps.

Two ways to install features

Same features underneath, different starting point. Either command resolves what the packs depend on, copies the source into your repository, and merges the Prisma schema.

Ready-made

Take a template

A landing page, a design system, a themed layout, and the features already wired into it. Rebrand it, put your product in the middle, ship.

$npx @hype-stack/cli template
Browse templates
From scratch

$ hype-stack compose

AuthPayments

Compose your own design

Your design and your choices, without rebuilding auth, billing, or notifications. Tick the packs you want and the CLI wires them into the open-source starter.

$npx @hype-stack/cli compose
Browse packs

Questions, answered

CLAUDE.md is loaded on every turn, so it holds only what is true for the whole repository and cannot be read from the code: commands, hard prohibitions, where things are. Anything about one area of the codebase goes in .claude/rules with a paths field, so it only loads when the agent opens a matching file.

More stacks

Turn your ideas into
Real applications.

Start free and own every line you ship. When you want more, one All-Access license unlocks every premium pack and template for a year.

All premium packsEvery template12 months of updates
Get the whole catalog$299/year