Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK.
NewMaintained
Automatic
◆AI Engineer pack
Last verified 8/22/2026
What it changes
Passed 11 of 22 test cases with the skill, and 11 of 22 without it.
Without skill50%
With skill50%
Checks it passed that the model alone missed
The response specifies model 'claude-3-5-haiku-latest'.
The code calls client.messages.batches.create to submit the batch request.
2 fixed18 passed either way1 still failing1 broke
Pass-rate lift
0 pp
Tokens
+163%
Agent turns
0%
Response time
-21%
Model gemini-3.6-flashMeasured 8/22/2026v620 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
We need to run high-volume simple text sentiment classification on 500,000 short user comments. Latency and cost optimization are critical, while task complexity is minimal. Which Anthropic model identifier from the current model lineage should be chosen for this workload?
What was checked, without and with the skill
Checked
Without skill
With skill
The response specifies model 'claude-3-5-haiku-latest'.
Missed
Passed
case-10 · gemini-3.6-flash · 8/22/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md338 linessingle file
Claude API
Build applications with the Anthropic Claude API and SDKs.
When to Activate
Building applications that call the Claude API
Code imports anthropic (Python) or @anthropic-ai/sdk (TypeScript)
User asks about Claude API patterns, tool use, streaming, or vision
Implementing agent workflows with Claude Agent SDK
Optimizing API costs, token usage, or latency
Model Selection
Model
ID
Best For
Opus 4.1
claude-opus-4-1
Complex reasoning, architecture, research
Sonnet 4
claude-sonnet-4-0
Balanced coding, most development tasks
Haiku 3.5
claude-3-5-haiku-latest
Fast responses, high-volume, cost-sensitive
Default to Sonnet 4 unless the task requires deep reasoning (Opus) or speed/cost optimization (Haiku). For production, prefer pinned snapshot IDs over aliases.