Skip to main content
Agent skill

Claude Api

Up-to-date Claude API reference for model IDs, tool use, MCP, prompt caching, streaming, and SDK patterns so an agent stops guessing against stale docs.

Get started

Get the complete skill folder, including its scripts and reference files.

·

When to use this skill

Use Claude API when writing or reviewing code that calls Anthropic models — model IDs, tool use, batching, caching. It is the lookup skill, not a product tutorial.

When not to use it

If you are authoring a SKILL.md, use Skill Creator / Writing Skills. If you need an MCP server, use MCP Builder. This skill will not install Claude Code for you.

How to install

Where will you use it?

Install the publisher’s plugin

This installs a bundle that can include other skills. Choose this method or the manual alternative below; you only need one installation.

  1. Run these commands in Claude Code:

    Claude Code CLI
    /plugin marketplace add anthropics/skills
    /plugin install example-skills@anthropic-agent-skills
  2. Ask Claude Code to use Claude Api on a small task and confirm that it loads. Check the setup requirements in the publisher’s guide if it cannot run.
Alternative: install the folder manually

Use these steps if you choose the manual folder method. If you installed the plugin above, skip this alternative.

  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/claude-api/SKILL.md. For a shared project, commit the folder at .claude/skills/claude-api/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Claude Api skill for this task: Pick the right model ID for a batch job. Confirm any required inputs or files before making changes.

What supports this recommendation?

86/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
87/100
Practical detail
92/100
Source evidence
70/100
Source signals
94/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptinferred

    The skill text mentions ChatGPT or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • geminiinferred

    The skill text mentions Gemini or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • copilotinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • llamainferred

    The skill text mentions Llama or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • perplexityinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

  • mistralinferred

    The skill text mentions Mistral or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • grokinferred

    The skill uses model-agnostic prompt or LLM terminology. Portability is inferred and has not been verified on this model.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

API drift is the usual failure: a blog post names a model that no longer exists. This skill keeps the agent on current IDs, headers, and tool-use shapes.

Intended uses

  • Pick the right model ID for a batch job
  • Wire tool use without copying an outdated gist
  • Debug a 400 from the Messages API

Implementation notes

  • Always confirm the model ID against this skill, not memory.
  • Prefer official SDK types over hand-rolled JSON.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.