What it is used for

The first work Claude Code handles is the tedious work that keeps being put off: writing tests for untested code, fixing lint errors across a project, resolving merge conflicts, updating dependencies, and writing release notes. Tests are small programs that check whether the main program behaves as it should, and a merge conflict is the state where two changes to the same file cannot be combined automatically.

The second kind of work is building features and fixing bugs. You describe what you want in plain language, and Claude Code plans the approach, writes the code across multiple files, and verifies it works. For a bug, you paste an error message or describe the symptom, and Claude Code traces the issue through your codebase, identifies the root cause, and implements a fix.

The third kind of work involves Git, the system that records the history of code changes. Claude Code works directly with it: it stages changes, writes commit messages, creates branches, and opens pull requests, the proposals to merge changes that are reviewed before being combined. In team workflows, GitHub Actions or GitLab CI/CD can run Claude Code to automate code review and issue triage.

The fourth kind is connecting outside tools through MCP, short for Model Context Protocol, an open standard for connecting AI tools to external data sources. With MCP, Claude Code can read your design docs in Google Drive, update tickets in Jira, pull data from Slack, or use your own custom tooling.

How to use it

The starting requirements are three: a terminal or command prompt open, a code project to work with, and access in the form of a Claude subscription (Pro, Max, Ultra, Team, or Enterprise), a Claude Console account, or access through a supported cloud provider. Installation uses the recommended native installer, or a package manager such as Homebrew, WinGet, or apt, dnf, or apk on Linux systems. Once installed, running `claude --version` confirms the installation works when it prints a version number. Native installations automatically update in the background. On native Windows, Git for Windows is recommended so Claude Code can use the Bash tool; without it, Claude Code uses PowerShell as its shell tool instead.

You start Claude Code from inside a project directory, and on first use it prompts you to log in through your browser. Once you are in, its prompt shows the version, the current model, and the working directory. Inside a session, `/help` shows the available commands, `/resume` continues a previous conversation, and `/login` switches accounts. If you have set the ANTHROPIC_API_KEY environment variable and approve it when asked, the login prompt is skipped.

Once it is running, you give tasks in plain language and Claude Code reads your project files as needed, without you having to add context manually. For actions that edit files or run commands, it asks for your approval first, and how often it asks is set by the session's permission mode, which you can switch at any time by pressing Shift+Tab.

The official documentation gives three main pieces of advice. First, be specific with your requests. Second, break complex tasks into step-by-step instructions. Third, let Claude explore and understand the code first before changing anything. Its daily shortcuts: type `/` to see the commands and skills available to you, use Tab for command completion, and press the up arrow for command history.

Real examples

The following examples are not invented for this article. Both are recipes documented on Anthropic's official common workflows page and quickstart guide.

The first example is the documented bug fixing recipe. The common workflows page lays it out in three steps: share the error message with Claude, ask for fix recommendations, then apply the fix. The quickstart shows the quality of request that makes the recipe work, in an exact pair: instead of writing "fix the bug", write "fix the login bug where users see a blank screen after entering wrong credentials". The first request does not say which bug, on which screen, and after what action; the second names all three, and Claude's tracing rests on those details.

The second example is creating a pull request just by asking. The same page states that you can create pull requests by asking Claude directly, in these exact words "create a pr for my changes", or guide it step by step: summarize your changes, generate the pull request, then review and refine. After the pull request exists, the command `claude --from-pr 1234`, with the number replaced by your own pull request number, opens the session picker filtered to sessions linked to that pull request, so work on that proposal can continue from where it stopped.

Practitioner level

