claude-api

Document Claude API patterns for messages, streaming, tool use, and caching.

70|42|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/tranhieutt/software_development_department --skill claude-api-tranhieutt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/tranhieutt/software_development_department/tree/main/.claude/skills/claude-api
Command: npx skills add https://github.com/tranhieutt/software_development_department --skill claude-api-tranhieutt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modern Anthropic Claude integrations span messaging, streaming, tool use, vision, batching, and agent orchestration, so this Skill brings together those patterns so developers no longer need to hunt through fragmented guidance or risk flawed implementations.

Core Features & Use Cases

  • Comprehensive SDK Examples: Demonstrates Python and TypeScript client usage for basic messages, streaming, system prompts, and the Claude Agent SDK.
  • Operational Guidance: Captures model selection strategy, prompt caching, batch processing, cost-saving tactics, and error handling best practices to stabilize production workflows.
  • Use Case: Deploy a Claude-powered service that streams vision analysis results by following the tool definition, streaming loop, and response handling advice provided.

Quick Start

Use the claude-api skill to request a Python streaming example that calls Sonnet 4 and handles tool use feedback.

Frequently Asked Questions about claude-api

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

FAQPage Schema
How do I handle streaming responses and tool use with the Claude API?

To handle streaming responses and tool use with the Claude API, implement a streaming loop that processes tool definition feedback and manages message chunks. This Skill provides Python and TypeScript SDK examples for robust integration.

What is the best way to select between Sonnet and Opus models for Anthropic integrations?

Selecting between Sonnet and Opus models depends on your operational strategy for balancing performance and cost. This Skill provides model selection guidance to optimize your Anthropic integration based on specific application requirements.

Does the Claude API support vision analysis and extended thinking in production workflows?

Yes, the Claude API supports vision analysis and extended thinking. This Skill demonstrates how to deploy services that stream vision analysis results and handle complex agent workflows using Python and TypeScript SDKs.

How do I optimize Claude API costs using prompt caching and batch processing?

Optimize Claude API costs by applying prompt caching and batch processing APIs. This Skill outlines cost-saving tactics and operational best practices to stabilize production workflows and reduce overhead.

Why does my Claude API implementation fail during tool calls or when managing max_tokens?

Claude API implementations fail during tool calls when tool definitions are incomplete or max_tokens limits are mismanaged. This Skill covers error handling best practices and parameter management to ensure reliable responses.

Can I use the Claude Agent SDK to build robust applications with TypeScript and Python?

Yes, you can build robust applications using the Claude Agent SDK with both TypeScript and Python clients. This Skill provides comprehensive examples for system prompts, basic messaging, and agent orchestration.