claude-api

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

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/ludotype/game-adventurertown --skill claude-api-ludotype
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/ludotype/game-adventurertown/tree/main/.agent/skills/claude-api
Command: npx skills add https://github.com/ludotype/game-adventurertown --skill claude-api-ludotype

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Claude API and Anthropic SDK code requires up-to-date knowledge of model IDs, SDK bindings, beta headers, and breaking changes across model versions. This Skill provides language-specific, verified guidance so you avoid guessing SDK signatures, using deprecated parameters like budget_tokens, or breaking prompt caching. ## Core Features & Use Cases - Multi-language SDK guidance: Language-detected documentation for Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL covering messages, streaming, tool use, structured outputs, batches, and the Files API. - Model migration: Step-by-step migration between Claude model versions (4.5 to 4.6, 4.6 to 4.7) and replacements for retired models, including breaking changes like adaptive thinking and removed prefills. - Prompt caching and agent design: Breakpoint placement, silent-invalidator audits, tool runner patterns, compaction, and Managed Agents setup for server-managed stateful agents. - Use Case: You inherit a Python project calling Claude Sonnet 4.5 with budget_tokens and want to upgrade to Opus 4.7. The Skill detects the language, reads the migration reference, and rewrites the code with adaptive thinking and the correct model ID. ## Quick Start Ask the assistant to add prompt caching to the Anthropic SDK code in your current Python file.

Frequently Asked Questions about claude-api

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

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

Read the shared/model-migration.md reference, which covers moving from 4.5 to 4.6 or 4.7 and replacing retired models. Key changes include switching budget_tokens to adaptive thinking and removing assistant prefills, which return 400 errors on Opus 4.6, 4.7, and Sonnet 4.6.

How do I add prompt caching to Anthropic SDK requests?▼

Set cache_control with type ephemeral on the last system text block, or use top-level auto-caching on messages.create. Keep stable content first in the prefix and verify hits via usage.cache_read_input_tokens; zero hits across requests indicates a silent invalidator.

Which Claude model should I use by default?▼

Use claude-opus-4-7 unless the user explicitly names another model. Use the exact model ID strings from the current models table without appending date suffixes, and query the Models API for live capability and context-window lookups.

Does the Anthropic SDK support tool use in Go and Java?▼

Yes, both SDKs support beta tool runners. Go provides BetaToolRunner in the toolrunner package with jsonschema struct tags, while Java uses annotated classes implementing Supplier with the BetaToolRunner helper.

Why does my Claude API request return a 400 error with budget_tokens?▼

Opus 4.7 fully removed budget_tokens, temperature, top_p, and top_k, so thinking type enabled with budget_tokens returns 400. Use thinking type adaptive instead; budget_tokens only remains as a transitional option on Opus 4.6 and Sonnet 4.6.

Can I use Managed Agents on Amazon Bedrock or Google Vertex AI?▼

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