working-with-claude-code

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Working with Claude Code

使用Claude Code

Overview

概述

This skill provides complete, authoritative documentation for Claude Code directly from docs.claude.com. Instead of guessing about configuration paths, API structures, or feature capabilities, read the official docs stored in this skill's references directory.
本skill直接从docs.claude.com提供Claude Code的完整权威文档。你无需猜测配置路径、API结构或功能特性,直接阅读存储在本skill的references目录中的官方文档即可。

When to Use

适用场景

Use this skill when:
  • Creating or configuring Claude Code plugins
  • Setting up MCP servers
  • Working with hooks (pre-commit, session-start, etc.)
  • Writing or testing skills
  • Configuring Claude Code settings
  • Troubleshooting Claude Code issues
  • Understanding CLI commands
  • Setting up integrations (VS Code, JetBrains, etc.)
  • Configuring networking, security, or enterprise features
在以下情况使用本skill:
  • 创建或配置Claude Code插件
  • 搭建MCP服务器
  • 使用hooks(pre-commit、session-start等)
  • 编写或测试skills
  • 配置Claude Code设置
  • 排查Claude Code问题
  • 了解CLI命令
  • 搭建集成(VS Code、JetBrains等)
  • 配置网络、安全或企业级功能

Quick Reference

快速参考

TaskRead This File
Create a plugin
plugins.md
then
plugins-reference.md
Set up MCP server
mcp.md
Configure hooks
hooks.md
then
hooks-guide.md
Write a skill
skills.md
CLI commands
cli-reference.md
Troubleshoot issues
troubleshooting.md
General setup
setup.md
or
quickstart.md
Configuration options
settings.md
任务需阅读的文件
创建插件
plugins.md
然后
plugins-reference.md
搭建MCP服务器
mcp.md
配置hooks
hooks.md
然后
hooks-guide.md
编写skill
skills.md
CLI命令
cli-reference.md
问题排查
troubleshooting.md
常规设置
setup.md
或
quickstart.md
配置选项
settings.md

Documentation Organization

文档结构

All documentation is stored as individual markdown files in
references/
. Use the Read tool to access specific documentation:
references/
├── overview.md              # Claude Code introduction
├── quickstart.md           # Getting started guide
├── setup.md                # Installation and setup
├── plugins.md              # Plugin development
├── plugins-reference.md    # Plugin API reference
├── plugin-marketplaces.md  # Plugin marketplaces
├── skills.md               # Skill creation
├── mcp.md                  # MCP server integration
├── hooks.md                # Hooks overview
├── hooks-guide.md          # Hooks implementation guide
├── slash-commands.md       # Slash command reference
├── sub-agents.md           # Subagent usage
├── settings.md             # Configuration reference
├── cli-reference.md        # CLI command reference
├── common-workflows.md     # Common usage patterns
├── interactive-mode.md     # Interactive mode guide
├── headless.md             # Headless mode guide
├── output-styles.md        # Output customization
├── statusline.md           # Status line configuration
├── memory.md               # Memory and context management
├── checkpointing.md        # Checkpointing feature
├── analytics.md            # Usage analytics
├── costs.md                # Cost tracking
├── monitoring-usage.md     # Usage monitoring
├── data-usage.md           # Data usage policies
├── security.md             # Security features
├── iam.md                  # IAM integration
├── network-config.md       # Network configuration
├── terminal-config.md      # Terminal configuration
├── model-config.md         # Model configuration
├── llm-gateway.md          # LLM gateway setup
├── amazon-bedrock.md       # AWS Bedrock integration
├── google-vertex-ai.md     # Google Vertex AI integration
├── vs-code.md              # VS Code integration
├── jetbrains.md            # JetBrains integration
├── devcontainer.md         # Dev container support
├── github-actions.md       # GitHub Actions integration
├── gitlab-ci-cd.md         # GitLab CI/CD integration
├── third-party-integrations.md  # Other integrations
├── legal-and-compliance.md # Legal information
├── troubleshooting.md      # Troubleshooting guide
└── migration-guide.md      # Migration guide
所有文档以独立markdown文件的形式存储在
references/
目录下。使用Read工具访问特定文档:
references/
├── overview.md              # Claude Code introduction
├── quickstart.md           # Getting started guide
├── setup.md                # Installation and setup
├── plugins.md              # Plugin development
├── plugins-reference.md    # Plugin API reference
├── plugin-marketplaces.md  # Plugin marketplaces
├── skills.md               # Skill creation
├── mcp.md                  # MCP server integration
├── hooks.md                # Hooks overview
├── hooks-guide.md          # Hooks implementation guide
├── slash-commands.md       # Slash command reference
├── sub-agents.md           # Subagent usage
├── settings.md             # Configuration reference
├── cli-reference.md        # CLI command reference
├── common-workflows.md     # Common usage patterns
├── interactive-mode.md     # Interactive mode guide
├── headless.md             # Headless mode guide
├── output-styles.md        # Output customization
├── statusline.md           # Status line configuration
├── memory.md               # Memory and context management
├── checkpointing.md        # Checkpointing feature
├── analytics.md            # Usage analytics
├── costs.md                # Cost tracking
├── monitoring-usage.md     # Usage monitoring
├── data-usage.md           # Data usage policies
├── security.md             # Security features
├── iam.md                  # IAM integration
├── network-config.md       # Network configuration
├── terminal-config.md      # Terminal configuration
├── model-config.md         # Model configuration
├── llm-gateway.md          # LLM gateway setup
├── amazon-bedrock.md       # AWS Bedrock integration
├── google-vertex-ai.md     # Google Vertex AI integration
├── vs-code.md              # VS Code integration
├── jetbrains.md            # JetBrains integration
├── devcontainer.md         # Dev container support
├── github-actions.md       # GitHub Actions integration
├── gitlab-ci-cd.md         # GitLab CI/CD integration
├── third-party-integrations.md  # Other integrations
├── legal-and-compliance.md # Legal information
├── troubleshooting.md      # Troubleshooting guide
└── migration-guide.md      # Migration guide

