Agent skill · Databases

claude-api

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent

Anthropic33,591★ · +352/wk · 2 repos on radarProfile →
claude-code
Install
npx skills add anthropics/skills --skill claude-api --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 66
SKILL.md size: 69 KB
Bundled scripts: none
Path: skills/claude-api/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 166,205
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

The skill provides a Claude/Anthropic API reference covering model IDs, pricing, params, streaming, tool use, MCP, agents, caching, token counting, and model migration. It guides when to trigger based on prompts naming Claude/Anthropic in any form and on questions about LLMs (pricing/model choice/limits/caching). It also handles routing decisions for Claude/Anthropic SDK code generation and content creation according to the provider context and project language.

How it works

  • Before You Start: scans the target file or project for non-Anthropic provider markers and instructs to switch to Claude/Anthropic SDK code if needed; otherwise, it tells whether to switch implementation.
  • Output Requirement: when adding or implementing a Claude feature, it must call Claude through one of:
    1. The official Anthropic SDK for the project's language, or 2. Raw HTTP (curl/requests/fetch/httpx) only if explicitly requested or no SDK exists.
  • Defaults: uses Claude Opus 5 with adaptive thinking for complex tasks and streaming for long input/output; uses .get_final_message() / .finalMessage() to get the complete response when streaming isn't needed.
  • API Drift section: notes current API shapes and how patterns may drift, with examples shown for thinking, web search, PHP parameters, and managed agents credentials.
  • Subcommands: includes a migrate subcommand with steps to migrate Claude API code per guidance in shared/model-migration.md.
  • Language Detection: provides guidance to infer language from project files and choose Python/TypeScript/etc. examples accordingly.
  • Surfaces and four approaches: describes Claude API manual loop, Tool Runner, Managed Agents, and Claude Agent SDK as distinct harness/deployment models; clarifies tool use and when each is appropriate.

When to use it

Triggered when prompts mention Claude/Anthropic forms (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, anthropic, @anthropic-ai, claude-, us.anthropic., [1m]) and the user asks about an LLM (pricing/model limits/caching). It also triggers when the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge, etc.). When the user wants Claude-based code paths or Claude SDK specifics, this skill activates to generate Claude-centric implementations rather than OpenAI-based paths.

What it can touch

The skill prescribes calling Claude via:

  • The official Anthropic SDK for the project language (e.g., anthropic, @anthropic-ai/sdk, com.anthropic.*).
  • Raw HTTP via curl/requests/fetch/httpx, but only when explicitly requested or when the language has no official SDK. It also references patterns for streaming, adaptive thinking, and final message retrieval, and it mentions specific SDK behaviors (tool_runner, beta_tool, etc.) in the broader guidance.

Caveats

  • License terms reside in LICENSE.txt.
  • The skill includes explicit triggers and conditions that constrain content based on provider mentions and user questions about Claude/Anthropic APIs.
  • It emphasizes not guessing SDK usage and to WebFetch or consult shared live sources if necessary to ensure up-to-date API shapes.
From the SKILL.md

# Building LLM-Powered Applications with Claude This skill helps you build LLM-powered applications with Claude. Choose the right surface based on your needs, detect the project language, then read the relevant language-specific documentation. ## Before You Start Scan the target file (or, if no target file, the prompt and project) for non-Anthropic provider markers — `import openai`, `from openai`, `langchain_openai`, `OpenAI(`, `gpt-4`, `gpt-5`, file names like `agent-openai.py` or `*-generic.py`, or any explicit instruction to keep the code provider-neutral. If you find any, stop and tell the user that this skill produces Claude/Anthropic SDK code; ask whether they want to switch the file to Claude or want a non-Claude implementation. Do not edit a non-Anthropic file with Anthropic SDK calls. ## Output Requirement When the user asks you to add, modify, or implement a Claude feature, your code must call Claude through one of: 1. **The official Anthropic SDK** for the project's language (`anthropic`, `@anthropic-ai/sdk`, `com.anthropic.*`, etc.). This is the default whenever a supported SDK exists for the project. 2. **Raw HTTP** (`curl`, `requests`, `fetch`, `httpx`, etc.) — only

What's inside
Steps it walks through
  1. Before You Start
  2. Output Requirement
  3. Defaults
  4. ⚠️ API Drift — Your Training Prior May Be Stale
  5. Subcommands
  6. Language Detection
  7. Language-Specific Feature Support
  8. Which Surface Should I Use?
  9. Building an Agent: Four Approaches
  10. Should I Build an Agent?
  11. Architecture
  12. Current Models (cached: 2026-06-24)
  13. Claude Fable 5 (claude-fable-5) — most capable widely released model
  14. Authentication (Quick Reference)
Ships with 24 files
  • LICENSE.txt
  • csharp/claude-api/README.md
  • csharp/claude-api/batches.md
  • csharp/claude-api/files-api.md
  • csharp/claude-api/streaming.md
  • csharp/claude-api/tool-use.md
  • curl/examples.md
  • curl/managed-agents.md
  • go/claude-api/README.md
  • go/claude-api/files-api.md
  • go/claude-api/streaming.md
  • go/claude-api/tool-use.md
  • go/managed-agents/README.md
  • java/claude-api/README.md
  • java/claude-api/files-api.md
  • java/claude-api/streaming.md
  • java/claude-api/tool-use.md
  • java/managed-agents/README.md
  • php/claude-api/README.md
  • php/claude-api/batches.md
  • php/claude-api/files-api.md
  • php/claude-api/streaming.md
  • php/claude-api/tool-use.md
  • php/managed-agents/README.md
first 24 of 66
More from skills
All skills →
About this skill
What does the claude-api skill do?

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent

How do I install it?

Run `npx skills add anthropics/skills --skill claude-api --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From anthropics/skills, a repository with 166,205 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going