Platforms · 7 min read

Using Skills on claude.ai, the Claude API, and the Agent SDK

How Agent Skills work outside Claude Code: zip uploads on claude.ai, the /v1/skills API with code execution, the Agent SDK, and what stays portable.

Agent Skills use one open format, a folder with a SKILL.md, across Claude Code, claude.ai, the Claude API, and the Claude Agent SDK, but each surface installs and runs them differently. On claude.ai you upload the skill as a zip in Settings; on the Claude API you reference skills by skill_id in the container parameter alongside the code execution tool, and upload custom ones to /v1/skills; in the Agent SDK you load them from the filesystem with settingSources. Nothing syncs between surfaces, so a skill installed in one place must be installed separately in each of the others.

This guide covers each surface and what to change so one skill works everywhere.

How do skills differ across Claude surfaces?

Claude Codeclaude.aiClaude APIAgent SDK
How you installFolder in ~/.claude/skills or .claude/skillsUpload a zip in SettingsPre-built by skill_id; custom via /v1/skillsFilesystem, same as Claude Code
Who sees itYou, or the repoOnly your accountThe whole workspaceYour application
RuntimeYour machineCode execution sandboxCode execution containerYour machine or server
Network accessYoursDepends on settingsNoneYours
FrontmatterStandard plus Claude Code fieldsStandard keys onlyStandard keys onlyStandard plus Claude Code fields
PlansAny Claude Code userPro, Max, Team, Enterprise with code executionAPI accountsAPI accounts

The rest of this page goes through each column.

How do I use skills on claude.ai?

claude.ai supports custom skills on Pro, Max, Team, and Enterprise plans. Code execution must be enabled, because skills run scripts inside the code execution sandbox.

  1. Get the skill as a zip. Every skill page on this site has a download button, or you can zip a folder yourself:

    cd ~/.claude/skills
    zip -r ~/Desktop/pr-summary.zip pr-summary

    The zip must contain the skill folder with SKILL.md inside it, not a loose SKILL.md and not a parent folder of several skills.

  2. In claude.ai, open Settings, go to Capabilities, and find Skills.

  3. Upload the zip, then make sure the skill is enabled in the list.

  4. Test it with a prompt that matches the description.

Uploaded skills are per user. On Team and Enterprise plans, each person uploads the skills they want, unless your organization distributes them another way.

claude.ai naming and frontmatter rules

claude.ai validates uploads more strictly than Claude Code:

  • name may not contain “anthropic” or “claude,” or XML tags. A skill named claude-helper works in Claude Code but must be renamed, for example to helper, before uploading. Rename the folder to match. Every skill on this site already follows this rule.
  • Only the open-standard frontmatter keys are accepted: name, description, license, compatibility, metadata, and allowed-tools. Keys like disable-model-invocation, context, paths, model, or argument-hint cause the upload to be rejected.
  • Claude Code body features such as !`command` dynamic context and $ARGUMENTS substitution are Claude Code behavior. On other surfaces they show up as literal text, so write portable skills without them.

How do I use skills with the Claude API?

On the API, skills run inside the code execution container. Each request needs three things:

  1. The code execution tool in tools.
  2. A container parameter listing the skills to make available.
  3. The code execution beta flag.

Here is a request using Anthropic’s pre-built pptx skill in Python:

import anthropic

client = anthropic.Anthropic()

response = client.beta.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    betas=["code-execution-2025-08-25"],
    container={
        "skills": [
            {"type": "anthropic", "skill_id": "pptx", "version": "latest"},
        ]
    },
    tools=[{"type": "code_execution_20260521", "name": "code_execution"}],
    messages=[{"role": "user", "content": "Create a 5-slide deck summarizing Q3 churn drivers."}],
)

Beta flags and tool version strings change over time, so check the current API documentation before you ship. Files the skill generates, such as the .pptx, are written in the container, and the response includes a file ID you download through the Files API.

Pre-built skills

Anthropic provides pre-built skills for common document formats, referenced with "type": "anthropic":

skill_idPurpose
pptxCreate and edit PowerPoint presentations
xlsxCreate and analyze Excel spreadsheets
docxCreate and edit Word documents
pdfRead, fill, and generate PDFs

Custom skills via /v1/skills

To use your own skill, upload it to the Skills API. It becomes available to the whole workspace and is referenced with "type": "custom" and the returned ID:

MethodEndpointPurpose
POST/v1/skillsCreate a skill from uploaded files
GET/v1/skillsList skills in the workspace
GET/v1/skills/{skill_id}Get one skill
DELETE/v1/skills/{skill_id}Delete a skill
POST/v1/skills/{skill_id}/versionsUpload a new version
GET/v1/skills/{skill_id}/versionsList versions
container={
    "skills": [
        {"type": "anthropic", "skill_id": "xlsx", "version": "latest"},
        {"type": "custom", "skill_id": "skill_abc123", "version": "latest"},
    ]
}

