Files
tech/工程/ClaudeCode.md
T

201 lines
7.9 KiB
Markdown

# [Claude Code](https://code.claude.com/docs/zh-CN/quickstart)
- Info
- [Claude Code Changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md)
- [GLM-5](https://docs.bigmodel.cn/cn/guide/models/text/glm-5-turbo)
- [Claude Code GitHub](https://github.com/anthropics/claude-code)
- [Claude Code Plugins Directory](https://github.com/anthropics/claude-plugins-official.git)
- [Anthropic SDK Python](https://github.com/anthropics/anthropic-sdk-python)
- [Anthropic SDK TypeScript](https://github.com/anthropics/anthropic-sdk-typescript)
- [Anthropic SDK Java](https://github.com/anthropics/anthropic-sdk-java)
- [Claude Code CLI](https://docs.bigmodel.cn/cn/coding-plan/tool/claude)
- [Claude Code IDE 插件](https://docs.bigmodel.cn/cn/coding-plan/tool/claude-for-ide)
- [Happy Coder: Claude Code 的移动端和网页客户端 - 远程编程与 AI 助手](https://cc.deeptoai.com/docs/zh/tools/happy-mobile-claude-code-client)
- [飞书 + Claude Code:远程指挥电脑干活](https://wangqingping.top/blog/post/remoteClaudeCode)
- [cc-connect,十分钟帮你把 claude code 连接到微信,飞书,钉钉等等平台](https://juejin.cn/post/7611809566247616518)
- [OpenClaw 接入飞书](https://www.runoob.com/ai-agent/openclaw-feishu.html)
- GitHub
- [29471 Star | Claude Code Router](https://github.com/musistudio/claude-code-router)
- [14918 Star | Happy Coder: Mobile and Web Client for Claude Code & Codex](https://github.com/slopus/happy) Use Claude Code or Codex from anywhere with end-to-end encryption.
- [13775 Star | Agent Skills for Context Engineering](https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering.git)
- [10266 Star | Compound Engineering Plugin](https://github.com/EveryInc/compound-engineering-plugin)
- [03514 Star | CodePilot](https://github.com/op7418/CodePilot/blob/main/README_CN.md)
- [00877 Star | cc-connect](https://github.com/chenhg5/cc-connect)
- [00407 Star | OpencCode Manager](https://github.com/chriswritescode-dev/opencode-manager)
- [00212 Star | MetaBot](https://github.com/xvirobotics/metabot/blob/main/README_zh.md)
- [00012 Star | Remote Claude Code](https://github.com/qingpingwang/remote-claude-code)
## 安装
```bash
# 安装
cd
npm install -g @anthropic-ai/claude-code
claude --version
# 配置
npx @z_ai/coding-helper
curl -O "https://cdn.bigmodel.cn/install/claude_code_env.sh" && bash ./claude_code_env.sh
bash ./.devcontainer/cache/scripts/claude_code_env.sh
# 创建快捷命令
code ~/.local/bin/runcc.sh
#!/bin/bash
claude --ide --dangerously-skip-permissions --allow-dangerously-skip-permissions
# 在 VS Code 成功进入 Claude Code 扩展 对话框后,在对话框输入 /config 进入设置,勾选 Disable Login Prompt 配置来关闭登录页面。
```
```bash
# 1. 启用遥测
export CLAUDE_CODE_ENABLE_TELEMETRY=1
# 2. 选择导出器(两者都是可选的 - 仅配置您需要的)
export OTEL_METRICS_EXPORTER=otlp # 选项:otlp、prometheus、console
export OTEL_LOGS_EXPORTER=otlp # 选项:otlp、console
# 3. 配置 OTLP 端点(用于 OTLP 导出器)
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
```
```json
// 增加自定义设置
"env": {
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5-turbo",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.1",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75"
},
```
- 启用 agent teams
- Agent teams 默认禁用。
- 通过将 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS 环境变量设置为 1 来启用它们,可以在你的 shell 环境中或通过 settings.json 进行:
```json
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
```
## MCP, Plugin, Skill
```bash
# 安装 SpecKit Specify CLI
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
# initialize in existing project
specify init . --ai claude
# Check installed tools
specify check
# 安装 UI UX Pro Max globally CLI
npm install -g uipro-cli
uipro init --ai claude
```
```bash
### 安装 MCP
claude mcp add --transport stdio chrome-devtools -- npx -y chrome-devtools-mcp
claude mcp add --transport stdio playwright -- npx -y @playwright/mcp@latest
### 安装 Plugin, Skill
claude plugin marketplace add zai-org/zai-coding-plugins
claude plugin install glm-plan-usage@zai-coding-plugins
claude plugin install code-simplifier@claude-plugins-official --scope local/
claude plugin uninstall code-simplifier --scope local
```
```bash
# 常用 Plugin
# 66
# https://github.com/zai-org/zai-coding-plugins
/plugin marketplace add zai-org/zai-coding-plugins
/plugin install glm-plan-usage@zai-coding-plugins
/glm-plan-usage:usage-query
# 8.7k
# https://github.com/anthropics/claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-official
/plugin install context7@claude-plugins-official
/plugin install superpowers@claude-plugins-official
/plugin install code-review@claude-plugins-official
/plugin install code-simplifier@claude-plugins-official
/plugin install ralph-loop@claude-plugins-official
/plugin install playwright@claude-plugins-official
/plugin install typescript-lsp@claude-plugins-official
/plugin install pyright-lsp@claude-plugins-official
/plugin install rust-analyzer-lsp@claude-plugins-official
/plugin install jdtls-lsp@claude-plugins-official
/plugin install gopls-lsp@claude-plugins-official
# 77.6k
# https://github.com/github/spec-kit
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
specify init . --ai claude
# 90.0k
# https://github.com/obra/superpowers
/plugin marketplace add obra/superpowers-marketplace
/plugin install superpowers@superpowers-marketplace
# 60.89k
# https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
/plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill
/plugin install ui-ux-pro-max@ui-ux-pro-max-skill
# 46.1k
# https://github.com/thedotmack/claude-mem
# https://gitea.szis.com.cn/github/thedotmack-claude-mem.git
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
# 30k
# https://github.com/wshobson/agents
# Claude Code Plugins: Orchestration and Automation
/plugin marketplace add wshobson/agents
# Essential development plugins
/plugin install python-development # Python with 16 specialized skills
/plugin install javascript-typescript # JS/TS with 4 specialized skills
/plugin install backend-development # Backend APIs with 3 architecture skills
# Infrastructure & operations
/plugin install kubernetes-operations # K8s with 4 deployment skills
/plugin install cloud-infrastructure # AWS/Azure/GCP with 4 cloud skills
# Security & quality
/plugin install security-scanning # SAST with security skill
/plugin install comprehensive-review # Multi-perspective code analysis
# Full-stack orchestration
/plugin install full-stack-orchestration # Multi-agent workflows
# 12.9k
# https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin install context-engineering-fundamentals@context-engineering-marketplace
/plugin install agent-architecture@context-engineering-marketplace
/plugin install agent-evaluation@context-engineering-marketplace
/plugin install agent-development@context-engineering-marketplace
/plugin install cognitive-architecture@context-engineering-marketplace
# 9.7k
# https://github.com/EveryInc/compound-engineering-plugin
/plugin marketplace add EveryInc/compound-engineering-plugin
/plugin install compound-engineering
```
```bash
# 帮我通过以下命令安装 lark-cli
npm install -g @larksuite/cli
# 然后通过以下命令安装相关 skills
npx skills add https://github.com/larksuite/cli -y -g
# 然后通过以下命令配置应用
lark-cli config init --new
```