本技能是 Claude Agent SDK(官方文档位于 code.claude.com/docs/en/agent-sdk)的 TypeScript / Python 参考,面向前者构建与运维智能体的场景。它按任务组织内容,便于从任务定位到具体文档页。
用途与主要能力:覆盖通过 query() 运行智能体循环;使用 ClaudeAgentOptions / Options 等配置项;定义 custom tools(进程内 MCP,如 createSdkMcpServer);连接外部 MCP 服务器;用 hooks 控制工具调用;使用 plugins、SKILL.md、slash commands、subagents 与 tool search;处理会话持久化、恢复与分叉(resume / fork)、外部存储、file checkpointing、todo 管理与 streaming 输出、structured outputs;定制 system prompt、通过 permission mode 或 canUseTool 控制权限与用户输入/审批流程;以及生产托管、安全部署、OpenTelemetry 可观测性、成本/Token 追踪和排错。
使用方式:先按“任务→分类”映射表确定类别,再读取对应 references/{category}/README.md(samples 与 scripts 读其目录下的 README.md)定位目标页,最后阅读该页 .md 获取细节。文档目录包括 getting-started、api-reference、extending、sessions-io、control、operations,以及 samples、scripts 与 SKILL.md。典型示例含最小智能体、自定义工具、MCP 服务器、hooks、权限、子代理、会话、流式、结构化输出与 system prompt 定制。
限制与边界:Claude Code CLI 本体应参考 anthropic-claude-code / anthropic-claude-code-extend;直接调用 Messages API 参考 anthropic-api-core;API 侧 tool use / Agent Skills / MCP 参考 anthropic-api-tools-mcp。本技能只负责通过 SDK 构建与运行智能体。安装命令、API Key 配置方式与价格等具体信息在本次资料中未提供。