Pin a specific version instead of latest in production so a new upload does not change behavior under you.

API runtime constraints

The code execution container is deliberately locked down:

  • No network access. A skill cannot call external APIs, fetch URLs, or reach your database.
  • No runtime package installs. pip install at runtime will not work. Use libraries already available in the container, or ship pure-Python helpers inside the skill’s scripts/ folder.
  • Inputs come from the request. Pass data in the conversation or through uploaded files.

A skill that shells out to gh, psql, or curl will work in Claude Code and fail on the API. Design API skills around local computation on provided files.

How do I use skills with the Claude Agent SDK?

The Agent SDK runs the same harness as Claude Code, so skills load from the filesystem: .claude/skills/ in the project directory and ~/.claude/skills/ for the user. The SDK does not read filesystem settings unless you ask it to. Set settingSources and allow the Skill tool:

import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: "Review the migration in migrations/20261012_add_region.sql",
  options: {
    cwd: "/path/to/repo",
    settingSources: ["user", "project"], // load ~/.claude and ./.claude, including skills
    allowedTools: ["Skill", "Read", "Grep", "Bash"],
  },
})) {
  if (message.type === "result") console.log(message.result);
}

With "project" in settingSources, a skill committed to the repo at .claude/skills/migration-review/ is available to your agent exactly as it is in Claude Code, including Claude Code-only frontmatter fields. In Python the option is setting_sources. See the Agent SDK documentation for current option names.

Because the SDK runs on your infrastructure, skills have whatever network and filesystem access your process has. Apply the same review you would for any dependency; the skill safety guide explains what to check.

What is portable between surfaces?

FeatureClaude Code and Agent SDKclaude.ai and API
name, descriptionYesYes, with naming restrictions
license, compatibility, metadataYesYes
allowed-toolsYesAccepted (experimental in the spec)
disable-model-invocation, user-invocableYesRejected on upload
context: fork, agent, model, effortYesRejected on upload
paths, hooks, shell, argumentsYesRejected on upload
!`command` dynamic contextYesNot processed
$ARGUMENTS, ${CLAUDE_SKILL_DIR}YesNot substituted
references/, scripts/, assets/YesYes
Scripts using network or CLIsYesNo on the API

A checklist for portable skills

If a skill should work everywhere:

  • Name avoids “claude” and “anthropic”; folder matches
  • Frontmatter uses only name, description, license, compatibility, metadata, allowed-tools
  • No !`command` lines; tell Claude to run the command as a step instead
  • Scripts referenced by relative path (scripts/fill_form.py), not ${CLAUDE_SKILL_DIR}
  • Scripts use only the standard library or commonly available packages, with no network calls
  • compatibility states requirements honestly, for example "Requires Python 3 with pypdf. No network access needed."

A portable frontmatter block:

---
name: pdf-form-filler
description: Fills PDF forms from structured data and verifies every field was written. Use when the user wants to fill, complete, or populate a PDF form.
license: MIT
compatibility: "Python 3 with pypdf. Works offline."
metadata:
  version: "1.2.0"
---

If you need Claude Code-only behavior as well, keep two variants: a portable base for uploads and a Claude Code edition with extra fields. Some teams generate the portable zip from the Claude Code version in CI by stripping the extra keys.

Next steps

Frequently asked questions

Why does claude.ai reject a skill that works in Claude Code?

The two most common reasons are the name and the frontmatter. claude.ai does not allow names containing 'anthropic' or 'claude', and it accepts only the open-standard keys (name, description, license, compatibility, metadata, allowed-tools). Remove Claude Code-only fields such as disable-model-invocation or context and rename if needed.

Can an API skill call external APIs or pip install packages?

No. Skills on the Claude API run in the code execution container without network access and cannot install packages at runtime. Bundle any pure-Python helpers inside the skill, rely on the libraries already in the container, and pass external data in through the request or uploaded files.

Who can use a custom skill uploaded through the API?

Custom skills uploaded through /v1/skills are available across the workspace they were uploaded to, so any API key in that workspace can reference them by skill_id. Skills uploaded on claude.ai are separate and visible only to the user who uploaded them.

Do Anthropic's pre-built document skills work in Claude Code?

The pre-built pptx, xlsx, docx, and pdf skills are referenced by skill_id on the API. For Claude Code, install filesystem versions instead, such as the open-source skills in github.com/anthropics/skills or document skills from this directory.

esc