claude-api

Claude API

Claude API is Anthropic's open-source agent skill for code that calls Claude: current model IDs and prices, guides for seven SDK languages plus cURL, and guided migrations to newer models.

Checked by CookiesForAI on : license and last change of the skill re-read from GitHub; install tested on in Claude Code 2.1.286 and Codex CLI 0.160.0.

Written by

Install Claude API

Install only this skill with the skills CLI

Terminal
npx skills add anthropics/skills --skill claude-api

Or, in Claude Code, add Anthropic's skills marketplace

Agent chat
/plugin marketplace add anthropics/skills

Then install the claude-api plugin

Agent chat
/plugin install claude-api@anthropic-agent-skills

Install tested

On , we ran npx skills add anthropics/skills --skill claude-api -a claude-code codex --copy -y (skills CLI 1.7.1) in an empty project. It copied 92 files into each agent's skill folder (.claude/skills/claude-api and .agents/skills/claude-api), and Claude Code 2.1.286 and Codex CLI 0.160.0 then listed claude-api as an available skill.

Claude Code 2.1.286 also has a built-in claude-api skill, and it listed only one after the install; the two start with the same description, so this test could not tell which one it uses. Codex CLI 0.160.0 has no built-in skill of that name.

Or paste this into your coding agent: Install the agent skill claude-api from github.com/anthropics/skills. Checked by CookiesForAI on : license and last change of the skill re-read from GitHub; install tested on in Claude Code 2.1.286 and Codex CLI 0.160.0. A skill can include scripts that run on your computer, so read its source first.

What Claude API does

Claude API is Anthropic's reference skill for building applications on Claude. It loads when a prompt names Claude, Anthropic or a Claude model, when you ask about model choice, pricing or limits, or when a task is LLM-shaped and no provider is named. It skips projects that use another provider such as OpenAI or Gemini, and it will not add Anthropic SDK calls to a file written for one.

With Claude API loaded, the agent detects the project language (Python, TypeScript, Java, Go, Ruby, C#, PHP or cURL) and reads that language's bundled guides. It uses the official Anthropic SDK, uses raw HTTP only when asked, and takes function names from documentation instead of guessing. The skill carries a dated table of model IDs with prices, a table of API shapes that changed in 2025 and 2026, and quick references for thinking, caching, streaming, tool use and Managed Agents.

The Claude API skill also runs named workflows through /claude-api subcommands: migrate (move code to a newer model), upgrade (the Python SDK from 0.x to 1.x), prompt-audit (find dated patterns in prompts and CLAUDE.md files), cost-optimize, build-eval, hillclimb (improve an app against an eval), preserved-thinking-migration and managed-agents-onboard. The cost and eval workflows ask for your approval before they spend money on model calls.

When to use Claude API

  • You are adding a Claude call to an app and want current model IDs and SDK code, not patterns from old training data.
  • You need to move existing code to a newer Claude model.
  • Your Claude API bill is high and you want the agent to look for savings such as caching and batching.
  • You are choosing between a single API call, tool use and Managed Agents for an agent you are building.

When to pick something else

  • Your project calls OpenAI, Gemini or another provider: the skill stands down when it finds one.
  • You want to give an agent tools through MCP rather than call the API: use MCP Builder.

Which agents Claude API works in

Anthropic documents Claude API for Claude Code, Claude API. The open skills CLI also installs it into 78 agents, including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode (we listed it with the CLI on ). See where each agent looks for skills.

Its named workflows start as /claude-api <subcommand>, the slash command form Claude Code gives skills; the SKILL.md also accepts the bare subcommand as the request, which works in agents without slash commands. It asks for your language with Claude Code's AskUserQuestion tool and falls back to Python where that tool is missing.

We also list this company's other pages: Claude Code coding tool.

Claude API license

Claude API is published under Apache-2.0. Apache-2.0 comes from the LICENSE.txt in the skill's own folder (read ); the anthropics/skills repository has no root license file. In practice you may use, change and share the skill in any agent, commercially too, as long as you keep the license text and notices and mark your changes.

More from Anthropic

Lists that include claude-api