Skip to content
Claude Skills API Is GA: Ship a Versioned Skill — ContentBuffer guide

Claude Skills API Is GA: Ship a Versioned Skill

K
Kodetra Technologies··12 min read Intermediate

Summary

Upload, version and pin a custom Agent Skill on the Claude API now that /v1/skills is GA.

On August 19, 2026 Anthropic flipped Agent Skills and the Skills API (/v1/skills) to generally available on the Claude API. The skills-2025-10-02 beta header is gone. The Files API went GA in the same release note, which matters because those two features are how a Skill gets its work back out of the sandbox.

The interesting part is not the header removal. It is that Skills now have a stable versioning story, and almost everyone shipping them is using it wrong. The default "latest" resolution means anyone in your workspace can change what your production agent runs by uploading a new version. Custom Skills are workspace-scoped, not key-scoped, so "anyone" is broader than most teams assume.

This guide walks the full loop: author a Skill bundle, upload it, call it from the Messages API, publish a second version, then pin that version so a teammate's Tuesday afternoon experiment cannot rewrite your Friday deploy. The worked example is an ARR bridge calculator, because it is the kind of deterministic domain logic Skills are actually good at.

What you need

  • A Claude API key from the Claude Console
  • Python 3.10+ and pip install anthropic (a recent SDK: files_from_dir and client.skills must be present)
  • A model on the code execution tool's compatibility list. Examples here use claude-opus-5
  • Roughly 15 minutes and a couple of dollars of API spend

One prerequisite trips people up: Skills do not work without the code execution tool. The container that runs code is the same container that Skill files get copied into. Omit the tool and Claude never sees the Skill at all.


Step 1: Author the Skill bundle

A Skill is a directory with a SKILL.md at the top level. The YAML frontmatter needs exactly two fields, name and description, and both have constraints that will 400 you if you ignore them:

  • name: max 64 chars, lowercase letters, numbers and hyphens only, no XML tags, and it cannot contain the reserved words anthropic or claude
  • description: max 1024 chars, non-empty, no XML tags
  • Whole bundle: under 30 MB uncompressed

The description is not documentation. It is the only thing Claude sees at startup, and it is what your request gets matched against. Write both halves: what the Skill does and when to reach for it.

Create the directory:

arr_bridge/
├── SKILL.md
└── arr_bridge.py

arr_bridge/SKILL.md:

---
name: arr-bridge
description: >
  Compute an ARR bridge (new, expansion, contraction, churn, net new ARR
  and net revenue retention) from a CSV of subscription accounts with
  arr_start and arr_end columns. Use when the user asks for an ARR bridge,
  ARR waterfall, net new ARR, NRR, or a breakdown of why recurring revenue
  moved between two periods.
---

# ARR Bridge

## Quick start

Run the bundled script against the account CSV. Do not reimplement the
math inline; the script is the source of truth and its classification
rules are the ones finance signed off on.

```bash
python /skills/arr-bridge/arr_bridge.py accounts.csv
```

The script prints JSON to stdout. Report the numbers exactly as returned.

## Input contract

The CSV must have `account_id`, `arr_start`, `arr_end`. Blank cells are
treated as 0. If a column is missing, say so and stop rather than guessing.

## Classification rules

- `arr_start == 0` and `arr_end > 0` -> new
- `arr_start > 0` and `arr_end == 0` -> churn (negative)
- `arr_end > arr_start` -> expansion
- `arr_end < arr_start` -> contraction (negative)

## Reporting

Always check the `reconciles` field. If it is false, the input is
inconsistent: surface that before presenting any totals.

Now the script. Note what it does not import:

# arr_bridge/arr_bridge.py
"""Compute an ARR bridge from a subscription snapshot CSV.

Standard library only: the API code-execution container has no network
access and cannot pip install at runtime.
"""
import csv
import json
import sys


def build_bridge(rows):
    b = {"new": 0.0, "expansion": 0.0, "contraction": 0.0, "churn": 0.0}
    start_total = end_total = 0.0
    for r in rows:
        s = float(r["arr_start"] or 0)
        e = float(r["arr_end"] or 0)
        start_total += s
        end_total += e
        if s == 0 and e > 0:
            b["new"] += e
        elif s > 0 and e == 0:
            b["churn"] -= s
        elif e > s:
            b["expansion"] += e - s
        elif e < s:
            b["contraction"] -= s - e
    movement = sum(b.values())
    return {
        "starting_arr": round(start_total, 2),
        **{k: round(v, 2) for k, v in b.items()},
        "ending_arr": round(end_total, 2),
        "net_new_arr": round(movement, 2),
        "nrr_pct": round(
            100.0
            * (start_total + b["expansion"] + b["contraction"] + b["churn"])
            / start_total,
            1,
        )
        if start_total
        else None,
        "reconciles": abs((start_total + movement) - end_total) < 0.01,
    }


