Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Agent Skills guide

Claude API skills: Agent Skills in the API and claude.ai

Upload a skill with /v1/skills, attach it to a Claude API Messages request with code execution, and avoid the frontmatter and naming rules that fail uploads.

By Intermediate · Updated 21 November 20266 min read
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

To use skills in the Claude API, upload the skill folder once to /v1/skills, then list its ID in container.skills on each Messages request alongside the code execution tool, up to 20 skills per request. On claude.ai you upload a zip under Customize > Skills instead. Both accept only the six spec fields.

Skills are not just for coding agents. In the Claude apps and the Claude API they run inside a code execution sandbox, which is how Claude builds Word documents, spreadsheets and slide decks. You can upload your own skills to both. The rules are stricter than in Claude Code, and the two surfaces do not share skills with each other. This guide covers the API first, then claude.ai. API details are from Anthropic’s skills guide, checked on 20 November 2026. For the format itself, see what Agent Skills are.

The rules that make skill uploads fail

Most failed uploads come down to frontmatter. The hosted surfaces accept only the six fields in the open spec:

  • name: at most 64 characters, lowercase letters, digits and hyphens, no XML tags, and it must not contain the reserved words anthropic or claude.
  • description: at most 1,024 characters, not empty, no XML tags. For skills uploaded to claude.ai, the Claude Help Center article on creating custom skills sets a lower maximum of 200 characters (checked on 21 November 2026), so keep the description within 200 if the skill will go to both surfaces.
  • license, compatibility, metadata and allowed-tools: optional.

Any other key is a hard error. That catches a lot of skills written for Claude Code, where fields like disable-model-invocation, argument-hint or user-invocable are common, and skills with stray keys such as version or tags. Move those under metadata (as strings) or delete them. A skill named claude-md-improver or git-guardrails-claude-code will be refused for its name alone.

Our directory checks this for you: every skill page has a “Client-specific fields” box, and a note appears when a skill needs editing before upload. The SKILL.md format reference has the full rules.

Uploading a skill to the Claude API

POST /v1/skills takes multipart form data. Each file’s name must include its path inside the skill, and SKILL.md must sit at the root of the upload or inside one enclosing folder:

curl -X POST "https://api.anthropic.com/v1/skills" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -F "files[]=@invoice_rules/SKILL.md;filename=invoice_rules/SKILL.md" \
  -F "files[]=@invoice_rules/scripts/check.py;filename=invoice_rules/scripts/check.py"

You can also upload a zip. The total must be under 30 MB uncompressed. The response gives you a skill ID. Custom skills belong to the workspace, not to a user or a conversation, so every key in that workspace can use them. If you run a multi-tenant product, Anthropic suggests one workspace per tenant.

Using skills in a Messages API request

Skills are listed in container.skills, and they need the code execution tool, so use a model that supports it:

{
  "model": "claude-opus-5-5",
  "max_tokens": 4096,
  "container": {
    "skills": [
      { "type": "anthropic", "skill_id": "xlsx", "version": "latest" },
      { "type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", "version": "latest" }
    ]
  },
  "tools": [{ "type": "code_execution_20250825", "name": "code_execution" }],
  "messages": [{ "role": "user", "content": "Check invoices.xlsx against our invoice rules." }]
}

The skill ID above is a placeholder; use the one your upload returned. Up to 20 skills can go in one request. Anthropic’s pre-built skills are pptx, xlsx, docx and pdf, the same ones reviewed in our directory as pptx, xlsx, docx and pdf. Inside the container each skill is mounted at /skills/<name>/, named after the skill, not its ID.

Files the skill creates come back as file_id values in the code execution results; download them with the Files API. To keep files across turns, pass the container’s id back in the next request, including on pause_turn continuations, or work from earlier in the turn is lost.

Versions

Anthropic’s skills use date versions such as 20251013, or latest. Your custom skills get generated version IDs. To publish a new version, call POST /v1/skills/{skill_id}/versions with the complete file set: a new version is a full snapshot, not a patch, so files you leave out are dropped, and the name in SKILL.md must stay the same.

Pin a specific version in production. latest is convenient while developing, but it means an upload by a colleague changes your production behaviour immediately.

Skills on claude.ai and the desktop app

In the Claude apps, skills are uploaded by hand:

  1. In Settings > Capabilities, turn on code execution and file creation.
  2. Zip the skill folder. The folder name should match the skill’s name.
  3. Go to Customize > Skills, choose + > Create skill > Upload a skill, and pick the zip.
  4. Switch the skill on.

If you are not a developer, the Claude skill recipe for a recurring office task walks through these steps for a monthly client report, from the SKILL.md and template to testing.

The same frontmatter and naming rules apply. Network access inside the sandbox depends on your settings and, on Team and Enterprise plans, your administrator’s. Admins can enable skills for the organisation, provision skills to everyone, restrict who can create them, and on Enterprise turn on content scanning of uploaded skills. Skills shared with you are view-only and update when the owner updates them.

What syncs between surfaces

A skill uploaded to the API and one uploaded to claude.ai are separate copies: updating one does not update the other. Claude Code is the exception in one direction. According to the Claude Code skills documentation (checked on 21 November 2026), when you sign in to Claude Code v2.1.273 or later in the terminal with your claude.ai account, it downloads the skills enabled for that account into ~/.claude/skills/synced/ and keeps them up to date while the session runs. Cowork and cloud sessions load the same skills at session start. The sync is one-way: edits you make under ~/.claude/skills/synced/ are never uploaded and a later sync can overwrite them. Sessions that authenticate with an API key, run on Amazon Bedrock or set syncClaudeAiSkills to false do not sync, and skills you install in your own Claude Code folders never reach claude.ai or the API.

Keep the source in a Git repository and treat the API and claude.ai as deployment targets, with the upload scripted for the API and a short checklist for claude.ai. Change a synced skill on claude.ai, not in the synced folder.

Checklist before you upload

  1. Frontmatter uses only the six spec fields.
  2. name has no “claude” or “anthropic” and matches the folder.
  3. Scripts need no network and no packages beyond the container’s.
  4. The bundle is under 30 MB.
  5. You have tested it with the prompts real users will send; skill creator can run that comparison for you, and testing and evaluating Agent Skills covers the method.

The SKILL.md format reference lists which fields belong to which client, so you can strip the Claude Code-only ones before uploading. If your skill ships scripts, bundling scripts in skills explains how to keep them working without network access, and packaging and sharing Agent Skills covers sharing a skill with your organisation.

  • Claude

    Anthropic's assistant with projects, files, skills and connectors.

    Tool

  • Building with the Claude API

    Learn to build with the Claude API from your own code: the Messages API, tool use, structured output and prompt caching, then evaluate and trace what you built.

    Learning pathIntermediate5 h9 steps

  • SKILL.md format reference

    Every SKILL.md frontmatter field in the Agent Skills spec, the extra fields each agent adds, size budgets, folder layout and the mistakes that stop loading.

    Skill guideIntermediate

  • Skill scripts: bundling code in a skill without making it unsafe

    When a skill should ship a script instead of instructions, how to write skill scripts agents can run reliably, and what a reviewer checks before trusting one.

    Skill guideAdvanced

Back to top