Agent skill

Anth Upgrade Migration

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Upgrade Anthropic SDK versions and migrate between Claude API versions.

MITAuto-check passedAI & LLM Engineering

Install Anth Upgrade Migration

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .claude/skills/anth-upgrade-migration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
anth-upgrade-migration
GitHub stars
2.8k
Token cost
~1.7k tokens
SKILL.md length
486 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Upgrade Anthropic SDK versions and migrate between Claude API versions.

  • Works in 5 steps: Create Upgrade Branch → Upgrade SDK → Review Breaking Changes → …
  • Upgrading the Python/TypeScript SDK
  • SKILL.md covers Overview, Check Current Versions, Upgrade Path and Migration: Text Completions to…, plus 8 more sections
  • Calls npm, pip and git

What it does

Anth Upgrade Migration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Upgrade Anthropic SDK versions and migrate between Claude API versions. Use when upgrading the Python/TypeScript SDK, migrating from Text Completions to Messages API, or adopting new API features like tool use or batches. Trigger with phrases like "upgrade anthropic sdk", "anthropic migration", "update claude sdk", "migrate to messages api".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering LLM API integration. It works with Anthropic API, Python and TypeScript. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Upgrading the Python/TypeScript SDK
  • Migrating from Text Completions to Messages API
  • Adopting new API features like tool use
  • With phrases like upgrade anthropic sdk

Example prompts

  • “upgrade anthropic sdk”
  • “anthropic migration”
  • “update claude sdk”
  • “/anth-upgrade-migration”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(git:*)

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Create Upgrade Branch
  2. Upgrade SDK
  3. Review Breaking Changes
  4. Update API Version Header
  5. Run Tests and Verify

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)
    • Bash(pip:*)
    • Bash(git:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • pip
    • git
    • python
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • platform.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Anth Upgrade Migration loads about 1.7k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 486 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~92
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 486 words, ~1,697 tokens.

Download SKILL.mdSave it as .claude/skills/anth-upgrade-migration/SKILL.md (or your agent's skills folder).
name
anth-upgrade-migration
description
Upgrade Anthropic SDK versions and migrate between Claude API versions. Use when upgrading the Python/TypeScript SDK, migrating from Text Completions to Messages API, or adopting new API features like tool use or batches. Trigger with phrases like "upgrade anthropic sdk", "anthropic migration", "update claude sdk", "migrate to messages api".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(git:*)
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, ai, anthropic

Anthropic Upgrade & Migration

Overview

Guide for upgrading the Anthropic SDK and migrating between API versions. The SDK follows semver — major versions may have breaking changes.

Check Current Versions

bash
# Python
pip show anthropic | grep Version
# Version: 0.40.0

# TypeScript
npm list @anthropic-ai/sdk
# @anthropic-ai/sdk@0.35.0

# Check latest available
pip index versions anthropic 2>/dev/null | head -1
npm view @anthropic-ai/sdk version

Upgrade Path

Step 1: Create Upgrade Branch
bash
git checkout -b upgrade/anthropic-sdk
Step 2: Upgrade SDK
bash
# Python
pip install --upgrade anthropic
pip show anthropic | grep Version

# TypeScript
npm install @anthropic-ai/sdk@latest
Step 3: Review Breaking Changes

Key breaking changes by version:

Python SDK 0.20+ (anthropic-version: 2023-06-01)

python
# OLD: Text Completions API (deprecated)
response = client.completions.create(
    model="claude-2",
    prompt="\n\nHuman: Hello\n\nAssistant:",
    max_tokens_to_sample=256
)

# NEW: Messages API
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}]
)

Python SDK 0.30+ (streaming changes)

python
# OLD: Manual SSE parsing
response = client.messages.create(..., stream=True)
for line in response.iter_lines():
    ...

# NEW: High-level streaming
with client.messages.stream(...) as stream:
    for text in stream.text_stream:
        print(text)

