# Claude Code

Canonical: https://cqbase.net/en/entry/claude-code
Chinese: https://cqbase.net/zh/entry/claude-code
English: https://cqbase.net/en/entry/claude-code

> Anthropic’s terminal coding agent: it reads the repo, edits files, and runs commands.

Claude Code is Anthropic’s terminal coding tool. The repository is anthropics/claude-code and the docs are at code.claude.com. It is not a chat box that only answers: it works in a project directory, reading code, editing, and running routine commands. No SPDX license was detected on the repository.

For a first session, use a branch you can throw away and see whether it states a plan before editing. Keep the allowed commands narrow, especially anything that pushes or touches production config.

## What problem it solves

Claude Code is Anthropic’s coding agent. It runs in your terminal — and also as a desktop app, as VS Code and JetBrains extensions, and on the web. In a project folder it can read the repo, edit files, and run commands, so you can ask it to explain the layout, make a small change, or help with Git, instead of only getting advice in a chat box.

This page stays with getting started: install, sign-in and billing, CLAUDE.md, skills and plugins, and MCP. It is not a feature catalog; official docs cover the rest.

## Who it is for

It is for people who already work from a terminal in a project directory and want an agent that can act in that repo. You need a Claude Pro, Max, Ultra, Team, or Enterprise plan, a Claude Console account with prepaid credits, or access through your organization’s Amazon Bedrock, Google Cloud Agent Platform, or Microsoft Foundry setup. The official pricing page states that the Free plan does not include Claude Code.

