Kipt

Claude API skill: Anthropic's reference skill for building with Claude

The claude api skill gives your agent current Claude API and SDK reference for seven languages plus cURL, and workflows like migrate. How to install and use it.

By the Kipt team · Updated 24 October 2026

Source: anthropics/skills · Maintainer: Anthropic · License: Apache 2.0 · Checked: 24 October 2026

What is the claude-api skill?

The claude-api skill is Anthropic's reference pack for building apps on the Claude API: it tells your coding agent which model ID, parameters and SDK calls are current, and makes it read documented SDK usage before it writes code. It is for developers adding Claude to an app, migrating to a newer model, or cutting API costs, in seven SDK languages or raw cURL.

Its SKILL.md description opens with "Reference for the Claude API / Anthropic SDK" and lists what it covers: model IDs, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and model migration. The rest of the description is a detailed trigger rule: load it when a prompt names Claude or Anthropic, when you ask about LLM pricing or limits, or when an LLM-shaped task doesn't name a provider, and skip it when another provider such as OpenAI or Gemini is in use.

The same skill ships inside Claude Code. The Claude Code skills docs say: "The bundled /claude-api skill loads Claude API and Managed Agents reference material for your project's language. Claude also activates it automatically when your code imports anthropic or @anthropic-ai/sdk." Its skills.sh page listed 74.2K installs (snapshot, 24 October 2026).

What does the claude-api skill do?

What rules does it give the agent?

  • Check the provider first. The agent scans the target file for markers like import openai, langchain_openai or gpt-5. If it finds any, it stops and asks whether to switch to Claude.
  • Use the official SDK. Code must call Claude through the Anthropic SDK for the project's language. Raw HTTP is allowed only if you ask for it, the project is shell or cURL based, or the language has no official SDK. It never falls back to OpenAI-compatible shims.
  • Never guess SDK usage. Function names, classes and import paths must come from the skill's language files or the official SDK repos listed in shared/live-sources.md.
  • Sensible defaults. Unless you say otherwise, it uses Claude Opus 5.5 (claude-opus-5-5), adaptive thinking for anything complex, and streaming for long inputs or outputs.
  • Watch for API drift. A table lists patterns that changed in 2025 and 2026, such as budget_tokens giving way to thinking: {type: "adaptive"} on newer models.

Claude Opus 5.5 is also the model Anthropic's models overview suggests starting with for most workloads.

How does it choose a language and an approach?

It detects the language from project files (pyproject.toml, package.json, go.mod, *.csproj and so on) and reads only that language's folder. A "Which Surface Should I Use?" table steers you to the simplest option: a single API call for classification or extraction, tool use for workflows you orchestrate, and Managed Agents when you want Anthropic to run the agent loop and host the sandbox.

What subcommands does it have?

You can type a subcommand after the skill name, such as /claude-api migrate. The GitHub copy defines:

Subcommand What it does
migrate Moves existing Claude API code to a newer model, confirming scope first
upgrade Moves the SDK across a major version, currently Python anthropic 0.x to 1.x
prompt-audit Flags prompt and skill text written for older models
cost-optimize Profiles spend and proposes savings one change at a time
build-eval Interviews you to build an eval set for your app
hillclimb Improves your app against an existing eval
preserved-thinking-migration Finds edits that invalidate preserved thinking blocks
managed-agents-onboard Walks you through creating a Managed Agent, from scratch, a quickstart template or a URL

The Claude Code docs list two more for the bundled version, api-version and managed-agents-secure, which the GitHub copy did not include when checked.

What is in the folder?

  • SKILL.md: about 105 KB of routing, defaults, quick references and pitfalls.
  • python/, typescript/, java/, go/, ruby/, php/: each has a claude-api/ folder (README, tool use, streaming and more) and a managed-agents/ folder.
  • csharp/: a claude-api/ folder.
  • curl/: examples.md and managed-agents.md.
  • shared/: language-neutral docs such as models.md, prompt-caching.md, tool-use-concepts.md, error-codes.md, model-migration.md, cost-optimization.md and the Managed Agents guides.
  • LICENSE.txt: Apache License 2.0.

How do you install the claude-api skill?

Claude Code. It is bundled, so start by checking whether /claude-api already works. The Claude Code docs list the minimum Claude Code version for each subcommand.

