Loading page content
Generate a tuned CLAUDE.md for your repo. Stack-aware defaults, optional hook block, optional MCP block, optional budget guard. Copy and drop into the project root.
# my-app
Repo guidance for Claude Code. Read this before touching anything.
## Stack
- Primary stack: Next.js + TypeScript
- Package manager: npm
- Test runner: vitest
## Commands
Run these from the repo root.
- Dev: `npm run dev`
- Build: `npm run build`
- Test: `npm test`
- Typecheck: `npx tsc --noEmit`
- Lint: `npm run lint`
- Deploy: `vercel --prod` (manual gate, do not run unprompted)
## Agent posture
Balanced. Plan for changes touching more than 3 files. Confirm on production paths.
## Definition of done
Before claiming any task complete:
1. `npm test` passes
2. `npx tsc --noEmit` passes
3. `npm run lint` passes
4. `npm run build` succeeds
5. Manual sanity-check of the change in the dev environment.
## Production-sensitive paths
Any change touching these requires explicit human confirmation. Do not edit unprompted.
- `src/lib/db`
- `.github/workflows`
- `terraform/`
## House rules
- Plan before writing code on tasks larger than one file.
- TDD on every behavior change: red, green, refactor.
- One commit per logical change. No mega-commits.
- Match existing patterns in the file before introducing new ones.
- No new dependencies without explicit approval.
- Never silently catch errors. Either handle them or let them surface.
- Never bypass pre-commit hooks. If a hook fails, fix the underlying issue.
## Recommended hooks
Add to `.claude/settings.json`:
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": ".claude/hooks/block-destructive.sh" }
]
}
]
}
}
```
Where `block-destructive.sh` refuses `rm -rf` outside /tmp, `git push --force` on protected branches, and any `terraform destroy`.
## Token budget
Per-task soft cap: 200,000 tokens. Sessions that approach this should stop and ask the human to slice the task smaller, not keep iterating.
---
_Generated with the [CLAUDE.md Generator](https://hammadhaqqani.com/tools/claude-md-gen)._