TypeScript SDK 0.20+ (import path change)

typescript
// OLD
import Anthropic from 'anthropic';

// NEW
import Anthropic from '@anthropic-ai/sdk';
Step 4: Update API Version Header
python
# The SDK sends anthropic-version header automatically
# To pin a specific version:
client = anthropic.Anthropic(
    default_headers={"anthropic-version": "2023-06-01"}
)

# For beta features:
client = anthropic.Anthropic(
    default_headers={"anthropic-beta": "token-counting-2024-11-01"}
)
Step 5: Run Tests and Verify
bash
# Run your test suite
python -m pytest tests/ -v
npm test

# Verify a live call
python3 -c "
import anthropic
c = anthropic.Anthropic()
m = c.messages.create(model='claude-haiku-4-20250514', max_tokens=8, messages=[{'role':'user','content':'hi'}])
print(f'OK: {m.model} {m.usage}')
"

Migration: Text Completions to Messages

Text CompletionsMessages API
client.completions.create()client.messages.create()
prompt (string)messages (array)
max_tokens_to_samplemax_tokens
model: "claude-2"model: "claude-sonnet-4-20250514"
\n\nHuman:...\n\nAssistant:[{role: "user"}, {role: "assistant"}]
response.completionresponse.content[0].text

Rollback

bash
# Python — pin to previous version
pip install anthropic==0.39.0

# TypeScript — pin to previous version
npm install @anthropic-ai/sdk@0.34.0

# Git rollback
git checkout main -- package.json package-lock.json
npm install

Prerequisites

  • Record the current SDK version, lockfile digest, API version header, model identifiers, supported runtime versions, and a tested rollback revision.
  • Obtain release notes from the official SDK/API sources and an approved sandbox workspace with synthetic prompts; production credentials must not be used for migration tests.
  • Define compatibility, latency, cost, and response-shape acceptance thresholds and identify the owner who approves promotion.

Instructions

  1. Create a migration branch and lock the current dependency graph. Compare the target SDK and API behavior against official release notes; do not infer compatibility from a package version alone.
  2. Update the SDK and request shapes in a sandbox, preserving explicit model IDs, max_tokens, authentication through the secret manager, and least-privileged workspace access.
  3. Run unit, contract, streaming, tool-use, error, and token-count tests using synthetic fixtures. Compare redacted response-shape and usage receipts with the baseline; never log prompt or response content.
  4. Canary the pinned artifact on an isolated workspace with zero customer traffic. Promote only after owner approval and threshold checks; monitor errors, latency, rate limits, and spend during the rollout.
  5. If any gate fails, stop promotion, restore the prior lockfile/revision, revoke temporary credentials, and preserve the redacted migration receipt.
Show full SKILL.md (184 more words)Show less

Output

Produce a migration receipt containing source and target SDK versions, API-version header, lockfile/artifact digests, test and canary results, model IDs, workspace/environment, approval, rollout state, rollback reference, and retention deadline. Exclude API keys, prompt/response text, customer identifiers, and raw exception payloads.

Error Handling

FailureResponse
Dependency or API contract test failsPin the prior version, isolate the failing fixture, and do not promote.
Authentication or permission failureStop the canary, verify the secret-manager reference and workspace scope, and never print the key.
429/5xx, timeout, or latency regressionRespect SDK retry guidance, apply a bounded circuit breaker, and roll back when the canary threshold is exceeded.
Response-shape or tool-use driftQuarantine the result, update the adapter only after an approved contract decision, and rerun the full suite.

Examples

For a synthetic migration fixture, pin anthropic from 0.39.0 to the reviewed target, run 100 sandbox Messages API calls with customer=fixture-017, assert response-shape parity and customer_content_logged=0, then promote to a 1% internal canary. A failed threshold yields promotion=halted; rollback=prior-lockfile.

Resources

Next Steps

