The commands worth memorizing
One idea explains most of these: output quality = context quality. Most "Claude got dumb" moments are context problems — noise piling up, or a session that has run too long. These commands are how you manage it.
Session hygiene
| Command | What it does | When |
|---|---|---|
/clear | Wipes the conversation context. | Between unrelated tasks. A polluted context is worse than an empty one. |
/compact | Summarizes the session and keeps going with a fresh window. | Long session starting to drift or forget. |
/resume | Pick a past session and continue it. | Coming back to yesterday's work — don't re-explain from scratch. |
claude --continue | Reopen the most recent session from the shell. | Fastest way back in. |
Keyboard
| Keys | What it does |
|---|---|
| Esc | Interrupt Claude mid-flight and steer. Don't wait for a bad run to finish — this is the highest-value key in the tool. |
| Esc Esc | Rewind the conversation to an earlier point and try a different approach. |
| Shift+Tab | Cycle permission modes: normal → auto-accept edits → plan mode. |
| ↑ | Walk back through your prompt history. |
Prompt prefixes
| Prefix | What it does |
|---|---|
@file | Reference a file precisely (with fuzzy path completion) instead of describing it. |
!command | Run a shell command yourself — its output lands in the conversation. e.g. !npm test |
# note | Save a fact to memory / CLAUDE.md without breaking flow. e.g. # always use pnpm here |
Setup & utility
| Command | What it does |
|---|---|
/init | Bootstrap a CLAUDE.md for the current repo. |
/permissions | View and edit the tool allowlist (see tab 04). |
/model | Switch models mid-session. |
/config | Harness settings — theme, notifications, etc. |
/mcp | Manage connected MCP servers. |
/agents | Create and manage custom subagents. |
/statusline | Customize the status line at the bottom of the terminal. |
/help | Everything else. |
Say "think hard" (or escalate to "ultrathink") in a prompt to buy extra reasoning on genuinely hard problems. And you can paste screenshots straight into the prompt — error dialogs, designs, diagrams.
CLAUDE.md & making it behave
CLAUDE.md is a file of standing instructions loaded at the start of every session — the difference between re-explaining your project every day and Claude just knowing how your team works.
Where it lives
| File | Scope | Put here |
|---|---|---|
CLAUDE.md (repo root) | Project — checked into git, shared with the team | Build & test commands, conventions, architecture notes, gotchas. |
~/.claude/CLAUDE.md | Personal — every project on your machine | Your own working style: "verify before claiming done", "plan before non-trivial work". |
How to see and edit it
- It's just a markdown file — open it in your editor like any other file, or ask Claude: "show me the CLAUDE.md and suggest improvements."
/init— generates a starter CLAUDE.md by analyzing the repo. Best first move in any project that lacks one./memory— opens your memory files for editing right from the session.#prefix — type# we deploy with make ship, never npm publishmid-session and it's saved for every future session.
Short and rule-like, not essays. "Run npm test before saying done." "API handlers live in src/routes/." "Never touch generated files in dist/." Prune it like code — a bloated CLAUDE.md is noise in every single session.
The rest of the steering toolkit
- Plan mode (Shift+Tab) — Claude proposes a plan before touching code. Reviewing a plan is far cheaper than reviewing a 400-line diff. Use it for anything non-trivial.
- Esc early, Esc often — interrupt and steer the moment direction looks wrong. Don't let a bad approach run to completion.
- Demand evidence — "run the tests and show me the output" beats trusting "done." Make it verify.
- Review the diff — ask Claude to review its own changes for bugs before you merge.
/security-reviewfor anything security-sensitive. - Be concrete —
@src/auth/token.tsplus a pasted screenshot of the error outperforms three paragraphs of description.
Packaged expertise that loads on demand
A skill is a folder with a SKILL.md — instructions plus a description that tells Claude when to auto-load it. Skills keep specialized knowledge out of CLAUDE.md and only spend context when they're relevant.
Where they live
| Path | Scope |
|---|---|
.claude/skills/<name>/SKILL.md | Project — checked in. This is how Mirsee shares "how we do deploys / releases / migrations" with each other and with Claude. |
~/.claude/skills/<name>/SKILL.md | Personal — follows you across all projects. |
Invoke one explicitly with /<skill-name>, or just work normally — skills whose description matches the task fire on their own.
Skills worth knowing about
Everyone writes (or asks Claude to write) one project skill this week — the thing you always end up explaining in Slack. Check it in. That knowledge now lifts the whole team on every session.
Stop the permission nagging — two ways
By default Claude Code asks before running commands or editing files. Useful at first, tedious once you trust your setup. There's a blunt way and a precise way to loosen it.
The blunt way (how Jody runs it)
claude --dangerously-skip-permissions
Skips all permission prompts — "YOLO mode." The name is honest: Claude can run anything without asking, so reserve it for work you'd be comfortable letting a fast-moving teammate do unsupervised, ideally in a repo that's committed and pushed. Don't pair it with credentials you care about.
The precise way: allowlists
Run /permissions in a session, or edit the settings files directly. Rules you allow never prompt again — everything else still asks.
// .claude/settings.json — checked in, applies to the whole team { "permissions": { "allow": [ "Edit", "Bash(npm run *)", "Bash(git status)", "Bash(git diff *)", "Bash(git log *)" ], "deny": [ "Bash(rm -rf *)" ] } }
| File | Scope |
|---|---|
.claude/settings.json | Project, checked in — the team's shared allowlist. |
.claude/settings.local.json | Project, personal — gitignored, your own additions. |
~/.claude/settings.json | Global — every project on your machine. |
Middle ground: permission modes
- Shift+Tab to auto-accept edits — file edits fly, shell commands still ask. The sweet spot for most work.
claude --permission-mode plan— start a session in plan mode: read-only until you approve a plan./config— everything else: theme, notification style, model default.
Start with auto-accept edits + a shared project allowlist for your build/test/git commands. Graduate to --dangerously-skip-permissions per-repo once you've watched it work and your git hygiene is good.
The tricks that surprise people
Everything here is optional — and each one is a "wait, it can do that?" moment.
Real images via Codex
Claude Code can't generate photographic images itself — left alone it builds code-based visuals (SVG, CSS, canvas). But it can shell out to OpenAI's Codex CLI and use it as an image tool:
- Have a ChatGPT account, install the Codex CLI, and log in once (
codex login). - Then just ask Claude Code: "use codex exec to generate a hero image of X and save it in assets/".
# what Claude runs under the hood — locally-authenticated, no API key juggling
codex exec "generate an image of a lighthouse at dusk, save as assets/hero.png"Codex uses gpt-image-2, which follows instructions well and produces real images — and they drop straight into your project folder where Claude can immediately wire them into the page.
Headless mode — Claude in scripts and CI
claude -p "fix all the eslint errors and print a summary"
One-shot, non-interactive, scriptable. Pipe things in, use it in cron jobs or CI steps.
Parallel Claudes with git worktrees
git worktree add ../myapp-feature-x feature-x cd ../myapp-feature-x && claude
Each worktree is an isolated checkout — run a session in each and work two features at once without them stepping on each other.
Custom slash commands
# .claude/commands/fix-issue.md → usable as /fix-issue 123 by the whole team
Find GitHub issue $ARGUMENTS, understand it, implement a fix,
run the tests, and prepare a PR description.Subagents — keep your context clean
Ask Claude to "use a subagent to explore how auth works across the codebase." The grep noise stays in the subagent; only the conclusion comes back to your session. It often does this on its own — /agents lets you define custom ones.
Hooks — automation around every tool call
Defined in settings.json: run your own command before/after Claude's tool calls. Classic example — auto-run prettier after every file edit so formatting is never a review comment again.
MCP — plug in external tools
claude mcp add my-db -- npx @bytebase/dbhub --dsn "postgres://..."
MCP servers give Claude new tools: query databases, drive browsers, read Figma, hit internal APIs. /mcp to manage them.
One API for your whole backend
Mosaic gives every project a full backend through a single REST API — and with the skill installed, Claude Code knows the whole platform. "Create a project, add a users table, deploy this page" just works. This site is hosted on it.
What every project gets
Every site lives at https://{slug}.mosaic.site the moment it deploys. Trial: 3 projects, 7 days. Pro: $10/mo, unlimited projects.
Sign up (2 minutes)
- Create an account at mosaic.site.
- Go to Dashboard → Settings and copy your API key — it starts with
mk_.
Install the skill
mkdir -p ~/.claude/skills/mosaic curl -fsSL https://api.mosaic.site/skill.md -o ~/.claude/skills/mosaic/SKILL.md
- Open
~/.claude/skills/mosaic/SKILL.mdand add your API key near the top, e.g.My API key: mk_xxxxx— Claude sends it as theX-API-Keyheader. - Restart Claude Code.
- Test it: "using the mosaic skill, list my projects."
"Create a Mosaic project called hello-yourname and deploy a page that says hi." You'll have a live URL in under a minute — that's the whole platform loop, end to end.