Starting and resuming
| Type this | What it does |
|---|---|
claude | Start a session in the current folder. |
claude "explain this repo" | Start a session with a first prompt already typed. |
claude -c | Continue your most recent conversation in this folder. |
claude -r | Pick an earlier conversation to resume. |
claude -p "summarize data/README.md" | Ask one question, print the answer, exit. Handy in scripts. |
claude --version | Show the installed version. |
claude doctor | Diagnose install and settings problems. |
claude update | Update now instead of waiting for the automatic update. |
Slash commands inside a session
Type / at the prompt to see every command, including ones added by plugins.
| Type this | What it does |
|---|---|
/help | List commands and get help. |
/init | Read the project and write a CLAUDE.md of notes Claude rereads every session. |
/clear | Start a fresh conversation. Use it when you switch tasks. |
/compact | Summarize the conversation so far to free up room for more work. |
/context | See how full the conversation's memory is. |
/model | Switch model, for example to Opus for hard problems. |
/memory | Open and edit the CLAUDE.md memory files. |
/permissions | Choose which tools and commands Claude may use without asking. |
/mcp | See and manage connected MCP servers (connectors). |
/plugin | Browse, install, and manage plugins. |
/agents | Create and manage specialist subagents. |
/resume | Switch to an earlier conversation. |
/rewind | Roll the conversation and your files back to an earlier point. |
/login | Sign in, or switch accounts. |
Keyboard shortcuts
| Type this | What it does |
|---|---|
Enter | Send your message. While Claude is working, it queues the message for next. |
Shift+Enter | New line without sending (most terminals). Or end a line with \ then Enter. |
Esc | Stop Claude mid-task. Your conversation is kept. |
Esc Esc | Clear what you typed, or rewind to an earlier message. |
Shift+Tab | Cycle permission modes: normal, auto-accept edits, and plan (research only, no changes). |
@ | Mention a file or folder: @data/trees-oak-park.csv what columns are here? |
! | At the start of a line: run a shell command yourself and show Claude the output. ! ls data |
Up / Down | Scroll through what you typed before. |
Ctrl+R | Search your earlier prompts. |
Ctrl+O | Show the full transcript, including tool output. |
Ctrl+T | Show or hide Claude's task checklist. |
Ctrl+C | Interrupt or clear input. Twice to exit. |
Ctrl+D | Exit Claude Code. |
Permission modes, explained
Claude asks before it edits files or runs commands. Shift+Tab changes how often it asks.
| Mode | What Claude does | Use it when |
|---|---|---|
| Normal | Asks before each edit and command. | You are learning, or the change matters. |
| Accept edits | Edits files without asking; still asks before commands. | You trust the plan and want speed. |
| Plan | Reads and researches only, then presents a plan. Changes nothing. | The start of every new feature. Read the plan, then say go. |
CLAUDE.md: the project's memory
A plain text file at the top of your project. Claude reads it at the start of every session. /init writes a first draft; edit it as you learn what matters.
# Project: Urban forest diversity map (starter project 11)
## What we are building
A one-page map of Oak Park's public trees, coloured by genus,
flagging blocks that break the 10-20-30 diversity rule.
## Data
- data/trees-oak-park.csv (public, Village of Oak Park)
- Always cite the source file and date under the chart.
## How we work
- Python 3.11. pandas for cleaning, folium for the map.
- Plan first; keep each change small.
- Run `python -m pytest` before every commit.
- Never commit keys, tokens, or .env files.Prompts that work
| Pattern | Example |
|---|---|
| Give context and a goal | I'm on starter project 4. Goal: a map of school routes with crash points. Audience: parents. |
| Ask for a plan first | Before writing code, propose a plan with 3–5 steps and what you'd skip if short on time. |
| Make it small | Just step 1. Stop when there's something I can open and look at. |
| Point at files | Use @data/crashes-bike-ped-oak-park.csv. What are the columns and which are messy? |
| Ask it to check itself | Write a test that proves the totals match the raw CSV, then run it. |
| Ask why | Explain that change like I'm new to Python. |
| Recover | That broke the map. Undo your last change and try a simpler approach. |
| Wrap up | Write README.md with exactly these headings: The question, The data, How we got the numbers, How to use it, Status and next steps. Only describe what is really in these files. (why) |