For CI integration during upgrades, see anth-ci-integration.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/anth-upgrade-migration of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Anth Upgrade Migration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Anth Upgrade Migration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Anth Upgrade Migration this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.7kAutomated safety check: PassMIT
Claude APIloulanyue/awesome-claude-notes2722 repos~2.1kAutomated safety check: PassMIT
Claude APIloulanyue/awesome-claude-notes2721 repos~1.9kAutomated safety check: PassMIT
Claude Cookbooks Reference2025Emma/vibe-coding-cn23k1 repos~2.2kAutomated safety check: PassMIT
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0
Claude APIKocoro-lab/Kocoro4147 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Claude API

    loulanyue/awesome-claude-notes

    Anthropic Claude API patterns for Python and TypeScript. An agent skill from loulanyue/awesome-claude-notes.

    272 GitHub starsUsed in 2 repos~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Claude API

    loulanyue/awesome-claude-notes

    Anthropic Claude API 的 Python 和 TypeScript 使用模式。涵盖 Messages API、流式处理、工具使用、视觉功能、扩展思维、批量处理、提示缓存和 Claude Agent SDK。适用于使用 Claude API 或 Anthropic SDK 构建应用程序的场景。

    272 GitHub starsUsed in 1 repo~1.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Claude Cookbooks Reference

    2025Emma/vibe-coding-cn

    Reference of Claude API examples and guides covering tool use, vision, RAG, classification, summarization, text-to-SQL, prompt caching and agent patterns.

    23k GitHub starsUsed in 1 repo~2.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Claude API

    Kocoro-lab/Kocoro

    Build apps with the Claude API or Anthropic SDK. An agent skill from Kocoro-lab/Kocoro.

    414 GitHub starsUsed in 7 repos~4.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Azure Openai To Responses

    microsoft/ai-agents-for-beginners

    Official

    Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.

    77k GitHub stars~6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Questions about Anth Upgrade Migration

What does Anth Upgrade Migration do?

Upgrade Anthropic SDK versions and migrate between Claude API versions. Anth Upgrade Migration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Upgrade Anthropic SDK versions and migrate between Claude API versions.

When should I use Anth Upgrade Migration?

Anth Upgrade Migration fits situations like: upgrading the Python/TypeScript SDK; migrating from Text Completions to Messages API; adopting new API features like tool use; with phrases like upgrade anthropic sdk.

How do I install Anth Upgrade Migration in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a claude-code`. Or copy the skill folder (skills/.curated/anth-upgrade-migration in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/anth-upgrade-migration in your project. Claude Code loads it when a task matches its description.

How do I install Anth Upgrade Migration in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a codex`. Or copy the skill folder (skills/.curated/anth-upgrade-migration in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/anth-upgrade-migration in your project. Codex loads it when a task matches its description.

Can I use Anth Upgrade Migration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/anth-upgrade-migration, .gemini/skills/anth-upgrade-migration, .github/skills/anth-upgrade-migration and .opencode/skills/anth-upgrade-migration in your project.

What does Anth Upgrade Migration need to run?

Going by SKILL.md and its folder, Anth Upgrade Migration needs the command-line tools its instructions call (npm, pip, git, python and python3). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(git:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Anth Upgrade Migration access the network?

SKILL.md names 2 domains. As links in the text: github.com and platform.claude.com. This is read from the text; nothing was executed.

Is Anth Upgrade Migration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Anth Upgrade Migration use?

Anth Upgrade Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Anth Upgrade Migration use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Anth Upgrade Migration?

Skills that share tags, products or a category with Anth Upgrade Migration: Claude API (loulanyue/awesome-claude-notes, 272 stars), Claude API (loulanyue/awesome-claude-notes, 272 stars), Claude Cookbooks Reference (2025Emma/vibe-coding-cn, 23k stars) and Gemini API Dev (google-gemini/gemini-skills, 4.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Anth Upgrade Migration?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.