Claude Code, topic by topic
Claude Code is Anthropic's AI coding agent. You describe a task in plain words, and it reads your code, edits files and runs commands such as your tests until the task is done, asking before anything you have not allowed. It runs in the terminal, in VS Code and JetBrains, in a desktop app and on the web.
Start with the 3 steps below. Each topic after that is one page: a direct answer first, then our own worked examples. The commands, shortcuts, CLI flags, settings and hook events each have a search over every entry.
Start in 3 steps
- 1
Install it
On macOS, Linux or WSL, run this in a terminal. On Windows PowerShell, use irm https://claude.ai/install.ps1 | iex.
curl -fsSL https://claude.ai/install.sh | bash - 2
Start it in your project
Open your project's folder and start a session. The first time, it asks you to sign in with a Claude plan or a Claude Console account.
cd your-project && claude - 3
Give it a first task
Ask about the code before you ask for changes. Then set it up for your project with /init, which writes a first CLAUDE.md.
/init
Work it out
Every Claude Code topic
Start
Install it, run a first session, and see what happens inside one.
- Install and sign inHow to install Claude Code on macOS, Windows or Linux, sign in with a Claude plan or an API key, check it works, and keep it up to date.
- Your first sessionA first session with Claude Code on a real project, in order - ask about the code, point at files, make one change, review it, run the tests, commit, and undo when it goes wrong.
- How it worksWhat happens inside Claude Code when you give it a task - the loop of gathering context, acting and checking, the tools it uses, what it can reach, and how its context window fills and compacts.
Daily use
The habits, commands and keys you use every day.
- Best practicesThe habits that make Claude Code reliable - give it a check it can run, plan before big changes, be specific, clear between tasks, keep CLAUDE.md short, use subagents for research, and review with a fresh session.
- Slash commandsEvery Claude Code slash command in plain words, with an example of each - /clear, /compact, /context, /model, /plan, /rewind, /resume, /code-review, /init, /mcp and the rest - and the 12 to learn first.
- Keyboard shortcutsEvery Claude Code keyboard shortcut - Esc to stop, Esc twice to rewind, Shift+Tab for permission modes, Shift+Enter for a new line, Ctrl+V to paste an image, ! for shell mode, @ for files - and how to change them.
- CLI flagsEvery Claude Code command-line flag and subcommand in plain words - -p, -c, -r, --model, --permission-mode, --allowedTools, --output-format, --worktree, --append-system-prompt - with an example of each.
- Sessions and contextHow Claude Code keeps your conversations - claude -c and -r to resume, /rename to name a session, /rewind and Esc Esc to undo, /branch to try another way, and claude -w to run several sessions at once in Git worktrees.
Control
What it knows about your project, what it may do, and which model does it.
- CLAUDE.md and memoryWhat CLAUDE.md is, where to put it, what to write in it and what to leave out, with an example - plus CLAUDE.local.md, .claude/rules/ for rules that apply to some files, AGENTS.md, @imports, and the auto memory Claude writes itself.
- PermissionsHow Claude Code decides what it may do without asking - the 6 permission modes (Manual, Accept edits, Plan, Auto, dontAsk, bypass), allow, ask and deny rules with Bash and file patterns, where rules are saved, and what rules cannot stop.
- SettingsWhere Claude Code's settings files are (~/.claude/settings.json, .claude/settings.json, .claude/settings.local.json), which one wins when they disagree, how to change a setting with /config, and a searchable list of the settings worth knowing.
- ModelsWhich model to use in Claude Code and how to switch - the opus, sonnet, haiku and fable aliases, /model and --model, effort levels from low to max, ultrathink, opusplan, the 1 million token context window, and fast mode.
Extend
Give it new tools, packaged know-how, helpers and your own scripts.
- MCP serversHow to connect MCP servers to Claude Code with claude mcp add - remote HTTP servers, local stdio servers, the 3 scopes and .mcp.json, signing in with /mcp, environment variables, @ resources, MCP prompts as commands, and the risks to check first.
- SkillsHow to make your own Claude Code skill - a folder with a SKILL.md file that becomes a /command and that Claude can also use on its own - with the frontmatter fields, arguments, live command output, supporting files, and when to use a skill instead of CLAUDE.md.
- SubagentsWhat subagents are in Claude Code, the built-in Explore, Plan and general-purpose agents, how to write your own in .claude/agents/ with tools, model and permissions, how to call one with @, background subagents, forks with /subtask, and when not to use one.
- HooksHow Claude Code hooks work - the events such as PreToolUse, PostToolUse and Stop, matchers, exit code 2 to block an action, the JSON a hook receives, examples for formatting, protecting files and notifications, and what to check before you trust a repository's hooks.
- PluginsWhat a Claude Code plugin is, how to install one with /plugin, marketplaces and install scopes, keeping plugins updated, what a plugin costs in context, how to check one before you trust it, and how to package your own skills, subagents, hooks and MCP servers as a plugin.
Automate
Run it from scripts and CI with no one at the keyboard.
Cost
What it costs and how to spend less.
Questions
- What is Claude Code?
- Anthropic's AI coding agent. It works in your project folder - you describe a task, and it reads the code, edits files and runs commands to finish it, asking permission for anything you have not allowed. It runs in the terminal, IDEs, a desktop app and the browser.
- Is Claude Code free?
- No. It needs a paid Claude plan (Pro, Max, Team or Enterprise), where use counts against the plan's limits, a Claude Console account paid per token, or a cloud account such as Amazon Bedrock. The Costs page explains how to keep use down.
- Do I need to know the terminal to use Claude Code?
- It helps, but it is not required. Claude Code also runs in VS Code, JetBrains IDEs, a desktop app and on the web. In the terminal, you only need to open your project folder and type claude.
- Which model does Claude Code use?
- Claude models, chosen with /model. Sonnet suits most everyday coding, Opus harder problems, Haiku quick simple jobs and Fable the longest tasks. The Models page covers effort levels and fast mode too.
- What should I set up first?
- Run /init to create a CLAUDE.md with your project's build and test commands, then allow the commands you run often in your permission rules so Claude stops asking. Add MCP servers, skills and hooks as you find a need.
Sources
Where each fact comes from
Written by Tecyfy from Anthropic's own documentation, with our own examples. Claude Code documentation