How to use Claude Code: your first session, permission modes, and undoing changes
A beginner's guide to Claude Code after you install it: your first session, permission modes, CLAUDE.md, undoing changes with /rewind, and the commands you'll use.


The short answer
Open a terminal in your project folder and run claude. The first time, sign in with a Claude Pro, Max, Ultra, Team or Enterprise plan, or an Anthropic Console account. Then talk to it the way you'd talk to a colleague: ask what the project does, then ask for one specific change. Claude Code reads the files it needs on its own.
- Ask before you change anything
Start with "what does this project do?" or "explain the folder structure". Letting Claude explore first gives better changes later.
- Ask for one specific change
"Fix the login bug where users see a blank screen after a wrong password" works better than "fix the bug". Claude shows the change and, in the default mode, asks before applying it.
- Review, then commit
Run
/diffto see what changed, or just ask "what files have I changed?". Then ask Claude to commit with a descriptive message.
Article · How to install Claude Code on macOS, Windows and Linux → Not installed yet? How to install Claude Code on Mac, Windows and Linux.
Permission modes: how much Claude does without asking
Press Shift+Tab to switch the mode of the session you're in.
| Mode | Runs without asking | Good for |
|---|---|---|
| Default (manual) | Reading files in your project | Unfamiliar code, sensitive work |
| acceptEdits | Reads, file edits and common file commands such as mkdir and mv | Iterating on code you're reviewing |
| plan | Reading, to propose a plan before any edit | Exploring before you change things |
| auto | Everything, with safety checks in the background | Long tasks, fewer prompts |
| bypassPermissions | Everything, with no checks | Isolated containers and virtual machines only |
Article · Claude Code and Codex permission modes: auto, plan, --dangerously-skip-permissions and --yolo → Auto, plan and --dangerously-skip-permissions in detail, next to Codex's --yolo.
Tell Claude how your project works: CLAUDE.md
Run /init and Claude reads your codebase and writes a starting CLAUDE.md: build commands, how to run the tests, the conventions it found. Edit it and commit it, and every session starts from it. Preferences only you need go in CLAUDE.local.md, which you keep out of Git.
Article · AGENTS.md and CLAUDE.md: what they are, and one file for Claude Code and Codex → Also using Codex? AGENTS.md and CLAUDE.md, and how to keep one file for both.
Undo a change with /rewind
Claude Code saves a checkpoint before each message you send. Run /rewind (or /undo), or press Esc twice in an empty prompt, to go back: rewind the code, the conversation, or both.
Make Claude Code reply in Chinese
{
"language": "chinese"
}Claude Code passes the language value to Claude as an instruction to always reply in that language, so any language name works, such as "chinese" or "japanese"; it isn't checked, so a typo goes through as written. The same value sets the language of voice dictation and of automatic session titles. It changes the language Claude replies in, not Claude Code's own interface. You can also write a line such as “Always reply in Simplified Chinese.” in your CLAUDE.md.
The commands you'll use most
| Command | What it does |
|---|---|
/model | Switch the model and save it as your default |
/plan | Enter plan mode, optionally with a task |
/diff | Review the changes in your working tree |
/review | Run a code review |
/compact | Summarize the conversation to free up context |
/context | See how much of the context is in use |
/usage | Session cost and your plan's usage limits |
/clear | Start a new conversation; /resume brings the old one back |
claude -c | From the terminal: continue the last conversation in this folder |
claude -p "…" | From the terminal: ask once and exit, for scripts |
Type / to see every command and skill available to you; Tab completes, and ↑ brings back earlier prompts.
Article · How to install skills in Codex and Claude Code, and share one set between agents → Add skills to Claude Code, and share them with Codex.
Article · How to add MCP servers to Claude Code and Codex → Connect Claude Code to your tools: how to add MCP servers.
Article · Claude Code settings.json: where it is, which file wins, and the settings worth changing → Set the default model, permissions and more in settings.json.
Article · Claude Code and Codex in VS Code: install the extensions and get started → Prefer your editor? Claude Code and Codex in VS Code.
Article · Claude Code desktop: what the app does, and another way to run it on your desktop → Prefer an app window? Claude Code in the Claude desktop app.
Article · Code review with Claude Code and Codex: /review, GitHub reviews and a second opinion → Reviewing code with /code-review, and getting a second opinion from Codex.
Claude Code next to other agents in Mirasim
Mirasim is a desktop app for macOS, Windows and Linux that runs Claude Code itself. If you already installed Claude Code, Mirasim uses that copy and your existing sign-in. Claude Code can sit in a pane next to Codex or another agent, and you can follow the same sessions from your phone. Mirasim is not an Anthropic product.
Questions
- Do I need to add files to the context myself?
- No. Claude Code reads your project files as it needs them.
- How do I continue yesterday's conversation?
- Run
claude -cin the same folder to continue the latest one, orclaude -rand pick one. Inside a session,/resumeopens the same list. - Can I use Claude Code without a Claude subscription?
- Yes: with an Anthropic Console account and prepaid API credits, or through Amazon Bedrock, Google Cloud or Microsoft Foundry.
Article · Claude Code usage limits: what the messages mean, and how to keep working → Claude Code usage limits, and what to do when you hit one.
Article · How to use Codex: your first task, permissions, and the commands you'll use → The same guide for Codex.
Sources
Checked on November 25, 2026 against Anthropic's documentation at code.claude.com/docs/en: quickstart, permission modes, memory, checkpointing and the commands reference. Claude Code changes quickly, so check those pages for the latest.
Keep reading

Code review with Claude Code and Codex: /review, GitHub reviews and a second opinion
Code review with Claude Code and Codex: /review for local changes, automatic GitHub PR reviews, where review rules go, and a second opinion from the other agent.

Hooks in Claude Code and Codex: run your own commands when the agent acts
What hooks are in Claude Code and Codex, where they go, when they fire, and examples: a notification, formatting after edits, blocking edits to protected files.

Claude Code and Codex permission modes: auto, plan, --dangerously-skip-permissions and --yolo
What each Claude Code and Codex permission mode allows without asking, what --dangerously-skip-permissions and --yolo turn off, and safer ways to get fewer prompts.