Skip to main content

Claude Code — Beginner Tips & Tricks

Claude Code is an agentic coding tool that reads your repository, runs commands, edits files, and ships changes from your terminal, IDE, or browser. This sheet covers the twelve things that take you from first launch to fluent: managing sessions, the closed-loop workflow, referencing files, steering mid-task, permission modes, agents, memory, and keeping context healthy.

By Joaquin FuentesUpdated June 2026

Key: a leading slash (e.g. /clear) is a command you type in the prompt.

Manage sessions

claude
Launch Claude Code in the current project directory.
claude -c· --continue
Resume your most recent session right where you left off.
claude -r· --resume
Pick a past session from a list to resume.
/rename
Name the current session so it's easy to find in --resume.
/clear
Start fresh — wipe the conversation and free up context.

Clear between unrelated tasks so old context doesn't bleed into new work.

Closed-loop operations

Work in tight loops: ask Claude to plan → build → verify → fix, and let it run the tests itself.
/goal
Set a completion condition; Claude keeps working until the goal is met.
Give it a way to check its own work — a test command, a build, a script — so it self-corrects.

The more concrete the success check, the less you have to babysit.

Working with files

@
Type @ then start a filename to reference it — Tab completes the path.
Paste or drag an image straight into the prompt to share a screenshot or mockup.
Reference exact paths (src/app/page.tsx:42) instead of vague descriptions.

Pointing at the right file up front beats making Claude search for it.

Plugins & tools

/plugin
Browse and install plugins from a marketplace to add commands and agents.
/mcp
Connect MCP servers (GitHub, Playwright, a database) so Claude can use real tools.
MCP tools let Claude act on the outside world — read issues, drive a browser, query data.

Start with the filesystem and GitHub MCP servers; add more as you need them.

Steer mid-flight

Esc
Interrupt Claude immediately to redirect — you don't have to wait for it to finish.
Queue a follow-up while Claude works; it picks it up when the current step ends.
/rewind
Roll the conversation (and edits) back to an earlier checkpoint.

A quick Esc + correction is faster than letting a wrong approach run to completion.

Guide Claude

#
Start a line with # to save a fact to memory without breaking your flow.
Spell out constraints ("use the existing tokens, no new deps") — Claude follows instructions it's given.
Ask for a plan first on anything non-trivial, then approve before it writes code.

Specific guidance in, predictable work out. Vague asks get vague results.

Permission modes

Shift+Tab
Cycle permission modes: default → accept-edits → plan (plus any you've enabled).
Plan mode researches and proposes without changing files — safe for exploring.
/permissions
Review and edit exactly which tools and commands are allowed.

Limit scope by working in plan mode first, then approve the plan to execute.

Agents

/agents
View and manage subagents — specialized helpers with their own context.
Ask Claude to "spin up subagents" to fan out independent work in parallel.
Each agent type has its own tools and system prompt; some are read-only explorers.

Parallel agents shine for broad searches and independent review passes.

Memory

Project memory lives in CLAUDE.md at the repo root — shared with your whole team.
User memory lives in ~/.claude/CLAUDE.md — your personal preferences, every project.
#
The # shortcut appends a fact to the chosen memory file.

Keep memory tight — a few high-signal rules beat a wall of text.

Ask the codebase

Ask plain questions: "Where is auth handled?", "What calls this function?"
Be precise — name the feature, file, or symbol you mean, not "the thing in the toolbar."
Claude reads the actual code, so answers reflect your repo, not generic docs.

A precise question gets a precise answer; a vague one gets a guess.

Context health

/context
See how much of the context window is in use right now.
/compact
Summarize the conversation to reclaim space without losing the thread.
/clear
Fully reset when you're switching to unrelated work.

Compact before a big new task; clear when the old one is truly done.

Watch the cost

/cost
Check token usage and spend for the current session.
/model
Switch models — a smaller model is cheaper for routine edits.
/effort
Tune how much reasoning effort Claude spends on a task.

Match the model and effort to the job; don't pay frontier rates for a typo fix.

Updated June 2026 · Claude Code · verified against code.claude.com/docs