Implements production-grade patterns for the official Anthropic TypeScript SDK including Messages API, streaming, and tool use.
This skill provides standardized patterns and best practices for integrating the official Anthropic TypeScript/Node.js SDK into Claude Code projects. It covers everything from basic client configuration and the Messages API to advanced features like extended thinking, prompt caching, vision capabilities, and the Batch API. By enforcing strict adherence to mandatory token limits, robust error handling via Anthropic's specific error classes, and correct content block iteration, it ensures resilient and efficient interactions with Claude models while avoiding common implementation pitfalls like hardcoded keys or silent truncation.
主な機能
01Advanced event-based streaming and raw SSE iteration patterns
02Support for Vision, PDF processing, and Extended Thinking reasoning blocks
03Type-safe Tool Use (function calling) and conversation loop management
045 GitHub stars
05Standardized Messages API setup for single and multi-turn conversations
06Production-ready error handling, automatic retries, and token counting
ユースケース
01Implementing structured data extraction using Zod schema validation
02Optimizing high-volume workflows with prompt caching and the Batch API
03Building LLM-powered applications using Claude Sonnet, Opus, or Haiku models