claude-api

Build, debug, and migrate applications using the Claude API and Anthropic SDKs.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/mccleod1290/bb-agentic-setupv2 --skill claude-api-mccleod1290
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/mccleod1290/bb-agentic-setupv2/tree/main/documenting-skills/claude-api
Command: npx skills add https://github.com/mccleod1290/bb-agentic-setupv2 --skill claude-api-mccleod1290

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Claude API and Anthropic SDK code requires knowing current model IDs, beta headers, thinking/effort parameters, prompt caching rules, and per-language SDK bindings, which change frequently and are easy to get wrong from memory. ## Core Features & Use Cases - Multi-language SDK guidance: Language detection routes to dedicated references for Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL, covering streaming, tool use, structured outputs, batches, and the Files API. - Model migration and defaults: Enforces current model IDs (e.g., claude-opus-4-7), adaptive thinking, effort parameters, and documents breaking changes when migrating between Claude model versions. - Managed Agents support: Covers the server-managed stateful agent surface (agents, sessions, environments) with an onboarding subcommand and client-pattern references. - Use Case: A developer asks to add prompt caching to an existing Python Anthropic SDK project; the skill detects Python, reads the caching reference, and produces code with correct cache_control breakpoints and usage verification. ## Quick Start Ask the assistant to add prompt caching to your Anthropic SDK project or to migrate your Claude API code to the latest model version.

Frequently Asked Questions about claude-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add prompt caching to the Anthropic SDK?▼

Set cache_control with type ephemeral on the last stable system or tool block, keeping volatile content after the final breakpoint. Verify hits via usage.cache_read_input_tokens; zero across repeated requests indicates a silent invalidator like timestamps in the system prompt.

How do I migrate Claude API code to a newer model version?▼

Update the model ID to an exact string like claude-opus-4-7 without date suffixes, replace budget_tokens with adaptive thinking, and remove assistant prefills which now return 400 errors. The skill's model-migration reference lists all breaking changes per version.

Which languages does the Anthropic SDK support?▼

Official SDKs exist for Python, TypeScript, Java, Go, Ruby, C#, and PHP, with cURL/raw HTTP as a fallback. Tool runner and Managed Agents beta support covers Python, TypeScript, Java, Go, Ruby, and PHP, but not C#.

Does Managed Agents work on Amazon Bedrock or Google Vertex AI?▼

No, Managed Agents is first-party only and unavailable on Bedrock, Vertex AI, or Microsoft Foundry. On third-party providers, use the Claude API with tool use for all agent workloads.

Why does extended thinking with budget_tokens return a 400 error?▼

Opus 4.7 fully removed budget_tokens along with temperature, top_p, and top_k, so only thinking type adaptive is accepted. On Opus 4.6 and Sonnet 4.6, budget_tokens is deprecated and adaptive thinking is the recommended replacement.