claude-api

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

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/quangtuyennguyen/loan-application-workflow --skill claude-api-quangtuyennguyen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/quangtuyennguyen/loan-application-workflow/tree/main/.claude/skills/claude-api
Command: npx skills add https://github.com/quangtuyennguyen/loan-application-workflow --skill claude-api-quangtuyennguyen

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, which is easy to get wrong from memory alone. ## Core Features & Use Cases - Multi-language SDK guidance: Language-specific references for Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL covering messages, streaming, tool use, thinking, prompt caching, batches, and the Files API. - Feature implementation: Covers prompt caching, adaptive thinking, effort, compaction, structured outputs, server-side tools, and Managed Agents with correct beta headers and parameters. - Model migration: Handles migrating existing Claude API code between model versions (e.g., 4.5 to 4.6 to 4.7) and replacing retired models, including breaking changes like removed budget_tokens and prefills. - Use Case: A developer asks to add prompt caching to an existing TypeScript Anthropic SDK project; the skill detects the language, reads the TypeScript references, and produces code with correct cache_control breakpoints and verification via usage metrics. ## 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 block of your system prompt 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 in the response.

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

Update the model ID to the exact string for the new version and apply the breaking-change rules: Opus 4.7 requires adaptive thinking only, removes budget_tokens, temperature, top_p, top_k, and assistant prefills. The skill's model-migration reference lists each change.

Which languages does the Anthropic SDK support?▼

Official SDKs exist for Python, TypeScript, Java, Go, Ruby, C#, and PHP, with Kotlin and Scala using the Java SDK. Unsupported languages can use raw HTTP against the REST API, and tool runner support varies by language.

Why is my prompt cache hit rate zero?▼

A silent invalidator is breaking the prefix match, such as timestamps in the system prompt, unsorted JSON, or a varying tool set. Any byte change in the prefix invalidates everything after it, and prefixes under roughly 1024 tokens never cache.

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.

When should I use budget_tokens for extended thinking?▼

Only for older models like Sonnet 4.5 when explicitly requested, with budget_tokens below max_tokens and at least 1024. For Opus 4.6, 4.7, and Sonnet 4.6, use adaptive thinking instead since fixed budgets are deprecated or removed.