claude-api

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

Updated May 23, 2026
One-click install
npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill claude-api-kiranimmadi2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/kiranimmadi2/promptforge-ai/tree/main/anthropic-skills/skills/claude-api
Command: npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill claude-api-kiranimmadi2

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 across eight languages, beta headers, and features like prompt caching, adaptive thinking, tool use, and Managed Agents. This Skill provides language-specific, verified guidance so generated code uses the right SDK calls, model strings, and parameters instead of guessed or outdated APIs. ## 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 migration paths between Claude model versions. - Managed Agents support: Covers the server-managed stateful agent surface, including agent/session lifecycle, beta headers, onboarding interviews, and client patterns. - 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 a Claude API request?

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

Which Claude model should I use in the Anthropic SDK?

Default to claude-opus-4-7 unless the user explicitly names another model such as Sonnet or Haiku. Use exact model ID strings from the current models table without appending date suffixes.

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

Yes, both SDKs support beta tool runners: Go uses BetaToolRunner in the toolrunner package with jsonschema struct tags, and Java uses annotated classes implementing Supplier with BetaToolRunner. C# currently lacks tool runner support.

Can I use Managed Agents on Amazon Bedrock or 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 budget_tokens return a 400 error on Opus 4.7?

Opus 4.7 removes fixed-budget thinking entirely along with temperature, top_p, and top_k. Use thinking with type adaptive instead; budget_tokens is only a transitional option on Opus 4.6 and Sonnet 4.6.

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

Read the shared model-migration reference, confirm the migration scope with the user before editing, and translate deprecated patterns like budget_tokens and assistant prefills to adaptive thinking and structured outputs.