Claude API
loulanyue/awesome-claude-notes
Anthropic Claude API patterns for Python and TypeScript. An agent skill from loulanyue/awesome-claude-notes.
Upgrade Anthropic SDK versions and migrate between Claude API versions.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .claude/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .agents/skills/anth-upgrade-migration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .agents/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .cursor/skills/anth-upgrade-migration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .cursor/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/anth-upgrade-migration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .gemini/skills/anth-upgrade-migration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .gemini/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .github/skills/anth-upgrade-migration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .github/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill anth-upgrade-migration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace anth-upgrade-migration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/anth-upgrade-migration .opencode/skills/anth-upgrade-migration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "anth-upgrade-migration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/anth-upgrade-migration into .opencode/skills/anth-upgrade-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "anth-upgrade-migration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
anth-upgrade-migrationUpgrade 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. 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.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditBash(npm:*)Bash(pip:*)Bash(git:*)From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmpipgitpythonpython3From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.complatform.claude.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
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.
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.
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.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 486 words, ~1,697 tokens.
.claude/skills/anth-upgrade-migration/SKILL.md (or your agent's skills folder).Guide for upgrading the Anthropic SDK and migrating between API versions. The SDK follows semver — major versions may have breaking changes.
# 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 versiongit checkout -b upgrade/anthropic-sdk# Python
pip install --upgrade anthropic
pip show anthropic | grep Version
# TypeScript
npm install @anthropic-ai/sdk@latestKey breaking changes by version:
Python SDK 0.20+ (anthropic-version: 2023-06-01)
# 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)
# 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)
// OLD
import Anthropic from 'anthropic';
// NEW
import Anthropic from '@anthropic-ai/sdk';# 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"}
)# 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}')
"| Text Completions | Messages API |
|---|---|
client.completions.create() | client.messages.create() |
prompt (string) | messages (array) |
max_tokens_to_sample | max_tokens |
model: "claude-2" | model: "claude-sonnet-4-20250514" |
\n\nHuman:...\n\nAssistant: | [{role: "user"}, {role: "assistant"}] |
response.completion | response.content[0].text |
# 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 installmax_tokens, authentication through the secret manager, and least-privileged workspace access.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.
| Failure | Response |
|---|---|
| Dependency or API contract test fails | Pin the prior version, isolate the failing fixture, and do not promote. |
| Authentication or permission failure | Stop the canary, verify the secret-manager reference and workspace scope, and never print the key. |
| 429/5xx, timeout, or latency regression | Respect SDK retry guidance, apply a bounded circuit breaker, and roll back when the canary threshold is exceeded. |
| Response-shape or tool-use drift | Quarantine the result, update the adapter only after an approved contract decision, and rerun the full suite. |
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.
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
Just SKILL.md in skills/.curated/anth-upgrade-migration of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Anth Upgrade Migration this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Claude APIloulanyue/awesome-claude-notes | 272 | 2 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Claude APIloulanyue/awesome-claude-notes | 272 | 1 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Claude Cookbooks Reference2025Emma/vibe-coding-cn | 23k | 1 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Gemini API Devgoogle-gemini/gemini-skills | 4.3k | — | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| Claude APIKocoro-lab/Kocoro | 414 | 7 repos | ~4.5k | Automated safety check: Pass | Apache-2.0 |
loulanyue/awesome-claude-notes
Anthropic Claude API patterns for Python and TypeScript. An agent skill from loulanyue/awesome-claude-notes.
loulanyue/awesome-claude-notes
Anthropic Claude API 的 Python 和 TypeScript 使用模式。涵盖 Messages API、流式处理、工具使用、视觉功能、扩展思维、批量处理、提示缓存和 Claude Agent SDK。适用于使用 Claude API 或 Anthropic SDK 构建应用程序的场景。
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.
google-gemini/gemini-skills
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…
Kocoro-lab/Kocoro
Build apps with the Claude API or Anthropic SDK. An agent skill from Kocoro-lab/Kocoro.
microsoft/ai-agents-for-beginners
Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.