The setting that shapes daily work most is the permission mode, the baseline approval behaviour of the session. The official documentation lists six modes: `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, and `bypassPermissions`. The `default` mode is labelled Manual: Claude Code stops and asks before most actions that edit files, run shell commands, or reach the network. The `plan` mode is plan mode: Claude researches and proposes changes without editing your source files, and you approve the plan before anything is touched; you enter it with `/plan` or Shift+Tab. In `auto` mode, a second model called the classifier reviews actions instead of you, so most actions run without asking; since Claude Code version 2.1.283, `auto` mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On top of the modes, finer permission rules can allow or deny specific tools by name and argument pattern, and deny rules block in every mode, including `bypassPermissions`.

The second lever is the project instruction file named CLAUDE.md, a plain text file you write that Claude Code reads at the start of every session. In it you write what you should not have to explain repeatedly: build and test commands, coding standards, architecture decisions, preferred libraries, and review checklists. The file can live at project scope in `./CLAUDE.md` or `./.claude/CLAUDE.md`, at user scope in `~/.claude/CLAUDE.md`, or as managed policy for an entire organization; all discovered files are concatenated into context from the broadest scope to the most specific. A repository that already has an AGENTS.md file for other coding agents can be read by Claude Code in place of a CLAUDE.md. The official memory page stresses how to write it, with exact examples: write "Use 2-space indentation" instead of "Format code properly", and write "Run `npm test` before committing" instead of "Test your changes". The size target is under 200 lines per file, because longer files consume more context and reduce adherence.

The third lever is auto memory. Besides the instructions you write, Claude writes notes of its own based on your corrections and preferences, stored per git repository under `~/.claude/projects/`. At the start of a session, the first 200 lines or 25 KB of the MEMORY.md index inside it loads while auto memory is on. The pairing is firm: CLAUDE.md is the notes you write, auto memory is the notes Claude writes.

For team work, two more levers are available. A skill is a SKILL.md file containing instructions, knowledge, or a workflow that Claude loads when relevant, or that you invoke directly with `/skill-name`; the overview page gives team-shared skills such as `/review-pr` and `/deploy-staging` as examples. A hook is a handler you define that runs automatically at specific points in Claude Code's lifecycle, such as auto-formatting after every file edit or running lint before a commit is made.

Expert level

The heart of the tool is the agentic loop. The official glossary defines it as the cycle Claude works through for every task: gather context, take action, verify results, and repeat until done. Each tool use returns information that informs the next step, and you can interrupt the loop at any point to redirect. A tool is an action Claude can take: read a file, edit code, run a shell command, search the web, or spawn a subagent. Without tools, Claude can only respond with text.

A subagent is a specialized assistant that runs in its own context window with a custom system prompt, specific tool access, and independent permissions; it works on a delegated task and returns a summary to the main conversation. The documented built-in subagents include Explore, Plan, and general-purpose. For larger work, several Claude Code sessions can run in parallel, including on separate project copies called worktrees so parallel edits do not collide, and cloud sessions keep running on cloud infrastructure after you close your laptop.

The guardrails for long work come in layers. A checkpoint is created at each prompt you send: Claude Code snapshots the files Claude edits, and pressing Esc twice or running `/rewind` restores code, conversation, or both to an earlier point. When the context window approaches its limit, compaction summarizes the conversation automatically; a project-root CLAUDE.md and auto memory survive compaction, while instructions given only in conversation may not. A session is a conversation tied to your directory, stored as a transcript under `~/.claude/projects/`, resumable with `claude -c` or forked with `--fork-session`. For non-interactive use, non-interactive mode, invoked with `-p` or `--print` and formerly called headless mode, runs a single prompt and exits, and this is the form used in pipes, scripts, and CI work. The Bash tool can also run inside a sandbox, OS-level filesystem and network isolation whose boundary you define upfront, and that layer is separate from permission rules.

Settings are read in a hierarchy from strongest to weakest: managed policy for the organization, settings passed with the `--settings` flag, local settings at `.claude/settings.local.json`, project settings at `.claude/settings.json`, and user settings at `~/.claude/settings.json`. Lists such as permission lists generally merge across files instead of overriding each other.

Limits and risks

The first limit must be stated plainly: almost every fact in this article rests on the maker's own official documentation, because for a living tool that changes quickly, the official product documentation is the available anchor for facts. The maker's marketing wording is not used as fact in this article, and every capability written here stands as a capability as documented by its maker.

The second risk follows from the tool's power. Claude Code can run commands and edit files on your machine, so permissions set too loosely mean a misdirected action could change or delete something important before anyone reviews it. A mode that skips all questions removes that safety net, and the documentation itself still holds some things back from automatic approval in every mode, including recognized critical-path file removals. Its characteristic threat is called prompt injection: hostile instructions embedded in a file, a web page, or a tool result that try to redirect Claude toward actions you did not ask for; the documented defences include the permission system, command injection detection, and folder trust verification before a repository's content runs.

The third limit is a matter of habit. CLAUDE.md files and auto memory are treated as context, not enforced configuration, so vague or contradictory instructions may be followed inconsistently; to block an action regardless of what Claude decides, the documentation directs you to a PreToolUse hook. That is why the same documentation recommends a verification loop: give Claude a check it can run, such as a test suite or a build, and it will iterate until the check passes instead of stopping after one attempt whose result merely looks plausible. Cost is also a real limit: the work runs on a Claude subscription or on prepaid API credits in a Console account, and an open ended task with no limits can run for a long time.