def main():
    with open(sys.argv[1], newline="") as fh:
        rows = list(csv.DictReader(fh))
    print(json.dumps(build_bridge(rows), indent=2))


if __name__ == "__main__":
    main()

Verify it locally before you upload anything. With this accounts.csv:

account_id,arr_start,arr_end
acme,120000,150000
globex,80000,80000
initech,45000,0
umbrella,0,60000
soylent,200000,175000

python arr_bridge.py accounts.csv prints:

{
  "starting_arr": 445000.0,
  "new": 60000.0,
  "expansion": 30000.0,
  "contraction": -25000.0,
  "churn": -45000.0,
  "ending_arr": 465000.0,
  "net_new_arr": 20000.0,
  "nrr_pct": 91.0,
  "reconciles": true
}

445,000 starting, plus 20,000 of net movement, lands on 465,000 ending. NRR of 91.0% is the 445,000 base plus expansion minus contraction and churn, excluding new logos. Deterministic, auditable, and the script body never enters the context window: only that JSON does.


Step 2: Upload it

The Python SDK ships a files_from_dir helper that walks a directory and attaches every file with the right filename. This is the least error-prone path:

import anthropic
from anthropic.lib import files_from_dir

client = anthropic.Anthropic()

skill = client.skills.create(files=files_from_dir("./arr_bridge"))
print(skill.id)          # skill_01AbCdEfGhIjKlMnOpQrStUv
print(skill.display_name)  # derived from the SKILL.md name

You can also upload a zip, or use the CLI, which is handy in CI:

zip -r arr_bridge.zip arr_bridge/
ant skills create --file arr_bridge.zip

# confirm it landed
ant skills list --source custom

display_name is optional. Leave it off and it derives from the name in your frontmatter. Set it explicitly (up to 255 chars) if you want something human-facing like ARR Bridge (Finance-approved). It does not have to be unique in the workspace, which is a footgun in its own right.

Two things about where that Skill now lives. Custom Skills are workspace-wide: every API key in the same workspace can read, invoke and delete it, and all your keys share the Default Workspace unless you explicitly split them. And Skills do not sync across surfaces: this upload does nothing for claude.ai, and your Claude Code .claude/skills/ directory is a separate universe.


Step 3: Call it from the Messages API

Skills attach through the container parameter, alongside the code execution tool. The shape is identical whether the Skill is one of Anthropic's pre-built ones (pptx, xlsx, docx, pdf) or your own:

import anthropic

client = anthropic.Anthropic()

# Upload the CSV so the container can read it
csv_file = client.files.create(
    file=("accounts.csv", open("accounts.csv", "rb")),
)

response = client.messages.create(
    model="claude-opus-5",
    max_tokens=4096,
    container={
        "skills": [
            {
                "type": "custom",
                "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv",
                "version": "latest",
            }
        ]
    },
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "container_upload", "file_id": csv_file.id},
                {
                    "type": "text",
                    "text": "Build the ARR bridge for accounts.csv and tell me "
                            "whether the quarter was expansion-led or logo-led.",
                },
            ],
        }
    ],
    tools=[{"type": "code_execution_20250825", "name": "code_execution"}],
)

for block in response.content:
    if block.type == "text":
        print(block.text)

What happens inside: Claude sees arr-bridge and its description in the system prompt, matches your request, cats /skills/arr-bridge/SKILL.md to load the instructions, then runs the script through bash. Note the mount path uses the name from your frontmatter, not the skill_01... ID. That trips up every hardcoded path on the first try.

A representative reply:

ARR bridge for the period:

  Starting ARR      $445,000
  + New              $60,000   (umbrella)
  + Expansion        $30,000   (acme)
  - Contraction      $25,000   (soylent)
  - Churn            $45,000   (initech)
  = Ending ARR      $465,000

  Net new ARR        $20,000
  NRR                    91.0%
  Reconciles              true

Logo-led, not expansion-led. The $60,000 new-logo contribution is the only
reason the quarter is positive: NRR of 91% means the installed base shrank
by $40,000 on its own. Expansion of $30,000 did not cover the $70,000 of
contraction plus churn.

The judgement in that last paragraph is Claude. The numbers are the script. That split is the whole point of putting code in a Skill instead of asking the model to compute in its head.


Step 4: Publish a second version (and the trap in it)

Say finance decides downgrades to a lower-priced plan should be reported separately from partial-seat reductions. You edit SKILL.md, tweak arr_bridge.py, and publish:

version = client.skills.versions.create(
    skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv",
    files=files_from_dir("./arr_bridge"),
)
print(version.id)  # skver_01AbCdEfGhIjKlMnOpQrStUv

