[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F86V6CGHMWVR4KP9ANXEZB":3,"skill-same:01M6F86V6CGHMWVR4KP9ANXEZB":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6F86V6CGHMWVR4KP9ANXEZB","clade-migration-deep-dive",null,"Migrate from OpenAI\u002FGPT to Anthropic\u002FClaude — API differences,\nUse when working with migration-deep-dive patterns.\nprompt adaptation, SDK swap, and feature mapping.\nTrigger with \"migrate to claude\", \"openai to anthropic\",\n\"switch from gpt to claude\", \"replace openai with anthropic\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-migration-deep-dive\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"migration","clade migration deep dive","deep","switch","code","with","trigger","io","feature","adaptation","saas","swap","api","sdk","use","edit","write","read","prompt","migrate","2026-11-10 10:12:30",false,"---\nname: clade-migration-deep-dive\ndescription: |\n  Migrate from OpenAI\u002FGPT to Anthropic\u002FClaude — API differences,\n  Use when working with migration-deep-dive patterns.\n  prompt adaptation, SDK swap, and feature mapping.\n  Trigger with \"migrate to claude\", \"openai to anthropic\",\n  \"switch from gpt to claude\", \"replace openai with anthropic\".\nallowed-tools: Read, Write, Edit, Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code\ntags: [saas, anthropic, claude, migration, openai]\n---\n\n# Migrate from OpenAI to Anthropic\n\n## Overview\nMigrate from OpenAI\u002FGPT to Anthropic\u002FClaude. Covers the complete API mapping (endpoints, models, response shapes), SDK swap with before\u002Fafter code, five key differences (max_tokens required, system as top-level param, alternating messages, response path, streaming events), and tool use migration.\n\n\n## API Mapping\n\n| OpenAI | Anthropic | Notes |\n|--------|-----------|-------|\n| `openai.chat.completions.create()` | `anthropic.messages.create()` | Different request\u002Fresponse shape |\n| `model: 'gpt-4o'` | `model: 'claude-sonnet-4-20250514'` | Different model IDs |\n| `response.choices[0].message.content` | `response.content[0].text` | Different response path |\n| `system` in messages array | `system` as separate parameter | Claude uses top-level `system` |\n| `response_format: { type: 'json_object' }` | System prompt: \"Respond in JSON only\" | No native JSON mode |\n| `tools` \u002F `function_calling` | `tools` (similar but different schema) | Input schema differences |\n| `openai.embeddings.create()` | N\u002FA — use Voyage or Cohere | No embeddings API |\n\n## SDK Swap\n\n## Instructions\n\n### Step 1: Before (OpenAI)\n```typescript\nimport OpenAI from 'openai';\nconst openai = new OpenAI();\n\nconst response = await openai.chat.completions.create({\n  model: 'gpt-4o',\n  messages: [\n    { role: 'system', content: 'You are helpful.' },\n    { role: 'user', content: 'Hello' },\n  ],\n});\nconsole.log(response.choices[0].message.content);\n```\n\n### Step 2: After (Anthropic)\n```typescript\nimport Anthropic from '@claude-ai\u002Fsdk';\nconst anthropic = new Anthropic();\n\nconst response = await anthropic.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024, \u002F\u002F Required (not optional like OpenAI)\n  system: 'You are helpful.', \u002F\u002F Separate from messages\n  messages: [\n    { role: 'user', content: 'Hello' },\n  ],\n});\nconsole.log(response.content[0].text);\n```\n\n## Key Differences\n1. **`max_tokens` is required** — OpenAI defaults it, Anthropic requires it\n2. **`system` is a top-level param** — not a message in the array\n3. **First message must be `user`** — can't start with assistant\n4. **Messages must alternate** — no two user or two assistant messages in a row\n5. **Response shape** — `content[0].text` not `choices[0].message.content`\n6. **Streaming events** — different event types and structure\n\n## Tool Use Migration\n```typescript\n\u002F\u002F OpenAI tool definition\n{ type: 'function', function: { name: 'get_weather', parameters: { ... } } }\n\n\u002F\u002F Anthropic tool definition\n{ name: 'get_weather', input_schema: { ... } }  \u002F\u002F Flatter structure\n```\n\n## Grep & Replace\n```bash\n# Find all OpenAI imports\ngrep -rn \"from 'openai'\" --include=\"*.ts\" .\ngrep -rn \"import OpenAI\" --include=\"*.ts\" .\n\n# Find response access patterns to update\ngrep -rn \"choices\\[0\\]\" --include=\"*.ts\" .\ngrep -rn \"message.content\" --include=\"*.ts\" .  # May need updating\n```\n\n## Output\n- All `openai` imports replaced with `@claude-ai\u002Fsdk`\n- Response access patterns updated (`choices[0].message.content` → `content[0].text`)\n- System prompts moved from messages array to top-level `system` parameter\n- `max_tokens` added to all API calls (required, not optional)\n- Tool definitions restructured to Anthropic format\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee API Mapping table, Before\u002FAfter SDK code, Key Differences list, Tool Use Migration, and Grep & Replace commands above.\n\n## Resources\n- [Anthropic Messages API](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fmessages)\n- [Migration Guide](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fabout-claude\u002Fmodels)\n\n## Next Steps\nSee `clade-sdk-patterns` for production Anthropic SDK patterns.\n\n## Prerequisites\n- Existing OpenAI integration to migrate\n- Access to codebase with search capability\n- Test suite for comparing outputs between providers\n\n","# Migrate from OpenAI to Anthropic\n\n## Overview\nMigrate from OpenAI\u002FGPT to Anthropic\u002FClaude. Covers the complete API mapping (endpoints, models, response shapes), SDK swap with before\u002Fafter code, five key differences (max_tokens required, system as top-level param, alternating messages, response path, streaming events), and tool use migration.\n\n\n## API Mapping\n\n| OpenAI | Anthropic | Notes |\n|--------|-----------|-------|\n| `openai.chat.completions.create()` | `anthropic.messages.create()` | Different request\u002Fresponse shape |\n| `model: 'gpt-4o'` | `model: 'claude-sonnet-4-20250514'` | Different model IDs |\n| `response.choices[0].message.content` | `response.content[0].text` | Different response path |\n| `system` in messages array | `system` as separate parameter | Claude uses top-level `system` |\n| `response_format: { type: 'json_object' }` | System prompt: \"Respond in JSON only\" | No native JSON mode |\n| `tools` \u002F `function_calling` | `tools` (similar but different schema) | Input schema differences |\n| `openai.embeddings.create()` | N\u002FA — use Voyage or Cohere | No embeddings API |\n\n## SDK Swap\n\n## Instructions\n\n### Step 1: Before (OpenAI)\n```typescript\nimport OpenAI from 'openai';\nconst openai = new OpenAI();\n\nconst response = await openai.chat.completions.create({\n  model: 'gpt-4o',\n  messages: [\n    { role: 'system', content: 'You are helpful.' },\n    { role: 'user', content: 'Hello' },\n  ],\n});\nconsole.log(response.choices[0].message.content);\n```\n\n### Step 2: After (Anthropic)\n```typescript\nimport Anthropic from '@claude-ai\u002Fsdk';\nconst anthropic = new Anthropic();\n\nconst response = await anthropic.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024, \u002F\u002F Required (not optional like OpenAI)\n  system: 'You are helpful.', \u002F\u002F Separate from messages\n  messages: [\n    { role: 'user', content: 'Hello' },\n  ],\n});\nconsole.log(response.content[0].text);\n```\n\n## Key Differences\n1. **`max_tokens` is required** — OpenAI defaults it, Anthropic requires it\n2. **`system` is a top-level param** — not a message in the array\n3. **First message must be `user`** — can't start with assistant\n4. **Messages must alternate** — no two user or two assistant messages in a row\n5. **Response shape** — `content[0].text` not `choices[0].message.content`\n6. **Streaming events** — different event types and structure\n\n## Tool Use Migration\n```typescript\n\u002F\u002F OpenAI tool definition\n{ type: 'function', function: { name: 'get_weather', parameters: { ... } } }\n\n\u002F\u002F Anthropic tool definition\n{ name: 'get_weather', input_schema: { ... } }  \u002F\u002F Flatter structure\n```\n\n## Grep & Replace\n```bash\n# Find all OpenAI imports\ngrep -rn \"from 'openai'\" --include=\"*.ts\" .\ngrep -rn \"import OpenAI\" --include=\"*.ts\" .\n\n# Find response access patterns to update\ngrep -rn \"choices\\[0\\]\" --include=\"*.ts\" .\ngrep -rn \"message.content\" --include=\"*.ts\" .  # May need updating\n```\n\n## Output\n- All `openai` imports replaced with `@claude-ai\u002Fsdk`\n- Response access patterns updated (`choices[0].message.content` → `content[0].text`)\n- System prompts moved from messages array to top-level `system` parameter\n- `max_tokens` added to all API calls (required, not optional)\n- Tool definitions restructured to Anthropic format\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee API Mapping table, Before\u002FAfter SDK code, Key Differences list, Tool Use Migration, and Grep & Replace commands above.\n\n## Resources\n- [Anthropic Messages API](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fmessages)\n- [Migration Guide](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fdocs\u002Fabout-claude\u002Fmodels)\n\n## Next Steps\nSee `clade-sdk-patterns` for production Anthropic SDK patterns.\n\n## Prerequisites\n- Existing OpenAI integration to migrate\n- Access to codebase with search capability\n- Test suite for comparing outputs between providers\n\n",{"name":5,"tags":54,"author":58,"license":15,"version":59,"description":60,"allowed-tools":61,"compatible-with":62},[39,55,56,29,57],"anthropic","claude","openai","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Migrate from OpenAI\u002FGPT to Anthropic\u002FClaude — API differences,\nUse when working with migration-deep-dive patterns.\nprompt adaptation, SDK swap, and feature mapping.\nTrigger with \"migrate to claude\", \"openai to anthropic\",\n\"switch from gpt to claude\", \"replace openai with anthropic\".\n","Read, Write, Edit, Grep","claude-code","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-migration-deep-dive",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill clade-migration-deep-dive",{"tool":78,"command":79},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill clade-migration-deep-dive",{"tool":81,"command":82},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill clade-migration-deep-dive","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-migration-deep-dive\u002FSKILL.md",true,[],[87,97,107,115,121,128],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":93,"publishedAt":49},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[92],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[94,95,96],"model","model hierarchy","model hierarchy skill",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":103,"publishedAt":49},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[102],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[104,105,106],"MCP","zoom","zoom mcp",{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":49},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[42,113,114,105],"zoom apps sdk","apps",{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":49},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[117],{"skillNo":122,"name":123,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":127,"publishedAt":49},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[126],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[123],{"skillNo":129,"name":130,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":49},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[130]]