working-with-claude-code
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorking 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
快速参考
| Task | Read This File |
|---|---|
| Create a plugin | |
| Set up MCP server | |
| Configure hooks | |
| Write a skill | |
| CLI commands | |
| Troubleshoot issues | |
| General setup | |
| Configuration options | |
| 任务 | 需阅读的文件 |
|---|---|
| 创建插件 | |
| 搭建MCP服务器 | |
| 配置hooks | |
| 编写skill | |
| CLI命令 | |
| 问题排查 | |
| 常规设置 | |
| 配置选项 | |
Documentation Organization
文档结构
All documentation is stored as individual markdown files in . Use the Read tool to access specific documentation:
references/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文件的形式存储在目录下。使用Read工具访问特定文档:
references/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 guideWorkflow
使用流程
For Specific Questions
针对特定问题
- Identify the relevant documentation file from the list above
- Use Read tool to load:
@references/filename.md - Find the answer in the official documentation
- Apply the solution
Example:
User: "How do I create a Claude Code plugin?"
→ Read @references/plugins.md
→ Follow the official plugin creation steps- 从上述列表中找出相关的文档文件
- 使用Read工具加载:
@references/filename.md - 在官方文档中找到答案
- 应用解决方案
示例:
User: "How do I create a Claude Code plugin?"
→ Read @references/plugins.md
→ Follow the official plugin creation stepsFor Broad Topics
针对宽泛主题
When exploring a topic, start with the overview document, then drill into specific files:
- Extending Claude Code: Start with ,
plugins.md, orskills.mdmcp.md - Configuration: Start with or
settings.mdsetup.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 to fetch the latest documentation from docs.claude.com.
scripts/update_docs.jsRun 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.jsThe script:
- Fetches llms.txt from docs.claude.com
- Extracts all Claude Code documentation URLs
- Downloads each page to
references/ - Reports success/failures
本skill包含脚本,用于从docs.claude.com获取最新文档。
scripts/update_docs.js在以下情况运行该脚本:
- 文档看起来过时了
- Claude Code发布了新功能
- 官方文档已更新
bash
node ~/.claude/skills/working-with-claude-code/scripts/update_docs.js该脚本会:
- 从docs.claude.com获取llms.txt
- 提取所有Claude Code文档URL
- 将每个页面下载到目录
references/ - 报告成功/失败情况
Common Patterns
常见使用场景
Plugin Development
插件开发
Read for overview, then for API details.
plugins.mdplugins-reference.md阅读了解概述,再阅读了解API详情。
plugins.mdplugins-reference.mdMCP Server Setup
MCP服务器搭建
Read for configuration format and examples.
mcp.md阅读了解配置格式和示例。
mcp.mdHook Configuration
Hook配置
Read for overview, then for implementation details.
hooks.mdhooks-guide.md阅读了解概述,再阅读了解实现详情。
hooks.mdhooks-guide.mdSkill Creation
Skill创建
Read for the complete skill authoring guide.
skills.md阅读获取完整的skill编写指南。
skills.mdWhat This Skill Does NOT Do
本skill不提供的内容
- This skill provides documentation access, not procedural guidance
- For workflows on how to build plugins/skills, use the skill (when available)
extending-claude-code - This skill is a reference library, not a tutorial
- 本skill提供文档访问能力,而非流程化指导
- 如需了解如何构建插件/skills的工作流,请使用skill(若可用)
extending-claude-code - 本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 - 对功能做出假设 → 先搜索文档
在猜测之前,请务必查阅官方文档。