Claude API
Use this skill for provider-specific Claude API and Anthropic SDK work. Keep it explicit: if the target file is provider-neutral or already uses another provider, stop and ask whether the user wants an Anthropic-specific implementation.
Workflow
- Detect the project language, runtime, and existing SDK usage.
- Read
references/live-sources.md, then verify current Anthropic docs or SDK source before relying on API names, model IDs, headers, beta flags, or migration details that may have changed. - Prefer the official Anthropic SDK for the project language. Use raw HTTP only when the user asks for REST/cURL or no suitable SDK exists.
- Keep secrets in environment variables or the target repo's existing secret manager. Never place API keys, tokens, or credentials in prompts, committed files, examples, or logs.
- Preserve existing provider boundaries. Do not introduce Anthropic SDK calls into OpenAI, generic, or multi-provider files unless the accepted change is to add an Anthropic lane.
- Run the nearest compile, typecheck, unit, or smoke check after changing code.
Implementation Checks
- Confirm exact package names, imports, client constructors, method names, request fields, streaming helpers, and response shapes from current docs or SDK source.
- Treat model names, pricing, context windows, rate limits, prompt caching behavior, and migration guidance as live facts.
- Make cost, latency, timeout, and retry tradeoffs explicit when changing generation behavior.
- Add tests or fixtures around request construction, response parsing, and error handling where the project already has a test surface.
Boundaries
- Use
documentation-lookupfor general API/library questions that are not Anthropic-specific. - Use
mcp-builderfor MCP server design or tool schemas. - Use
security-reviewwhen auth, secret handling, sandboxing, or untrusted tool execution is central.