360 Secure SkillHub
360 安全技能中心

Claude API Builder

该 Skill 在代码导入 Anthropic SDK 或用户要求基于 Claude API 构建时触发:识别项目语言与 SDK 形态,从简单消息、流式、工具调用、批处理、文件上传中挑选最小适配模式,并给出实现指导、SDK 注意事项以及模型名、错误处理与重试建议;强调优先查阅官方文档,不擅自转向非 Anthropic SDK。

wimi321
wimi321
热度 46.57
最近更新 2026-05-11 17:39:34
分类:开发依赖:第三方 API应用场景:API 集成 / 代码生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add claude-api-builder
Metadata
name
claude_api_builder
description
Use when code imports Anthropic SDKs or the user asks to build with the Claude API, Agent SDK, tool use, streaming, files, or batches.

Claude API Builder

Use this skill when the task is specifically about Anthropic or Claude API integration.

Trigger Signals

  • Imports like anthropic, @anthropic-ai/sdk, or Agent SDK packages
  • Requests about streaming, tool use, prompt caching, file uploads, or Claude batch jobs
  • Questions about choosing Anthropic API patterns for an app

Workflow

  1. Detect the project language and SDK surface.
  2. Choose the smallest fitting pattern: simple messages, streaming, tools, batches, or files.
  3. Prefer official docs and SDK-native examples.
  4. Keep model names, error handling, and retries explicit.
  5. Explain when to browse live docs for fast-moving API details.

Guardrails

  • Do not pivot to non-Anthropic SDKs unless the user asks.
  • Prefer primary documentation over memory for model/API specifics.
  • Separate one-shot prompts from stateful agent workflows.

Example Requests

  • Add Anthropic streaming support to this TypeScript app.
  • Help me implement tool use with the Python Anthropic SDK.

Inputs

  • Project language
  • Anthropic API feature needed
  • Performance or UX constraints

Outputs

  • Recommended API pattern
  • Implementation guidance
  • SDK-specific caveats

Success Criteria

  • The guidance matches Anthropic APIs specifically.
  • The selected pattern fits the use case and language.
  • Fast-moving API details are called out clearly.

Non-Goals

  • General LLM vendor-neutral advice
  • Non-Anthropic SDK design by default

Source Provenance

Derived from src/skills/bundled/claudeApi.ts and the bundled Claude API references.