- Home
- Skills
- Manutej
- Luxor Claude Marketplace
- Claude Sdk Integration Patterns
claude-sdk-integration-patterns_skill
- Shell
40
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns- README.md1.6 KB
- SKILL.md13.9 KB
Overview
This skill provides production-ready integration patterns for the Claude API and the TypeScript SDK, focused on streaming, tool execution, error handling, token optimization, and deployable implementations. It packages practical code patterns and architecture advice to build reliable, cost-efficient AI features in Node.js/TypeScript applications.
How this skill works
The skill documents concrete patterns for the Messages API, streaming response handling, tool (function) definitions and runners, batch requests, retry/backoff strategies, token counting, and context pruning. Each pattern includes when-to-use guidance and short code sketches that show initialization, streaming loops, tool validation, and error recovery for production use.
When to use it
- Adding Claude conversational features to Node.js/TypeScript apps
- Delivering real-time UX with streaming responses
- Creating AI agents that call external tools or APIs safely
- Handling high-volume or bulk tasks with message batching
- Deploying production-ready systems with retries, timeouts, and monitoring
Best practices
- Keep API keys in environment variables and never hardcode secrets
- Choose the model that matches task needs (Opus for complex reasoning, Sonnet for balance, Haiku for speed)
- Stream user-facing long outputs; avoid streaming for deterministic batch jobs
- Implement exponential backoff for 429s and sensible timeouts for network reliability
- Estimate tokens, set max_tokens, and prune or summarize old context to control costs
Example use cases
- Chatbots with multi-turn context management and streaming UI updates
- Agent workflows that validate inputs with Zod tools and run external APIs
- Bulk document summarization using message batching to reduce per-request cost
- Real-time code assistants that stream partial outputs and support user abort
- Customer support automation with robust retry and rate-limit handling
FAQ
Use exponential backoff, queue or throttle requests, and consider batching bulk work. Log 429 events and surface friendly retries to users when appropriate.
When is streaming not appropriate?
Avoid streaming for backend batch jobs, small synchronous calls, or when you require a single deterministic response before proceeding.