This file provides project-specific guidance for Claude Code. Update this file whenever Claude does something incorrectly so it learns not to repeat mistakes.
It can load and render cool animation effects, The APIs provided by effects-core allow your engine to quickly access animation data such as layer and particle animation.
Give Claude verification loops for 2-3x quality improvement:
- Make changes
- Run typecheck
- Run tests
- Lint before committing
- Before creating PR: run full lint and test suite
- Prefer
typeoverinterface; As much as possible avoid useenum(use string literal unions instead) - Use descriptive variable names
- Keep functions small and focused
- Write tests for new functionality
- Handle errors explicitly, don't swallow them
# Verification loop commands (customize for your project)
pnpm check:ts # Type checking
pnpm test # Run tests, temporarily requires opening browser for manual confirmation
pnpm lint # Lint all files
# Git workflow
git status # Check current state
git diff # Review changes before commitAfter every correction or mistake, update this CLAUDE.md with a rule to prevent repeating it. Claude is good at writing rules for itself.
End corrections with: "Now update CLAUDE.md so you don't make that mistake again."
Keep iterating until the mistake rate measurably drops.
- Start every complex task in plan mode (shift+tab to cycle)
- Pour energy into the plan so Claude can 1-shot the implementation
- When something goes sideways, switch back to plan mode and re-plan. Don't keep pushing.
- Use plan mode for verification steps too, not just for the build
- For tasks that need more compute, use subagents to work in parallel
- Offload individual tasks to subagents to keep the main context window clean and focused
- When working in parallel, only one agent should edit a given file at a time
- For fully parallel workstreams, use git worktrees:
git worktree add .claude/worktrees/<name> origin/main
- Don't use
anytype in TypeScript without explicit approval - Don't skip error handling
- Don't commit without running tests first
- Don't make breaking API changes without discussion
- Respond in Simplified-Chinese by default; only switch to another language when explicitly requested in the prompt
Update this file continuously. Every mistake Claude makes is a learning opportunity.