AI Agents & SkillsOfficial · anthropics

Claude Api skill for Claude

The Claude api skills by anthropics: 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/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).

Claude Api SKILL.md

A preview of the skill file from anthropics/skills (Complete terms in LICENSE.txt).

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. (Exception: the prompt-audit subcommand is non-interactive and does not stop here - it records non-Anthropic provider markers in its report's stated assumptions and never proposes switching a non-Anthropic file to the Anthropic SDK.)

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 when the user explicitly asks for cURL/REST/raw HTTP, the project is a shell/cURL project, or the language has no official SDK.

Never mix the two - don't reach for requests/fetch in a Python or TypeScript project just because it feels lighter. Never fall back to OpenAI-compatible shims.

Never guess SDK usage. Function names, class names, namespaces, method signatures, and import paths must come from explicit documentation - either the {lang}/ files in this skill or the official SDK repositories or documentation links listed in shared/live-sources.md. If the binding you need is not explicitly documented in the skill files, WebFetch the relevant SDK repo from shared/live-sources.md before writing code. Do not infer Ruby/Java/Go/PHP/C# APIs from cURL shapes or from another language's SDK.

If WebFetch or repository access fails (network restricted, timeouts, clone blocked): do not keep retrying - write code from the patterns and namespace/package tables in the {lang}/ file, run the compiler or interpreter on it, and iterate on the error output. For statically-typed SDKs (C#, Java, Go) a compile-fix loop against local errors reaches working code faster than blocked network research.

Defaults

Unless the user requests otherwise:

Read the full SKILL.md on GitHub →

How to install the Claude api skills

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit anthropics/skills/skills/claude-api#main ~/.claude/skills/claude-api

Codex

npx degit anthropics/skills/skills/claude-api#main ~/.codex/skills/claude-api

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What is the Claude api skills?

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/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).

+How do I install Claude Api in Claude Code?

Copy the skill folder into ~/.claude/skills/claude-api, for example with "npx degit anthropics/skills/skills/claude-api#main ~/.claude/skills/claude-api". Claude Code loads it automatically and uses it when a task matches.

+Does Claude Api work with ChatGPT or Codex?

Yes. Claude Api uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/claude-api. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Claude Api free?

Claude Api is published on GitHub by anthropics under the Complete terms in LICENSE.txt license; check the license terms before using it.

Related ai agents & skills skills

  1. Grill Me

    A relentless interview to sharpen a plan or design.

    mattpocock/skills★ 327k
  2. Skill Creator

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    anthropics/skills★ 197k
  3. Caveman

    Terse caveman voice: answer first, fluff gone, every technical fact kept.

    JuliusBrussee/caveman★ 121k
  4. Prompt Optimizer

    Official

    Creates, optimizes, and iteratively refines agent prompts, system prompts, developer prompts, and reusable prompt templates.

    getsentry/skills★ 1.2k
  5. Llm Council Skill

    Run any question, idea, or decision through a council of 5 AI advisors who independently analyze it, peer-review each other anonymously,…

    tenfoldmarc/llm-council-skill★ 1.1k
  6. Promote

    Graduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement.

    alirezarezvani/claude-skills★ 30k
  7. Chief Of Staff

    Pursue a long-running goal in a single session by co-ordinating subagents.

    mattpocock/skills★ 327k
  8. Agents Md

    Official

    Creates and maintains concise AGENTS.md and CLAUDE.md project instruction files.

    getsentry/skills★ 1.2k
  9. Grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill'…

    mattpocock/skills★ 327k

See all ai agents & skills skills →

More skills from anthropics

  1. Webapp Testing

    Official

    Toolkit for interacting with and testing local web applications using Playwright.

    anthropics/skills★ 197k
  2. Brand Guidelines

    Official

    Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel.

    anthropics/skills★ 197k
  3. Algorithmic Art

    Official

    Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration.

    anthropics/skills★ 197k

All skills by anthropics →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.