Or from CI, capturing the ID for a later deploy step:

VERSION_ID=$(ant skills:versions create \
  --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv \
  --file arr_bridge.zip \
  --transform id \
  --raw-output)
echo "$VERSION_ID"   # skver_01AbCdEfGhIjKlMnOpQrStUv

Here is the trap, and it is a data-loss trap: a new version is a complete snapshot, not a delta. Whatever files you attach are the version. If your build step copies only the changed file into a temp directory and uploads that, every other file in the Skill silently disappears from the new version. Your REFERENCE.md is gone, your helper script is gone, and the failure shows up later as Claude improvising instead of erroring.

Two more version rules worth writing on a sticky note. The name in the new version's SKILL.md must match the Skill's existing name, so renaming means creating a new Skill. And deleting a Skill deletes every version with it, with no undo.


Step 5: Pin the version in production

This is the part the GA release actually makes urgent. If you omit version or set it to "latest", every request resolves to the newest version in the workspace at call time. A colleague experimenting on the same Skill ID changes your production behavior with no deploy, no review and no notification.

Split the resolution by environment and make the pinned ID a deploy artifact:

# skills_config.py
import os

SKILL_ID = "skill_01AbCdEfGhIjKlMnOpQrStUv"

# Set by CI from the create-version response. Never a literal in source.
PINNED_VERSION = os.environ.get("ARR_BRIDGE_VERSION")

def arr_bridge_ref(env: str = os.environ.get("APP_ENV", "dev")) -> dict:
    if env == "production":
        if not PINNED_VERSION:
            raise RuntimeError(
                "ARR_BRIDGE_VERSION must be pinned in production"
            )
        version = PINNED_VERSION
    else:
        version = "latest"
    return {"type": "custom", "skill_id": SKILL_ID, "version": version}
from skills_config import arr_bridge_ref

response = client.messages.create(
    model="claude-opus-5",
    max_tokens=4096,
    container={"skills": [arr_bridge_ref()]},
    messages=[{"role": "user", "content": "Build the ARR bridge for Q3"}],
    tools=[{"type": "code_execution_20250825", "name": "code_execution"}],
)

One detail that costs people an afternoon: the version value is always a string, even when it looks numeric. Anthropic's pre-built Skills use date-style versions like 20251013. Write that unquoted in JSON or YAML and you will send an integer and get a type error back.


Step 6: Get the files back out

If your Skill writes a file rather than printing JSON, the response carries file_ids inside the code-execution result blocks, and you pull the bytes with the Files API, which also went GA in the August 19 release:

def extract_file_ids(response):
    file_ids = []
    for item in response.content:
        if item.type == "bash_code_execution_tool_result":
            content_item = item.content
            if content_item.type == "bash_code_execution_result":
                for file in content_item.content:
                    file_ids.append(file.file_id)
    return file_ids


for file_id in extract_file_ids(response):
    meta = client.files.retrieve_metadata(file_id=file_id)
    content = client.files.download(file_id=file_id)
    content.write_to_file(meta.filename)
    print(f"Downloaded: {meta.filename} ({meta.size_bytes} bytes)")

GA changed the Files API defaults too. Without the old beta header you get the GA response format: set expires_in_seconds at upload and read expires_at back, and list files with page/next_page pagination plus an ids[] filter. Storage is 1 TB per organization, rate limited to 500 requests per minute. Code written against the beta shape and still sending the header keeps working, which is exactly how a migration quietly never happens.


Putting it together: a deploy-safe end-to-end run

This is the script I would actually keep in a repo. It publishes a version, pins it, and runs a request against the pinned ID rather than latest:

import os
import anthropic
from anthropic.lib import files_from_dir

client = anthropic.Anthropic()
SKILL_DIR = "./arr_bridge"
SKILL_ID = os.environ["ARR_BRIDGE_SKILL_ID"]


def publish() -> str:
    """Upload the full bundle as a new version. Returns the version ID."""
    version = client.skills.versions.create(
        skill_id=SKILL_ID,
        files=files_from_dir(SKILL_DIR),  # full snapshot, always
    )
    return version.id