Claude Code plugin. The repo's marketplace file lists claude-api as its own plugin, separate from example-skills. Add the marketplace as the repo README shows, then install the plugin by name in the plugin@marketplace form from the Claude Code plugin docs:

/plugin marketplace add anthropics/skills
/plugin install claude-api@anthropic-agent-skills

Other agents, or an editable copy. The command on skills.sh:

npx skills add https://github.com/anthropics/skills --skill claude-api

Add -g for all projects. In Claude Code, a personal copy lives at ~/.claude/skills/claude-api/. Codex and Cursor read the same SKILL.md format; see Codex skills and Cursor skills.

How do you use it?

Mention Claude or Anthropic, or just open a file that imports the SDK. Name the language if the project has several.

Example prompts (suggestions, not from the repo):

  • Add a Claude-powered summary endpoint to this FastAPI app. Stream the response.
  • /claude-api migrate (then name the files and the target model when asked)
  • Build a TypeScript agent loop with two tools: search_orders and refund_order.
  • /claude-api cost-optimize on a project that already calls the API
  • Which Claude model should I use for high-volume classification, and what does it cost?

What do you need?

The Anthropic SDK for your language and credentials. The skill reads ANTHROPIC_API_KEY or an ant CLI profile from ant auth login, and tells the agent to run ant auth status before asking you for a key. The skill itself costs nothing; API calls are billed by Anthropic.

Tips and limits

  • A local copy can shadow the bundled one. The Claude Code docs say a personal or project skill with the same name as a bundled skill replaces the bundled command. A copy installed with npx skills add into ~/.claude/skills/claude-api/ can therefore fall behind the version Claude Code updates for you. A plugin install is namespaced as /claude-api:claude-api, so it does not take over the /claude-api name.
  • Prices in the skill are cached. Its model table is marked as cached on 6 October 2026. For live numbers, check Anthropic's pricing page, or let the skill query the Models API for capabilities, which it suggests.
  • It is opinionated about models. It defaults to Opus 5.5 and does not downgrade for cost on its own. Name a model explicitly if you want a different one.
  • It fetches documentation. When a binding isn't in its files, the agent fetches the official SDK repos. In a locked-down network, the skill says to write from its patterns and iterate on compiler errors instead.
  • Audit and license. On 24 October 2026, skills.sh showed Pass from Gen Agent Trust Hub, Socket and Snyk. The folder is Apache 2.0, so you can copy and adapt it with the license notice.

Save it in your Kipt library

Most people should keep using the bundled version in Claude Code. If you want a pinned copy for Codex, Cursor or a team repo, open Skills in Kipt and paste https://github.com/anthropics/skills/tree/main/skills/claude-api into the import box; Kipt brings in the SKILL.md and its language folders. Kipt stores skills in your own private GitHub repo and installs them into Claude Code or Codex with one command:

npx skills add https://github.com/<you>/<repo>.git --all -g

Kipt is not affiliated with Anthropic.

Similar skills

Questions

What is the claude-api skill?

claude-api is Anthropic's Agent Skill for writing code against the Claude API and Anthropic SDKs. It holds current reference for model IDs, parameters, streaming, tool use, prompt caching, Managed Agents and model migration, organized by language, so the agent reads documented SDK usage instead of answering from memory.

Do I need to install the claude-api skill in Claude Code?

Usually not. The Claude Code docs list /claude-api as a bundled skill and say Claude activates it automatically when your code imports anthropic or @anthropic-ai/sdk. Installing the GitHub copy is mainly useful for other agents such as Codex or Cursor, or when you want an editable version.

What subcommands does the claude-api skill have?

The GitHub copy defines migrate, upgrade, prompt-audit, cost-optimize, build-eval, hillclimb, preserved-thinking-migration and managed-agents-onboard. You type them after the skill name, for example /claude-api migrate. The Claude Code docs list each subcommand with the minimum Claude Code version that includes it.

Which programming languages does the claude-api skill cover?

It has folders for Python, TypeScript, Java, Go, Ruby, C# and PHP, plus cURL for raw HTTP. JavaScript uses the TypeScript files, and Kotlin and Scala use the Java files. For other languages it suggests cURL examples and notes that community SDKs may exist.

Will the claude-api skill rewrite my OpenAI code?

No. Before editing, it scans for non-Anthropic provider markers such as import openai or langchain_openai. If it finds them, it stops and asks whether you want to switch the file to Claude or keep a non-Claude implementation.

More in Skill directory

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.