npm install -g @anthropic-ai/claude-code
claude
β Generates a starter `CLAUDE.md` based on your project structure
β Detects build systems, test frameworks, and code patterns
`CLAUDE.md` is a special file that Claude reads at the start of every conversation.
Include:
This gives Claude persistent context it cannot infer from code alone.
β Use: βFor complex usage, see path/to/docs.mdβ
β Instead of:
"never use --foo-bar flag"
β Write:
"never use --foo-bar; prefer --baz instead"
Claude's context window includes:
If it gets full β Claude may forget earlier instructions.
cat error.log | claude
claude --continue claude --resume
Planning reduces decision complexity.
Without planning β success rate β 33%
β Ask Claude to write a spec first
β Say: **"don't implement yet"**
Include:
Claude will:
Refactor the auth middleware to use JWT. Run the existing test suite after. Fix any failures before calling it done.
Add `PostToolUse` hooks in:
.claude/settings.json
| Command | Description |
|---|---|
| `/init` | Generate starter CLAUDE.md |
| `/clear` | Reset context window |
| `/config` | Set output style |
| `!git status` | Run shell command |
| `Shift + Tab (x2)` | Enter Plan Mode |
| `claude βcontinue` | Resume last session |
Successful users:
Key idea: The difference between frustration and productivity is not the tool β it's how you use it.