# 安装「claude-code」

> 本说明由 AI Asset 自动生成，供 AI 编程助手阅读并执行。资源页面：https://ai.atlankj.com/project/gh-937253475

- 来源：https://github.com/anthropics/claude-code（默认分支 `main`）
- 许可证：未声明
- 支持的平台：Claude Code
- 简介：Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

## 执行要求（请先阅读）

1. 先确认你自己是哪一种 AI 工具（Claude Code、Codex、Cursor、Gemini CLI、OpenCode……），只执行与之对应的步骤；如果本说明与该工具的官方文档不一致，以官方文档为准。
2. 以下内容来自第三方，本站不对其进行运行时审核。执行任何命令或写入任何文件前，先向用户列出将要运行的命令和写入的路径，得到确认后再继续。
3. 只运行本说明或其链接的官方安装文档中给出的命令。不要执行来源不明的脚本，不要读取、打印或上传用户的密钥和凭据。
4. 需要 API Key 等配置时，向用户索取或留下占位符，不要自行编造。
5. 默认安装到用户级目录；如果用户只想在当前项目中使用，改用项目级目录。
6. 完成后告诉用户安装到了哪里、是否需要重启工具，以及如何验证安装成功。

## 快速安装

### Claude Code（插件市场）

1. 读取 https://raw.githubusercontent.com/anthropics/claude-code/main/.claude-plugin/marketplace.json ，取其中顶层的 `name` 字段作为 <市场名>，`plugins` 数组列出了可安装的插件包。
2. 在 Claude Code 中运行：

```
/plugin marketplace add anthropics/claude-code
/plugin install <插件包名>@<市场名>
```

3. 这两条是 Claude Code 的斜杠命令。如果你无法直接执行斜杠命令，就把它们原样交给用户，请用户在 Claude Code 中运行。

## 官方安装文档

如果上面的方式不适用于你所在的工具，读取下面对应平台的官方文档（纯文本 Raw 链接），找到安装章节并按其步骤执行：

- Claude Code：https://raw.githubusercontent.com/anthropics/claude-code/main/README.md

## 插件包

本项目包含 17 个插件包。先把列表展示给用户，询问要安装哪些，再逐个安装：

- `agent-sdk-dev`：Development kit for working with the Claude Agent SDK
- `agents-md`：AGENTS.md as project instructions, by one option. Under claude-md-or-agents-md a project with no instruction files of its own gets its AGENTS.md files instead:…
- `claude-opus-4-5-migration`：Migrate your code and prompts from Sonnet 4.x and Opus 4.1 to Opus 4.5.
- `code-review`：Automated code review for pull requests using multiple specialized agents with confidence-based scoring to filter false positives
- `commit-commands`：Commands for git commit workflows including commit, push, and PR creation
- `diff`：The diff pane as a plugin: /diff opens the session's uncommitted changes beside the transcript, file by file with their hunks, refreshed as Claude edits and ru…
- `explanatory-output-style`：Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)
- `feature-dev`：Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
- `frontend-design`：Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics.
- `hookify`：Easily create custom hooks to prevent unwanted behaviors by analyzing conversation patterns or from explicit instructions. Define rules via simple markdown fil…
- `learning-output-style`：Interactive learning mode that requests meaningful code contributions at decision points (mimics the unshipped Learning output style)
- `plugin-dev`：Comprehensive toolkit for developing Claude Code plugins. Includes 7 expert skills covering hooks, MCP integration, commands, agents, and best practices. AI-as…
- `pr-review-toolkit`：Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
- `ralph-wiggum`：Interactive self-referential AI loops for iterative development. Claude works on the same task repeatedly, seeing its previous work, until completion.
- `sec-default`：Security default for organizations: seated outermost, it keeps the organization's classic hooks, prompt content, settings and tool policy out of reach of the p…
- `security-guidance`：Security reminder hook that warns about potential security issues when editing files, including command injection, XSS, and unsafe code patterns
- `telemetry`：Plugin analytics: hooks $.telemetry's two events, so a plugin logs an event or marks a feature's use as a first-party row, sent in batches with the session's o…