def run(version_id: str, csv_path: str) -> str:
    uploaded = client.files.create(file=(csv_path, open(csv_path, "rb")))
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "container_upload", "file_id": uploaded.id},
                {"type": "text", "text": "Build the ARR bridge and flag any "
                                         "reconciliation failure first."},
            ],
        }
    ]
    container = {
        "skills": [
            {"type": "custom", "skill_id": SKILL_ID, "version": version_id}
        ]
    }
    response = client.messages.create(
        model="claude-opus-5",
        max_tokens=4096,
        container=container,
        messages=messages,
        tools=[{"type": "code_execution_20250825", "name": "code_execution"}],
    )

    # Skills can run long enough to pause the turn. Resume up to 10 times,
    # reusing the same container so filesystem state survives.
    for _ in range(10):
        if response.stop_reason != "pause_turn":
            break
        messages.append({"role": "assistant", "content": response.content})
        response = client.messages.create(
            model="claude-opus-5",
            max_tokens=4096,
            container={"id": response.container.id, **container},
            messages=messages,
            tools=[{"type": "code_execution_20250825",
                    "name": "code_execution"}],
        )

    return "\n".join(b.text for b in response.content if b.type == "text")


if __name__ == "__main__":
    vid = publish()
    print(f"published {vid} — pin this in production")
    print(run(vid, "accounts.csv"))

The pause_turn loop is not optional decoration. Skills that chew through a large input will pause the turn, and if you treat that stop reason as an end state you get a truncated answer that looks complete. Passing the response straight back with the same container.id resumes it with the filesystem intact.


Gotchas that will cost you an afternoon

  1. No code execution tool, no Skill. The Skill is silently absent rather than erroring. If Claude answers without ever running bash, check your tools array first.
  2. Versions overwrite, they do not merge. Upload the complete bundle every time. A partial upload deletes the omitted files from that version, and you find out weeks later.
  3. latest is a shared mutable pointer. Custom Skills are workspace-wide, so anyone with a key in that workspace can change what your production requests execute. Pin in prod, always.
  4. The mount path uses the frontmatter name. Files land at /skills/arr-bridge/, not /skills/skill_01.../. Any absolute path in your SKILL.md needs to match the name.
  5. No network, no pip. The container has neither. A Skill script that calls an external API or imports something not pre-installed fails at runtime, not at upload. Standard library is the safe floor; check the code execution tool's package list before relying on anything else.
  6. Reserved words in name. anthropic and claude are rejected, as are uppercase letters and underscores. claude_arr_helper fails twice over.
  7. Changing the Skills list breaks your prompt cache. Skills render into the system prompt in a fixed order, so an identical list caches cleanly and adding one Skill invalidates the prefix. Using latest makes this worse: a new version with an edited description can silently bust the cache mid-day.
  8. Workspace is the only isolation boundary. Building multi-tenant on the Skills API means one workspace per tenant. Default limit is 100 workspaces per organization.
  9. Skill content scanning does not cover you. Enterprise scanning applies to Skills uploaded through claude.ai and Cowork, not through the Skills API or the Console. Review third-party bundles yourself: a Skill is executable code with your agent's permissions.
  10. Uploads do not cross surfaces. API, claude.ai and Claude Code each need their own copy. There is no sync.

Quick reference

ItemValue / rule
Endpoints/v1/skills, /v1/skills/{id}/versions — GA, no beta header
Required toolcode_execution_20250825
Attach pointcontainer.skills[] with type, skill_id, version
Anthropic skill IDspptx, xlsx, docx, pdf
Custom ID formatskill_01...; versions are skver_01...
Version valuesAlways strings. Anthropic uses dates ("20251013"), custom uses skver_ IDs, or "latest"
Skills per request20 max
Bundle size30 MB uncompressed, all files combined
name rules≤64 chars, lowercase/digits/hyphens, no anthropic or claude
description rulesNon-empty, ≤1024 chars, no XML tags
Mount path/skills/{frontmatter-name}/
Sharing scopeAPI = workspace-wide · claude.ai = per user · Claude Code = filesystem
Runtime limitsNo network, no runtime package installs, fresh container per request
Long operationsstop_reason: pause_turn — resend with the same container.id
ZDRNot covered. Skill definitions and execution data follow standard retention

Where to go next

  • Move the publish step into CI: on merge to main, upload a version, write the skver_ ID to your deploy config, and let the pinned reference roll out with your normal release.
  • Add a second file to the bundle — a REFERENCE.md with your revenue definitions — and watch context stay flat. Bundled files cost zero tokens until Claude reads them.
  • Compose your custom Skill with xlsx in one request so the bridge lands in a formatted workbook instead of a code block.
  • Turn on the Compliance API before you need it. Its Activity Feed records Skill and version create/delete events, but only from the moment it is enabled — earlier operations are not recoverable.
  • If you are multi-tenant, split workspaces now. Retrofitting the isolation boundary after Skills are live is the expensive version of this decision.

Sources: Using Agent Skills with the API, Agent Skills overview, and the Claude Developer Platform release notes for August 19, 2026.

Comments

Subscribe to join the conversation...

Be the first to comment

Found this useful?

Get new AI guides for builders by email. Free.

Join 3,617 newsletter subscribers.

Also get