Claude Code instructions

Give Claude durable, repository-specific context

A project CLAUDE.md is a Markdown instruction file loaded by Claude Code. Use it for commands, architecture, conventions, safety boundaries, and completion checks that apply across sessions.

A small project-level example

Place shared project instructions at ./CLAUDE.md or ./.claude/CLAUDE.md. Keep personal, cross-project preferences in the user-level file described by the official documentation.

# Project workflow

## Commands
- Install: `pnpm install`
- Develop: `pnpm dev`
- Test: `pnpm test`
- Lint: `pnpm lint`

## Architecture
- Routes live in `src/app/`.
- Shared UI lives in `src/components/ui/`.
- Database access goes through `src/data/`.

## Working agreements
- Preserve unrelated user changes.
- Validate external input at the boundary.
- Add a regression test when fixing a bug.
- Ask before changing a public API or data model.

## Completion
- Run the relevant tests and lint checks.
- Report changed files, verification, and known limitations.

What belongs in the file

Commands Claude cannot infer safely

Install, test, lint, build, migration, and local service commands with required working directories.

Architecture that changes decisions

Ownership boundaries, source-of-truth modules, data flow, generated code, and intentional exceptions.

Rules with observable outcomes

Specific naming, validation, accessibility, security, review, and testing requirements.

References instead of duplication

Point to maintained documents and use imports for focused material rather than copying stale content.

Instructions shape behavior; they do not enforce policy

Keep the file concise and non-conflicting, then use permissions, hooks, protected branches, CI, and application-level controls for guarantees that must hold regardless of model behavior.