I've been using Claude Code daily for 2 weeks. Here's every command, shortcut, and trick I use — distilled into one cheatsheet.
Bookmark this. You'll come back to it.
Essential Commands
claude # Start interactive session
claude "do X" # One-shot command
claude -p "prompt" # Print mode (no interactive)
claude --fast # Faster output
Slash Commands
| Command | What it does |
|---|---|
/help |
Show all commands |
/clear |
Reset conversation context |
/compact |
Compress context to save tokens |
/cost |
Show token usage |
/init |
Create CLAUDE.md for your project |
/commit |
Smart commit from changes |
Keyboard Shortcuts
| Key | Action |
|---|---|
Enter |
Send message |
Shift+Enter |
New line |
Ctrl+C |
Cancel |
Ctrl+D |
Exit |
Tab |
Accept suggestion |
The CLAUDE.md File
This is the single most important feature most people miss.
Create CLAUDE.md in your project root:
# My Project
## Stack
- React + TypeScript frontend
- Python FastAPI backend
- PostgreSQL database
## Rules
- Conventional commits only
- All functions need type hints
- Never commit .env files
Claude Code reads this automatically every session. No more repeating yourself.
Skills (Reusable Prompts)
Create .claude/skills/review.md:
---
name: review
description: Code review for bugs and security
---
Review git diff for:
1. Bugs and logic errors
2. Security issues
3. Performance problems
Show file, line, issue, and fix.
Use it: /review
MCP Servers (External Tools)
Configure in .claude/mcp.json:
{
"servers": {
"github": {
"command": "github-mcp-server"
},
"playwright": {
"command": "playwright-mcp-server"
}
}
}
Now Claude Code can browse the web, manage GitHub repos, query databases — anything the MCP server exposes.
My Top 5 Productivity Tricks
1. Read → Edit Pattern
Always tell Claude to read a file before editing. "Read auth.py and fix the login bug on line 42" > "Fix the auth bug."
2. Chain Actions
"Read the test file, run the failing test, read the error, fix it, run the test again." — One prompt, five actions.
3. Sub-Agents for Research
Claude Code can spawn background agents. "Research how Next.js 15 handles caching and save findings to research.md"
4. /compact When Slow
If responses get slow, your context is full. /compact compresses it.
5. Be Specific > Be Polite
"Refactor UserService to use dependency injection, keep the same public API" > "Could you maybe clean up the user service a bit?"
Full Cheatsheet Repo
I maintain a complete, updated cheatsheet here:
claude-code-cheatsheet — Star it for quick reference.
More resources:
- Awesome Claude Code Skills — Curated skills & MCP servers
- Claude Code Examples — 50+ practical examples
What's your favorite Claude Code trick? Drop it in the comments — I'll add the best ones to the cheatsheet.
Follow for more AI developer tools content.
Top comments (0)