claude-sdk-integration-patterns — Claude Code skill: Claude Code API
A skill with ready patterns for the Claude API and TypeScript SDK: streaming, tool use, error handling, token savings.
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a claude-codeWhat claude-sdk-integration-patterns does
This skill collects working examples of wiring the Claude API into Node.js and TypeScript apps. Inside are the Messages API, streaming responses, tool use with Zod, error handling and token optimization. Every pattern carries a note on when to reach for it: a plain question-answer call, a multi-turn conversation, a live UI that renders partial output.
Tooling gets its own section. You define a schema with betaZodTool, let toolRunner execute the calls automatically, and stream several tools in sequence. Cancellation is covered too — stream.abort() plus catching Anthropic.APIUserAbortError when the user closes the window or a timeout fires.
You need an ANTHROPIC_API_KEY and the @anthropic-ai/sdk package. The patterns target your own application rather than Claude itself, so a project without Node.js and TypeScript gets nothing from it. Worth checking your stack before installing.
What it helps with
- connect the Claude API to a Node.js app
- stream model output into a chat UI
- define a tool schema with Zod
- handle an aborted stream or a request timeout
- cut token spend in a multi-turn conversation
Example prompts for the agent
- show me the Claude API streaming pattern for TypeScript
- how do I define a tool with betaZodTool and run toolRunner
- add error handling and stream abort to my messages.create call
How to install claude-sdk-integration-patterns
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a claude-code2Manually: put the files in place
~/.claude/skills/claude-sdk-integration-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/claude-sdk-integration-patterns/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a codex2Manually: put the files in place
.agents/skills/claude-sdk-integration-patterns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a cursor2Manually: put the files in place
.cursor/skills/claude-sdk-integration-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manutej/luxor-claude-marketplace claude-sdk-integration-patterns2Manually: put the files in place
.github/skills/claude-sdk-integration-patterns/SKILL.md1Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a gemini-cli2Platform CLI
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-ai-integration/skills/claude-sdk-integration-patternsManually: put the files in place
.devin/skills/claude-sdk-integration-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about claude-sdk-integration-patterns
How do I install claude-sdk-integration-patterns in Claude?
Run npx skills add manutej/luxor-claude-marketplace --skill claude-sdk-integration-patterns -a claude-code. The skill lands in ~/.claude/skills/claude-sdk-integration-patterns/SKILL.md.
What does claude-sdk-integration-patterns do?
It provides integration patterns for the Claude API and TypeScript SDK: Messages API, streaming, tool execution, error handling and token optimization.
What do I need before using it?
An ANTHROPIC_API_KEY and the @anthropic-ai/sdk package. The examples are written in TypeScript for Node.js.