// REF. 20 / AGENTIC CODING
Claude Code cheat sheet
Claude Code is an agent that lives in your terminal. It reads the repo, edits files and runs commands, and it asks before it does anything you have not allowed. This sheet is current to Claude Code 2.1.312 and was checked line by line against the official docs on 2026-10-29.
Most of the leverage is in two places: slash commands, which steer a session, and extensions, which teach it your stack. Wire in MCP servers and plugins, write a subagent or a skill for the jobs you repeat, start in plan mode, and clear between tasks. Read the dragons section before you hand it the keys.
↓ Download the printable PDF free · letter size · no email needed
Launch
claude- interactive session in this folder
claude "query"- start with a first prompt
claude -c- continue the latest conversation here
claude -r "<name>"- resume a session by id or name
claude --model opus- pick a model by alias or full name
claude update- update to the latest version
Slash commands
/help- show help and available commands
/clear- new conversation, empty context
/compact- summarize history to free context
/model- switch model, saved as your default
/config- settings menu, or /config key=value
/init- draft the project memory file
/memory- edit memory files and auto memory
/review- review the current diff or a pr
More commands
/resume [session]- return to an earlier conversation
/rewind- roll back code and/or chat to checkpoint
/context- show what fills the context window
/usage- session cost, plan limits, activity
/permissions- manage allow, ask, and deny rules
/btw <question>- side question, not added to history
/doctor- setup checkup, fixes after you confirm
/security-review- scan branch diff for vulnerabilities
Memory
./CLAUDE.md- project file, shared in git; levels stack
~/.claude/CLAUDE.md- yours, loaded in every project
CLAUDE.local.md- yours, this project; add to gitignore
@path/to/file- import another file into memory
managed CLAUDE.md- org-wide, set by admins; loads first
Perms & modes
default- reads run free; asks before the rest
acceptEdits- edits and mkdir/mv/cp run unasked
plan- explore and propose; edits need approval
permissions.allow/deny- tool rules, e.g. bash(npm run test *)
bypassPermissions- no prompts or checks; isolated boxes only
Settings & hooks
~/.claude/settings.json- user settings, all projects here
.claude/settings.json- shared with the team; commit it
settings.local.json- in .claude/; your overrides, not in git
PreToolUse- before a tool call; exit 2 blocks it
PostToolUse- after a tool call succeeds
Stop- when claude finishes responding
Notification- when claude sends a notification
MCP & plugins
claude mcp add- add a server; --transport http or stdio
.mcp.json- project mcp servers, shared via git
/mcp- oauth login, reconnect, enable, disable
mcp__server__tool- allow/deny rule; mcp__server__* for all
@server:protocol://path- attach an mcp resource to a prompt
/plugin marketplace add- add a plugin catalog from repo or url
/plugin install x@mkt- install a plugin from a marketplace
Agents & skills
.claude/agents/*.md- subagent; needs name and description
@agent-<name>- invoke a subagent by name
SKILL.md- in .claude/skills/<name>/; runs as /<name>
description- skill auto-loads when this matches
~/.claude/skills/<name>/- personal skill, all your projects
$ARGUMENTS- args for .claude/commands/*.md
/output-style <name>- switch claude's tone and format
Here be dragons
giant context- fills up; /clear between tasks
no CLAUDE.md- each session starts blank; write it down
sudo claude- bypass mode refuses root. good
"absolutely right"- it agreed. it did not re-read the file
// KEEP IT UNDER YOUR KEYBOARD
Claude Code Field Manual Desk Mat
from $34 · printed to order in the USA