claude-api

Generates and migrates Claude API and Anthropic SDK code across eight languages.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill claude-api-prabaljainn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/prabaljainn/my-claude-code-setup/tree/main/claude/skills/claude-api
Command: npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill claude-api-prabaljainn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing code against the Claude API from memory leads to stale model IDs, deprecated parameters, and wrong SDK usage. This Skill provides an authoritative, current reference for the Claude API and Anthropic SDKs so generated code uses correct model strings, thinking configurations, streaming patterns, tool use, and error handling. ## Core Features & Use Cases - Multi-language SDK guidance: Language detection routes to per-language documentation for Python, TypeScript, Java, Go, Ruby, C#, PHP, and raw cURL/HTTP. - Current API surface: Covers model IDs and pricing, adaptive thinking and effort, streaming, tool use and the Tool Runner, Managed Agents, prompt caching, token counting, structured outputs, and refusal fallbacks. - Migration and audit subcommands: /claude-api migrate upgrades existing code to newer models following a breaking-changes checklist; /claude-api prompt-audit scans prompts and tool descriptions for patterns written for older models. - Use Case: A developer asks to add streaming tool use to a Python backend. The Skill detects Python, reads the python/ reference, and emits code using the official anthropic SDK with claude-opus-5, adaptive thinking, and typed exception handling. ## Quick Start Ask the assistant to write a streaming Claude API call with tool use in your project's language, or run /claude-api migrate to upgrade existing code to a newer model.

Frequently Asked Questions about claude-api

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

FAQPage Schema
How do I write a streaming Claude API request in Python?▼

Use the official anthropic Python SDK with client.messages.stream() and the get_final_message() helper to collect the complete response. Streaming is recommended for long inputs, long outputs, or high max_tokens values to avoid request timeouts.

What is the correct model ID for the latest Claude model?▼

Use exact strings from the models table, such as claude-opus-5 or claude-sonnet-5, with no date suffixes. The Skill defaults to claude-opus-5 unless the user explicitly names another model.

Why does my extended thinking request return a 400 error?▼

On Claude Opus 5, Fable 5, and Opus 4.8/4.7, the budget_tokens parameter was removed and returns a 400. Use thinking with type adaptive instead; budget_tokens only works on Opus 4.6 and earlier models.

Does the Anthropic SDK work without an ANTHROPIC_API_KEY set?▼

Yes. After running ant auth login, the SDKs resolve the stored OAuth profile automatically, so a bare Anthropic() constructor works. Check ant auth status to see which credential source is active before asking for a key.

Tool Runner vs Claude Agent SDK — which should I use?▼

The Tool Runner is part of the regular Anthropic SDK and loops over tools you define, while the Claude Agent SDK is Claude Code packaged as a library with built-in file, bash, and web tools. Both are harness-only; Managed Agents is the only option that also hosts deployment.

Can I use this Skill for OpenAI or other provider code?▼

No. The Skill explicitly skips when another provider such as OpenAI, Gemini, Mistral, or Ollama is named or detected in the project, and it never emits OpenAI-compatible shims.