Claude Code Reference

v2.1.178 · 87 auto-discovered · Commands, shortcuts, hooks, Python/AWS tips.

Power Tips

1
Plan mode first

Start with --permission-mode plan. Review the plan, then switch to acceptEdits to execute. Safer for big changes.

2
Worktrees for parallel tasks

Use claude -w feature-name to work on multiple branches simultaneously without conflicts.

3
/compact before big tasks

If you have been chatting for a while, run /compact before starting a new big task. Frees context.

4
ultrathink for hard problems

Include 'ultrathink' in your prompt to get maximum reasoning depth on complex debugging.

5
@file references

Use @filename.py in your prompt to reference files without pasting. Claude reads them automatically.

6
Pipe for automation

Pipe files, diffs, or logs into claude -p for automated analysis in CI/CD.

git diff main | claude -p "review this diff for security issues"
7
/batch for large refactors

Use /batch for changes spanning 5-30 files. Creates isolated worktree agents that work in parallel.

8
Custom skills

Create .claude/skills/<name>/SKILL.md for repeatable workflows (deploy, test, review). Claude follows them exactly.

9
Hook auto-format

Add a PostToolUse hook on Edit|Write to auto-run your formatter (prettier, black, ruff) after every file change.

10
/loop for monitoring

Use /loop 5m 'check test status' to poll a long-running CI build without babysitting.