claude-api

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

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill claude-api-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/claude-api
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill claude-api-cyrus-pinto

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, pricing, streaming, tool use, caching, and platform differences that training data often gets wrong. This Skill supplies current, language-specific reference documentation so generated code matches the real API surface instead of stale patterns. ## Core Features & Use Cases - Multi-language SDK guidance: Language detection routes to dedicated references for Python, TypeScript, Java, Go, Ruby, C#, PHP, and raw HTTP/cURL, covering messages, streaming, tool use, structured outputs, and token counting. - Operational subcommands: Built-in workflows for migrate (move code to a newer Claude model), prompt-audit (find dated prompt patterns), upgrade (Python SDK 0.x to 1.x), and cost-optimize (reduce spend per completed task). - Platform and agent coverage: Documents Managed Agents, the Tool Runner, MCP, prompt caching, the Admin API, the ant CLI, and per-platform availability across first-party API, Claude Platform on AWS, Bedrock, Vertex AI, and Foundry. - Use Case: A developer asks to add streaming tool use to a TypeScript service; the Skill detects the language, supplies the current @anthropic-ai/sdk patterns with the correct model ID, and avoids deprecated parameters like budget_tokens on newer models. ## Quick Start Ask the assistant to add a streaming Claude API call with tool use to your project file, and it will detect the language and generate current Anthropic SDK code.

Frequently Asked Questions about claude-api

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

FAQPage Schema
How do I add Claude API streaming to my Python or TypeScript project?

Use the official Anthropic SDK for your language and enable streaming for requests with long input or high max_tokens. The Skill detects your project language from files like pyproject.toml or package.json and provides the current SDK pattern, including the .get_final_message() helper for complete responses.

How do I migrate existing Claude code to a newer model?

Invoke the migrate subcommand, which reads the model-migration guide and applies per-target breaking changes in order. It also audits prompt text and tool descriptions written for the source model, since dated prompting is part of every migration.

Which Claude model should I use by default?

The Skill defaults to claude-opus-5 with adaptive thinking unless you explicitly name another model. Model IDs must be copied exactly from the current models table without date suffixes, and older model IDs are resolved through the models reference file.

Does the Anthropic SDK work on AWS Bedrock, Vertex AI, or Foundry?

Yes, but feature availability differs per platform and is tracked in a dedicated platform-availability reference. Claude Platform on AWS offers same-day API parity with SigV4 authentication, while Bedrock and Vertex AI are partner-operated with separate pricing and feature subsets.

How can I reduce Claude API costs without hurting output quality?

Use the cost-optimize subcommand, which profiles token usage via the Usage and Cost Admin API or application logs, then ranks savings levers. Free wins like prompt caching and batch processing come first, followed by tradeoff levers such as effort levels and model choice validated against an eval.

When should I use Managed Agents versus the Tool Runner?

Managed Agents fits when you want Anthropic to run the agent loop and host a per-session sandbox with persisted, versioned configs. The Tool Runner is harness-only: it automates the tool-call loop for tools you define, but you host and deploy everything yourself.