Workflow

使用流程

For Specific Questions

针对特定问题

  1. Identify the relevant documentation file from the list above
  2. Use Read tool to load:
    @references/filename.md
  3. Find the answer in the official documentation
  4. Apply the solution
Example:
User: "How do I create a Claude Code plugin?"
→ Read @references/plugins.md
→ Follow the official plugin creation steps
  1. 从上述列表中找出相关的文档文件
  2. 使用Read工具加载:
    @references/filename.md
  3. 在官方文档中找到答案
  4. 应用解决方案
示例:
User: "How do I create a Claude Code plugin?"
→ Read @references/plugins.md
→ Follow the official plugin creation steps

For Broad Topics

针对宽泛主题

When exploring a topic, start with the overview document, then drill into specific files:
  • Extending Claude Code: Start with
    plugins.md
    ,
    skills.md
    , or
    mcp.md
  • Configuration: Start with
    settings.md
    or
    setup.md
  • Integrations: Check relevant integration file (vs-code.md, github-actions.md, etc.)
  • Troubleshooting: Start with
    troubleshooting.md
当探索某个主题时,先从概述文档开始,再深入查看具体文件:
  • 扩展Claude Code:从
    plugins.md
    、
    skills.md
    或
    mcp.md
    开始
  • 配置:从
    settings.md
    或
    setup.md
    开始
  • 集成:查看相关的集成文件(vs-code.md、github-actions.md等)
  • 问题排查:从
    troubleshooting.md
    开始

For Uncertain Topics

针对不确定的主题

Use Grep tool to search across all documentation:
bash
pattern: "search term"
path: ~/.claude/skills/working-with-claude-code/references/
使用Grep工具在所有文档中搜索:
bash
pattern: "search term"
path: ~/.claude/skills/working-with-claude-code/references/

Updating Documentation

更新文档

The skill includes
scripts/update_docs.js
to fetch the latest documentation from docs.claude.com.
Run when:
  • Documentation seems outdated
  • New Claude Code features are released
  • Official docs have been updated
bash
node ~/.claude/skills/working-with-claude-code/scripts/update_docs.js
The script:
  1. Fetches llms.txt from docs.claude.com
  2. Extracts all Claude Code documentation URLs
  3. Downloads each page to
    references/
  4. Reports success/failures
本skill包含
scripts/update_docs.js
脚本,用于从docs.claude.com获取最新文档。
在以下情况运行该脚本:
  • 文档看起来过时了
  • Claude Code发布了新功能
  • 官方文档已更新
bash
node ~/.claude/skills/working-with-claude-code/scripts/update_docs.js
该脚本会:
  1. 从docs.claude.com获取llms.txt
  2. 提取所有Claude Code文档URL
  3. 将每个页面下载到
    references/
    目录
  4. 报告成功/失败情况

Common Patterns

常见使用场景

Plugin Development

插件开发

Read
plugins.md
for overview, then
plugins-reference.md
for API details.
阅读
plugins.md
了解概述,再阅读
plugins-reference.md
了解API详情。

MCP Server Setup

MCP服务器搭建

Read
mcp.md
for configuration format and examples.
阅读
mcp.md
了解配置格式和示例。

Hook Configuration

Hook配置

Read
hooks.md
for overview, then
hooks-guide.md
for implementation details.
阅读
hooks.md
了解概述,再阅读
hooks-guide.md
了解实现详情。

Skill Creation

Skill创建

Read
skills.md
for the complete skill authoring guide.
阅读
skills.md
获取完整的skill编写指南。

What This Skill Does NOT Do

本skill不提供的内容

  • This skill provides documentation access, not procedural guidance
  • For workflows on how to build plugins/skills, use the
    extending-claude-code
    skill (when available)
  • This skill is a reference library, not a tutorial
  • 本skill提供文档访问能力,而非流程化指导
  • 如需了解如何构建插件/skills的工作流,请使用
    extending-claude-code
    skill(若可用)
  • 本skill是一个参考库,而非教程

Red Flags

注意事项

If you find yourself:
  • Guessing about configuration file locations → Read
    settings.md
  • Speculating about API structures → Read relevant reference doc
  • Unsure about hook names → Read
    hooks.md
  • Making assumptions about features → Search the docs first
Always consult the official documentation before guessing.
如果你发现自己:
  • 猜测配置文件的位置 → 阅读
    settings.md
  • 推测API结构 → 阅读相关的参考文档
  • 不确定hook的名称 → 阅读
    hooks.md
  • 对功能做出假设 → 先搜索文档
在猜测之前,请务必查阅官方文档。