Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks to use the Claude API, Anthropic SDKs, or Managed Agents (/v1/agents, /v1/sessions, /v1/environments). DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.
Detected risks:
The claude-api skill provides developers with a structured approach to building, debugging, and optimizing applications using the Claude API and Anthropic SDKs. It is specifically designed for projects where the Anthropic ecosystem is used, ensuring that code adheres to best practices for interacting with Claude models. This skill helps prevent accidental mixing of SDKs from other AI providers, such as OpenAI, by scanning project files for non-Anthropic markers before applying changes. By focusing solely on Claude and the official Anthropic SDKs, the skill streamlines development and reduces the likelihood of integration errors, particularly in projects that rely on prompt caching and adaptive thinking mechanisms.
The skill detects the project language based on files such as Python (*.py, requirements.txt) and TypeScript (*.ts, package.json) and applies the relevant Anthropic SDK or API usage accordingly.
No. The claude-api skill is specifically for Claude/Anthropic SDK projects. It will not modify code using OpenAI or other AI providers and will alert the user if non-Anthropic code is detected.
Unless specified otherwise, the skill defaults to using Claude Opus 4.6, accessed via the model string 'claude-opus-4-6'.
Streaming is enabled by default for requests with long input, long output, or high max_tokens. Developers can use the SDK's final message helpers to retrieve complete responses without managing stream events.
No. The skill recommends using the official Anthropic SDK whenever available and only resorts to raw HTTP calls if explicitly requested or if the language has no supported SDK. Mixing approaches is discouraged.
Quick Setup:
.claude/skills/Repository
anthropics/skills