11 cards
Install Claude Code (macOS, Linux, WSL)
`curl -fsSL https://claude.ai/install.sh | bash`; Windows PowerShell: `irm https://claude.ai/install.ps1 | iex`.
Claude Code agent loop
Gather context (Read, Grep, Glob) → act (Edit, Write, Bash) → verify (run tests, lint) → repeat.
`claude --continue` and `claude --resume`
Continue the most recent conversation in the directory; pick an older session to continue.
CLAUDE.md locations
User `~/.claude/CLAUDE.md`; project `./CLAUDE.md` or `./.claude/CLAUDE.md`; local `./CLAUDE.local.md` (gitignored); managed, deployed by IT.
Good CLAUDE.md
Under 200 lines, specific, with reasons, no contradictions, no repeating what can be read from code, no secrets.
Is CLAUDE.md enforced
No; it is context. Rules that must be followed absolutely use permission rules or hooks.
`/init`
Creates a starter CLAUDE.md from codebase analysis; always read and trim the generated version.
Imports in CLAUDE.md
The `@path/to/file` syntax loads extra files into context along with CLAUDE.md.
`.claude/rules/`
Split instructions by topic; a rule with `paths:` frontmatter only loads when working with matching files.
Auto memory
Notes Claude writes itself, stored in `~/.claude/projects/<project>/memory/` on your machine, not shared via git; view and disable with `/memory`.
What survives compaction
Project-root CLAUDE.md and auto memory are reloaded from disk; instructions given only in chat survive only in the summary.