Agent skill · software engineering · jeremylongshore

clade-migration-deep-dive

Migrate from OpenAI/GPT to Anthropic/Claude \u2014 API differences,\n\

Why this skill is useful

Adds detailed API mapping, SDK swap examples, and executable scripts for migrating code from OpenAI to Anthropic that aren't in public docs.

What it needs

Requires @claude-ai/sdk installed locally. Requires anthropic, openai account access. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Migrate from OpenAI to Anthropic Overview Migrate from OpenAI/GPT to Anthropic/Claude. Covers the complete API mapping (endpoints, models, response shapes), SDK swap with before/after code, five key differences (maxtokens required, system as top-level param, alternating messages, response path, streaming events), and tool use migration. API Mapping OpenAI Anthropic Notes -------- ----------- ------- openai.chat.completions.create() anthropic.messages.create() Different request/response shape model: 'gpt-4o' model: 'claude-sonnet-4-20250514' Different model IDs response.choices[0].message.content response.content[0].text Different response path system in messages array system as separate parameter Claude uses top-level system responseformat: { type: 'jsonobject' } System prompt: "Respond in JSON only" No native JSON mode tools / functioncalling tools (similar but different schema) Input schema differences openai.embeddings.create() N/A — use Voyage or Cohere No embeddings API SDK Swap Instructions Step 1: Before (OpenAI) Step 2: After (Anthropic) Key Differences 1. maxtokens is required — OpenAI defaults it, Anthropic requires it 2. system is a top-level param — not a message in the array 3. First message must be user — can't start with assistant 4. Messages must alternate — no two user or two assistant messages in a row 5. Response shape — content[0].text not choices[0].message.content 6. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/clade-migration-deep-dive

View the source on GitHub

Browse the @skills marketplace