Anthropic’s [Supported Regions Policy](https://www.anthropic.com/legal/supported-regions), effective 12 November 2026, says Claude Code and related products are available only in the listed countries and regions. Taiwan is on the list. Mainland China, Hong Kong, and Macau are not. Anything not listed is unsupported, including use by someone who is physically in an unsupported region, and use by an entity incorporated, headquartered, or controlled from one. The policy can change; follow the official page. This guide does not discuss ways around it.

## How to install it

Checked on 15 November 2026 (Asia/Shanghai) against official setup and quickstart pages. Anthropic recommends the native installer, which updates in the background. On macOS, Linux, or WSL:

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

Windows PowerShell:

```powershell
irm https://claude.ai/install.ps1 | iex
```

Windows CMD:

```batch
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```

Homebrew (`brew install --cask claude-code`) and WinGet (`winget install Anthropic.ClaudeCode`) also work, but those installs do not auto-update. The README marks `npm install -g @anthropic-ai/claude-code` as deprecated. After install, open a new terminal and run `claude --version`. If the shell cannot find `claude`, the install directory is probably missing from your PATH; see the official troubleshooting page.

Start it in a project:

```bash
cd /path/to/your/project
claude
```

The first launch opens a browser so you can sign in with a claude.ai subscription or a Console account. If `ANTHROPIC_API_KEY` is set and you approve it when asked, Claude Code skips that prompt. Credentials are stored locally after that. To switch accounts, use `/login` or `/logout` in a session.

Pricing is on [claude.com/pricing](https://claude.com/pricing), before tax, and can change. On 15 November 2026 that page listed Pro at $20 per month, or about $17 per month when billed annually ($200 upfront); Max at $100; and Ultra at $200. Console billing uses prepaid credits. You can inspect usage with `/usage`. This page does not estimate your own bill.

### CLAUDE.md, skills, plugins, and MCP

`CLAUDE.md` holds standing instructions and is loaded at the start of every session. Put personal defaults in `~/.claude/CLAUDE.md`. Commit `./CLAUDE.md` or `./.claude/CLAUDE.md` for the team. Keep machine-specific notes in `./CLAUDE.local.md` and add that file to `.gitignore`. If a section has grown into a procedure you only need sometimes, move it into a skill.

A skill is a folder with a `SKILL.md` file. Personal skills live at `~/.claude/skills/<name>/SKILL.md`; project skills live under `.claude/skills/`. Claude can pick one from its description, or you can run `/skill-name`.

Plugins package skills, hooks, subagents, and MCP servers. In a session, `/plugin` opens the marketplace. Anthropic’s official plugins are in [anthropics/claude-plugins-official](https://github.com/anthropics/claude-plugins-official).

MCP connects tools outside the repo. In your terminal — not inside a session — you can add a hosted example:

```bash
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
```

Then run `claude mcp list` and look for a connected status. Add `--scope user` to keep it across projects. Inside a session, `/mcp` shows servers and can finish a browser sign-in.

## A worked example

The prompts below come from the official quickstart. This review did not run them, so the page does not invent a project summary or a code patch.

1. Run `claude` in your own repository and finish sign-in.
2. Send: `what does this project do?` Official docs say Claude Code reads project files as needed and returns a summary; you do not have to paste the tree first.
3. For a small edit, the official starter is: `add a hello world function to the main file`. It should pick a file and show a change. If it asks for approval, confirm it. `Shift+Tab` cycles the session’s permission mode.
4. Read the diff yourself, then use your usual tests and Git workflow. Treat the result as a proposal, not a merge.

## Common pitfalls

- `claude` is not found after install. Official troubleshooting points at PATH. Open a new terminal, and add the install directory if needed. [Issue #471](https://github.com/anthropics/claude-code/issues/471) also reported `command not found` after a terminal crash. If you still use the deprecated npm install, [issue #3172](https://github.com/anthropics/claude-code/issues/3172) describes a broken symlink on macOS with Homebrew.
- The installer fails. Errors such as `syntax error near unexpected token '<'`, `< was unexpected` in CMD, or HTTP `403` often mean the script returned HTML or the download was refused. Match the message on [Troubleshoot installation](https://code.claude.com/docs/en/troubleshoot-install). Do not run the CMD command in PowerShell, or the PowerShell command in CMD.
- Login or HTTP 403. Confirm the account is on a plan that includes Claude Code, and that your location and organization match the supported-regions policy. If the browser does not open, copy the login URL from the prompt. [Issue #8007](https://github.com/anthropics/claude-code/issues/8007) reported an OAuth 403; that issue is closed, so start with the current troubleshooting page.
- Settings seem to be ignored. CLAUDE.md, MCP, and skills are often read at session start. Exit and reopen after edits. Use `/mcp`, `claude doctor`, or the official debug guide.

## FAQ

### Does the Free plan include Claude Code?

No. The official quickstart and the pricing page both say the Free plan does not include it. You need Pro, Max, Ultra, Team, Enterprise, Console access, or a supported cloud provider through your organization.

### Can I use it from mainland China?

Anthropic’s supported-regions list, in effect since 12 November 2026, does not include mainland China, Hong Kong, or Macau, and it treats unlisted regions as unsupported. Follow the current official policy. This page does not describe unofficial access methods.

### How is CLAUDE.md different from a skill?

`CLAUDE.md` loads at the start of every session and is the right place for build commands, layout notes, and rules that should always apply. A skill loads on demand and is better for a repeatable procedure. Official docs suggest moving a CLAUDE.md section into a skill once it has grown into a checklist.

### Do I need a plugin to use MCP?

No. Plugins are only a packaging layer. You can add a server with `claude mcp add` and check it with `claude mcp list` or `/mcp`.

### Can I still install it with npm?

The official README marks the npm install as deprecated. Use the native installer, Homebrew, or WinGet instead. If an older tutorial still shows `npm install -g @anthropic-ai/claude-code`, do not treat that as the current recommended path.

## Sources and license

The [anthropics/claude-code](https://github.com/anthropics/claude-code) repository is mainly product tracking and notes. Install steps and behavior come from [code.claude.com/docs](https://code.claude.com/docs/en/overview). This page follows the Quickstart, Setup, Authentication, Memory, MCP, troubleshooting, pricing, and supported-regions pages as of 15 November 2026, rewritten for CQBase — Context & Query Base. If those pages change, follow them.

## Catalog record

- Author: anthropics
- License: Unknown
- Source: https://github.com/anthropics/claude-code
- Added: 2026-11-15
- GitHub stars: 155730 (captured 2026-11-15)

