cenas

Claude Code Quick Reference

2026/03/09

Since there are already plenty of tutorials on Claude Code, I decided to create a quick reference guide with all the info I’ve used so far.

Starting a Session

CommandDescription
claudeStart a new interactive session
claude -cResume the previous session
claude --resumePick a past session to resume from a list
claude "your task"One-shot query, no interactive session
claude -p "query"Print mode (non-interactive, good for piping)
claude updateUpdate Claude Code to latest version

Permission Modes (at startup)

CommandDescription
claude --permission-mode plan "task"Read-only — Claude plans but touches nothing
claude --permission-mode acceptEdits "task"Auto-accepts file edits, still asks for bash commands
claude --dangerously-skip-permissions "task"Full auto — no confirmations at all (YOLO mode)

Models

CommandDescription
claude --model claude-sonnet-4-6Use Sonnet (default, fast, cheaper)
claude --model claude-opus-4-6Use Opus (slower, more powerful, 5x cost)
/modelList available models inside a session

Plugins & MCP

CommandDescription
claude plugin install code-simplifierInstall official plugin
claude mcp add mariadb -- <command>Add a MCP server
/mcp listList active MCP servers inside a session
claude mcp add my_server \
    -e MYSQL_HOST="192.168.1.3" \
    -e MYSQL_PORT="3306" \
    -e MYSQL_USER="root" \
    -e MYSQL_PASS='root' \
    -e MYSQL_DB="my_database" \
    -- npx @benborla29/mcp-server-mysql

claude mcp add mongodb / 
    -e MDB_MCP_CONNECTION_STRING='mongodb://admin:admin@192.168.1.3:27018/my_database' / 
    -- npx -y mongodb-mcp-server

Inside a Session (slash commands)

CommandDescription
/contextShow the current usage of Context Window
/helpList all available slash commands
/memoryView and edit Claude’s memory files
/configOpen settings menu
/compactCompress conversation history to save tokens
/clearClear the screen
/initBootstrap a CLAUDE.md from your codebase
/export full_history.mdExport full conversation to a Markdown file
/plugin install <name>Install a plugin from inside a session

Inside a Session (keyboard shortcuts)

ShortcutDescription
Shift+TabCycle permission modes: default → acceptEdits → plan
Ctrl+GOpen Claude’s plan in your editor to review/edit
Option+EnterNew line without sending (multi-line input)
Ctrl+CStop current generation
Ctrl+DExit Claude Code

File Input / Output

SyntaxDescription
@specs/file.mdLoad a file as input context
"write output to plan.md"Ask Claude to write output to a file

My Workflow Per Feature

# 1. Plan
claude --permission-mode plan "@specs/02-feature.md write a plan.md"

# 2. Review plan.md in editor (Ctrl+G or open manually)

# 3. Implement
claude --dangerously-skip-permissions -c "implement plan.md exactly as written"

git add . && git commit -m "feat: feature name"