vite-ts-react-template
CLAUDE.md122 starsChanged 4 months agoMITView on GitHub
React SPA built with Vite using feature slice architecture with clean architecture principles. TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW. Package manager: PNPM only. Path alias: @/* → src/. 1. Plan Mode Default 2. Self-Improvement Loop 3. Verification Before Done 4. Demand Elegance (Balanced) 5. Autonomous Bug Fixing 6. Spec-Driven Development
In this repository18 other files it gives its agents.
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .github/instructions/copilot-instructions.mdCopilot instructions
- agent-md-refactorSkill
- brainstormingSkill
- building-blocksSkill
- commit-workSkill
- dependency-updaterSkill
- explaining-codeSkill
- frontend-designSkill
- github-actions-templatesSkill
- playwright-page-objectsSkill
- qa-test-plannerSkill
- react-useeffectSkill
- test-building-blocksSkill
- test-driven-developmentSkill
- typescript-advanced-typesSkill
- vercel-react-best-practicesSkill
- writing-specSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When unsure about requirements or business logic, ask the developer — never assume
- Distinctive: line 26
When multiple interpretations exist, present them — don't pick silently
- Distinctive: line 30
Use git commands only when explicitly requested
- Distinctive: line 31
Keep reports, options, and summaries extremely concise — prioritize information density
- Distinctive: line 38
If something goes wrong, STOP and re-plan immediately — do not keep pushing
- Distinctive: line 40
Use plan mode for verification steps, not just building
- Very specific: line 44
After any correction, capture the pattern in specs/lessons.md and write a rule to prevent recurrence
- Distinctive: line 50
Never mark a task complete without proving it works
- Distinctive: line 51
Run tests, check logs, and demonstrate correctness
- Distinctive: line 56
If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Distinctive: line 61
When given a bug report: just fix it
- Distinctive: line 62
Use logs, errors, and failing tests to diagnose — require zero context switching from the developer
- Distinctive: line 67
When implementing a spec, read the building-blocks skill rule file for each block in the Building Blocks Diff before writing code.
- Distinctive: line 68
If a rule file is missing or ambiguous, raise the gap — do not substitute with codebase exploration
- Very specific: line 73
Use AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION: anchors near non-trivial code (exception to no-comments rule)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project
React SPA built with Vite using feature slice architecture with clean architecture principles.
Stack
TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW.
Commands
pnpm dev— start dev server (port 5173)pnpm dev:all— start both frontend (port 5173) and local API server (port 3001)pnpm typecheck— type-check all sources (src, e2e, stories, tests)pnpm lint --fix— lint and auto-fixpnpm test— all tests (unit + storybook)pnpm test:e2e— Playwright E2E (headless)pnpm storybook— component dev (port 6006)
Package manager: PNPM only. Path alias: @/* → src/.
Core Principles
- Simplicity first — make every change as simple as possible, minimize code impact, choose the boring solution
- Surgical changes — touch only what the task requires; don't refactor, reformat, or "improve" adjacent code. Remove only the orphans your own changes create
- When unsure about requirements or business logic, ask the developer — never assume
- When multiple interpretations exist, present them — don't pick silently
- For changes >300 LOC or >3 files, ask for confirmation before proceeding
- Stay within current task context; inform dev if fresh start needed
- Modify API contracts only with explicit approval
- Use git commands only when explicitly requested
- Keep reports, options, and summaries extremely concise — prioritize information density
Workflow
1. Plan Mode Default
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions)
- If something goes wrong, STOP and re-plan immediately — do not keep pushing
- For complex features, write or request a spec before implementation
- Use plan mode for verification steps, not just building
2. Self-Improvement Loop
- After any correction, capture the pattern in
specs/lessons.mdand write a rule to prevent recurrence - Review
specs/lessons.mdat the start of each session - Ruthlessly iterate on lessons until the mistake rate drops
3. Verification Before Done
- Never mark a task complete without proving it works
- Run tests, check logs, and demonstrate correctness
4. Demand Elegance (Balanced)
- For non-trivial changes, ask: "Is there a more elegant solution?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple fixes — do not over-engineer
5. Autonomous Bug Fixing
- When given a bug report: just fix it
- Use logs, errors, and failing tests to diagnose — require zero context switching from the developer
6. Spec-Driven Development
- For features spanning 5+ files or 5+ unconstrained decisions, write a spec first using writing-spec skill
- When implementing a spec, read the building-blocks skill rule file for each block in the Building Blocks Diff before writing code. That is the canonical pattern — do not explore existing files to reverse-engineer patterns. Only read existing files for integration points (imports, symbols, types)
- If a rule file is missing or ambiguous, raise the gap — do not substitute with codebase exploration
- Skip when the developer opts out
Conventions
- Use
AIDEV-NOTE:,AIDEV-TODO:,AIDEV-QUESTION:anchors near non-trivial code (exception to no-comments rule)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

