1 Identity (foundation)
Tell the AI who it works with and what tone to use — no re-explaining your context each time.
## Identity
User: [your name] | Timezone: GMT+8 | Language: English
Role: [e.g.] assistant professor + biotech R&D director Four layers. Write down what you keep repeating, and let the machine read it. One page.
Tell the AI who it works with and what tone to use — no re-explaining your context each time.
## Identity
User: [your name] | Timezone: GMT+8 | Language: English
Role: [e.g.] assistant professor + biotech R&D director Your guardrails. The iron law: rules must be concrete enough to execute — vague advice is no rule.
## Rules
1. No rm; use mv with a _DELETE_ prefix
2. Never hard-code API keys; use environment variables
3. Ask for approval before any irreversible operation
4. Run a security review before installing any new tool Tech and tool choices, so you skip the "use X not Y" ritual every time.
## Preferences
- Frontend: Tailwind CSS + React
- Stats: R first (tests/effect sizes/figures), Python otherwise
- Calendar: Apple Calendar | Tasks: Apple Reminders Tell the AI where to find past decisions and preferences. Keep CLAUDE.md as an index, not a dump.
## Memory routing
- Preferences/config → memory/fact.yml
- Decisions/pitfalls → memory/episodic.jsonl
- Current task scratchpad → memory/scratchpad.md | Bad (vague) | Good (concrete) |
|---|---|
| Please be careful with safety | No rm; use mv with a _DELETE_ prefix |
| Keep code quality high | Every function must have a docstring |
| Write good commits | Commit format: type(scope): description |
| Don't install random things | Run a security review before installing any new tool |
# CLAUDE.md
## Identity
User: [your name]
Timezone: GMT+8
Language: English
## Rules
1. No rm; use mv with a _DELETE_ prefix
2. Ask before any irreversible operation
3. Never hard-code API keys in source
4. Run a security review before installing new tools
## Preferences
- [tech, e.g. frontend React + Tailwind]
- [language, e.g. Python first]
## Common paths
- Project root: /path/to/project
- Output dir: /path/to/output
## Memory (advanced, optional at first)
- Preferences: memory/fact.yml
- Task scratchpad: memory/scratchpad.md If this template helps you configure Claude Code, consider supporting future guides on Ko-fi.
☕ Buy me a coffeePast 200 lines? Split into .claude/rules/ and @import; keep the main file an index.