clade-migration-deep-dive

Featured

Migrate from OpenAI/GPT to Anthropic/Claude — API differences, Use when working with migration-deep-dive patterns. prompt adaptation, SDK swap, and feature mapping. Trigger with "migrate to claude", "openai to anthropic", "switch from gpt to claude", "replace openai with anthropic".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 (max_tokens 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` | | `response_format: { type: 'json_object' }` | System prompt: "Respond in JSON only" | No native JSON mode | | `tools` / `function_calling` | `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) ```typescript import OpenAI from 'openai'; const openai = new OpenAI(); const response = await openai.chat.completions.create({ model: 'gpt-4o', messages: [ { role: 'system', content: 'You are helpful.' }, { role: 'user', content: 'Hello' }, ], }); console.log(response.choices[0].message.content); ``` ### Step 2: After (Ant...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category