Skip to content
Skill

claude-api

by anthropics

AI Summary

This skill guides developers in building LLM-powered applications using Claude and Anthropic SDKs, with smart triggering based on API imports and user intent. Ideal for developers looking to integrate Claude into their projects with language-specific best practices.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "claude-api" skill in my project.

Please run this command in my terminal:
# Install skill into your project (23 files)
mkdir -p .claude/skills/claude-api && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/SKILL.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/SKILL.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/LICENSE.txt "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/LICENSE.txt" && mkdir -p .claude/skills/claude-api/csharp && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/csharp/claude-api.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/csharp/claude-api.md" && mkdir -p .claude/skills/claude-api/curl && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/curl/examples.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/curl/examples.md" && mkdir -p .claude/skills/claude-api/curl && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/curl/managed-agents.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/curl/managed-agents.md" && mkdir -p .claude/skills/claude-api/go && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/go/claude-api.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/go/claude-api.md" && mkdir -p .claude/skills/claude-api/java && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/java/claude-api.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/java/claude-api.md" && mkdir -p .claude/skills/claude-api/php && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/php/claude-api.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/php/claude-api.md" && mkdir -p .claude/skills/claude-api/ruby && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/ruby/claude-api.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/ruby/claude-api.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/agent-design.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/agent-design.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/error-codes.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/error-codes.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/live-sources.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/live-sources.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-api-reference.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-api-reference.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-client-patterns.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-client-patterns.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-core.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-core.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-environments.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-environments.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-events.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-events.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-onboarding.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-onboarding.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-overview.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-overview.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/managed-agents-tools.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-tools.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/models.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/models.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/prompt-caching.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/prompt-caching.md" && mkdir -p .claude/skills/claude-api/shared && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/claude-api/shared/tool-use-concepts.md "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/tool-use-concepts.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks to use the Claude API, Anthropic SDKs, or Managed Agents (/v1/agents, /v1/sessions, /v1/environments). DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.

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: • 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. • 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.

Defaults

Unless the user requests otherwise: For the Claude model version, please use Claude Opus 4.6, which you can access via the exact model string claude-opus-4-6. Please default to using adaptive thinking (thinking: {type: "adaptive"}) for anything remotely complicated. And finally, please default to streaming for any request that may involve long input, long output, or high max_tokens — it prevents hitting request timeouts. Use the SDK's .get_final_message() / .finalMessage() helper to get the complete response if you don't need to handle individual stream events ---

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 7d ago
Active
Adoption1K+ stars on GitHub
117.3k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars117.3k
Forks13.5k
Issues693
Updated7d ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code