Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK.
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 8/15/2026
What it changes
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill100%
Checks it passed that the model alone missed
Uses model identifier claude-opus-4-1
Uses model identifier claude-sonnet-4-0
Uses model identifier claude-3-5-haiku-latest
5 fixed17 passed either way0 still failing0 broke
Pass-rate lift
+23 pp
Tokens
+134%
Agent turns
0%
Response time
-19%
Model gemini-3.6-flashMeasured 8/15/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
I am designing a Python script to perform deep multi-step formal logic reasoning and system architecture analysis using the Anthropic SDK. I want to hardcode the snapshot model string best suited for complex reasoning rather than general coding tasks. Which model identifier should be assigned to the model parameter?
What was checked, without and with the skill
Checked
Without skill
With skill
Uses model identifier claude-opus-4-1
Missed
Passed
case-07 · gemini-3.6-flash · 8/15/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md331 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.