Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
Python aianthropicautomationclaude-codeclaude-skillscloudflaredevtoolsproductivityreactskillstailwindvite
fix(ai-sdk): Update AI SDK skills to latest versions and models
Jezece68c9f2952
diff --git a/VERSIONS_REPORT.md b/VERSIONS_REPORT.mdindex 3be06d30..4079a56f 100644--- a/VERSIONS_REPORT.md+++ b/VERSIONS_REPORT.md@@ -1,32 +1,31 @@## NPM Packages-**Checked**: 2025-11-17 02:34:28 UTC+**Checked**: 2025-11-19 12:32:11 UTC-### ai-sdk-core+### ai-sdk-ui| Package | Current | Latest | Status ||---------|---------|--------|--------|+| node | 8.0.0 | 25.2.1 | ❌ **MAJOR** (breaking) |+| npm | 9.0.0 | 11.6.2 | ❌ **MAJOR** (breaking) |+| packageManager | 0.0.0 | _error_ | ⚠️ Could not fetch |+| node | 8.0.0 | 25.2.1 | ❌ **MAJOR** (breaking) |+| npm | 9.0.0 | 11.6.2 | ❌ **MAJOR** (breaking) |+| packageManager | 0.0.0 | _error_ | ⚠️ Could not fetch |---## GitHub Releases-**Checked**: 2025-11-17 02:34:28 UTC+**Checked**: 2025-11-19 12:32:14 UTC-### ai-sdk-core--| Repository | Latest Release | Status |-|------------|----------------|--------|-| cloudflare/ai | [email protected] | ⚠️ Check docs |-| vercel/ai | @ai-sdk/[email protected] | ⚠️ Check docs |----## Skill Metadata-**Checked**: 2025-11-17 02:34:29 UTC+**Checked**: 2025-11-19 12:32:14 UTC**Stale Threshold**: 90 days@@ -35,27 +34,16 @@## AI Models-**Checked**: 2025-11-17 02:34:29 UTC+**Checked**: 2025-11-19 12:32:14 UTC-### ai-sdk-core+### ai-sdk-ui| Model | Provider | Status | Notes ||-------|----------|--------|-------|| gpt-3 | OpenAI | ❓ Unknown | Not in known models list || gpt-4 | OpenAI | ⚠️ **Deprecated** | Use gpt-4-turbo or gpt-5 || gpt-4-turbo | OpenAI | ✅ Current | Previous generation |-| gpt-5 | OpenAI | ✅ Current | Latest flagship model |-| claude-3-5-sonnet-20241022 | Anthropic | ❓ Unknown | Not in known models list |-| claude-3-haiku-20240307 | Anthropic | ❓ Unknown | Not in known models list |-| claude-3-opus-20240229 | Anthropic | ❓ Unknown | Not in known models list |-| claude-opus-4-20250522 | Anthropic | ❓ Unknown | Not in known models list |-| claude-sonnet-4-20250522 | Anthropic | ❓ Unknown | Not in known models list |-| claude-sonnet-4-5-20250929 | Anthropic | ✅ Current | Dated model ID |-| gemini-2.5-flash | Google | ✅ Current | Fast model |-| gemini-2.5-flash-lite | Google | ✅ Current | Lightweight (not in CLI) |-| gemini-2.5-pro | Google | ✅ Current | Latest Pro model |-| @cf/meta/llama-3.1-8b-instruct | Cloudflare | ✅ Current | Llama 3.1 8B |---@@ -63,6 +51,7 @@### High Priority+- ❌ **4 major (breaking) package update(s)** - Review migration guides before updating- ⚠️ **1 deprecated AI model reference(s)** - Update to current models---diff --git a/skills/ai-sdk-core/README.md b/skills/ai-sdk-core/README.mdindex 36df14d3..d713e3c7 100644--- a/skills/ai-sdk-core/README.md+++ b/skills/ai-sdk-core/README.md@@ -82,14 +82,22 @@ See `SKILL.md` for comprehensive documentation and examples.## Version-- **Skill Version**: 1.1.0-- **AI SDK Version**: 5.0.81+-- **Last Updated**: 2025-10-29+- **Skill Version**: 1.1.1+- **AI SDK Version**: 5.0.95++- **Last Updated**: 2025-11-19-## Recent Updates (v1.1.0)+## Recent Updates (v1.1.1 - 2025-11-19)++- **Updated Package Versions**: AI SDK 5.0.95, @ai-sdk/anthropic 2.0.45, @ai-sdk/openai 2.0.68, @ai-sdk/google 2.0.38+- **Updated Template Models**: anthropic-setup.ts and openai-setup.ts now use latest model IDs+ - Claude: Sonnet 4.5, Opus 4.0, Haiku 4.5 (deprecated Claude 3.x models as commented examples)+ - OpenAI: GPT-5.1, GPT-5-Pro, GPT-4.1, o3 reasoning model (previous gen as comments)+- **Added Metadata**: YAML frontmatter now includes version tracking and last_verified date+- **Zod 3.x for Compatibility**: Templates use Zod 3.23.8 for maximum compatibility (AI SDK supports both 3.x and 4.x)++## Previous Updates (v1.1.0 - 2025-10-29)- **Updated Model Names**: Claude 4.x (Sonnet 4.5, Opus 4), GPT-5, Gemini 2.5 models now GA-- **Updated Package Versions**: AI SDK 5.0.81, @ai-sdk/anthropic 2.0.38, @ai-sdk/openai 2.0.56, @ai-sdk/google 2.0.24- **Zod 4 Support Documented**: AI SDK 5 supports both Zod 3.x and 4.x (4.1.12 latest)- **Issue #4726 Resolved**: streamText now has onError callback (fixed in v4.1.22)- **Deprecated Claude 3.x**: Anthropic deprecated Claude 3.x models in favor of Claude 4.x familydiff --git a/skills/ai-sdk-core/SKILL.md b/skills/ai-sdk-core/SKILL.mdindex 26e22b47..f60e87f0 100644--- a/skills/ai-sdk-core/SKILL.md+++ b/skills/ai-sdk-core/SKILL.md@@ -14,6 +14,12 @@ description: |google gemini sdk, workers-ai-provider, ai streaming backend, multi-provider ai, ai sdk errors,AI_APICallError, AI_NoObjectGeneratedError, streamText fails, worker startup limit ailicense: MIT+metadata:+ version: 1.1.1+ last_verified: 2025-11-19+ ai_sdk_version: 5.0.95++ breaking_changes: false+ production_tested: true---# AI SDK Core@@ -1709,10 +1715,10 @@ See Vercel's official deployment documentation: https://vercel.com/docs/function```json{"dependencies": {- "ai": "^5.0.81",- "@ai-sdk/openai": "^2.0.56",- "@ai-sdk/anthropic": "^2.0.38",- "@ai-sdk/google": "^2.0.24",+ "ai": "^5.0.95",+ "@ai-sdk/openai": "^2.0.68",+ "@ai-sdk/anthropic": "^2.0.45",+ "@ai-sdk/google": "^2.0.38","workers-ai-provider": "^2.0.0","zod": "^3.23.8"},@@ -1724,14 +1730,15 @@ See Vercel's official deployment documentation: https://vercel.com/docs/function```**Version Notes:**-- AI SDK v5.0.81+ (stable, latest as of October 2025)+- AI SDK v5.0.95+ (stable, latest as of November 2025)- v6 is in beta - not covered in this skill-- **Zod compatibility**: This skill uses Zod 3.x, but AI SDK 5 officially supports both Zod 3.x and Zod 4.x (4.1.12 latest)- - Zod 4 recommended for new projects (released August 2025)+- **Zod compatibility**: This skill uses Zod 3.x for maximum compatibility, but AI SDK 5 officially supports both Zod 3.x and Zod 4.x (4.1.12 latest)+ - Zod 3.23.8 recommended for templates (stable, maximum compatibility)- Zod 4 has breaking changes: error APIs, `.default()` behavior, `ZodError.errors` removed- Some peer dependency warnings may occur with `zod-to-json-schema` when using Zod 4- See https://zod.dev/v4/changelog for migration guide- Provider packages at 2.0+ for v5 compatibility+- **Model updates (Nov 2025)**: Latest models include GPT-5.1, GPT-4.1, o3 (OpenAI); Claude Sonnet 4.5, Opus 4.0, Haiku 4.5 (Anthropic)**Check Latest Versions:**```bash@@ -1816,6 +1823,6 @@ All files are optimized for copy-paste into your project.----**Last Updated:** 2025-10-29-**Skill Version:** 1.1.0-**AI SDK Version:** 5.0.81++**Last Updated:** 2025-11-19+**Skill Version:** 1.1.1+**AI SDK Version:** 5.0.95+diff --git a/skills/ai-sdk-core/templates/agent-with-tools.ts b/skills/ai-sdk-core/templates/agent-with-tools.tsindex 8c5e3176..a048f122 100644--- a/skills/ai-sdk-core/templates/agent-with-tools.ts+++ b/skills/ai-sdk-core/templates/agent-with-tools.ts@@ -7,7 +7,7 @@ import { z } from 'zod';// Create agent with toolsconst weatherAgent = new Agent({- model: anthropic('claude-3-5-sonnet-20241022'),+ model: anthropic('claude-sonnet-4-5'),system: 'You are a weather assistant. Always provide temperature in the user\'s preferred unit.',tools: {getWeather: tool({diff --git a/skills/ai-sdk-core/templates/anthropic-setup.ts b/skills/ai-sdk-core/templates/anthropic-setup.tsindex 0aebc5a9..9f7f005b 100644--- a/skills/ai-sdk-core/templates/anthropic-setup.ts+++ b/skills/ai-sdk-core/templates/anthropic-setup.ts@@ -9,25 +9,32 @@ async function main() {// Method 1: Use environment variable (recommended)// ANTHROPIC_API_KEY=sk-ant-...- const model1 = anthropic('claude-3-5-sonnet-20241022');+ const model1 = anthropic('claude-sonnet-4-5');// Method 2: Explicit API key- const model2 = anthropic('claude-3-5-sonnet-20241022', {+ const model2 = anthropic('claude-sonnet-4-5', {apiKey: process.env.ANTHROPIC_API_KEY,});- // Available models+ // Available models (Claude 4.x family - current)const models = {- sonnet35: anthropic('claude-3-5-sonnet-20241022'), // Best balance- opus: anthropic('claude-3-opus-20240229'), // Highest intelligence- haiku: anthropic('claude-3-haiku-20240307'), // Fastest+ sonnet45: anthropic('claude-sonnet-4-5'), // Latest, recommended+ opus4: anthropic('claude-opus-4-0'), // Highest intelligence+ haiku45: anthropic('claude-haiku-4-5'), // Fastest};+ // Legacy models (Claude 3.x - deprecated, use Claude 4.x instead)+ // const legacyModels = {+ // sonnet35: anthropic('claude-3-5-sonnet-20241022'),+ // opus3: anthropic('claude-3-opus-20240229'),+ // haiku3: anthropic('claude-3-haiku-20240307'),+ // };+// Example: Generate text with Claude- console.log('Generating text with Claude 3.5 Sonnet...\n');+ console.log('Generating text with Claude Sonnet 4.5...\n');const result = await generateText({- model: models.sonnet35,+ model: models.sonnet45,prompt: 'Explain what makes Claude different from other AI assistants in 2 sentences.',maxOutputTokens: 150,});@@ -42,7 +49,7 @@ async function main() {console.log('\n=== Long Context Example ===\n');const longContextResult = await generateText({- model: models.sonnet35,+ model: models.sonnet45,messages: [{role: 'user',@@ -60,10 +67,11 @@ async function main() {// Model selection guideconsole.log('\n=== Model Selection Guide ===');- console.log('- Claude 3.5 Sonnet: Best balance of intelligence, speed, and cost');- console.log('- Claude 3 Opus: Highest intelligence, best for complex reasoning');- console.log('- Claude 3 Haiku: Fastest and most cost-effective');- console.log('\nAll Claude models support 200K+ token context windows');+ console.log('- Claude Sonnet 4.5: Latest model, best balance (recommended)');+ console.log('- Claude Opus 4.0: Highest intelligence for complex reasoning');+ console.log('- Claude Haiku 4.5: Fastest and most cost-effective');+ console.log('\nAll Claude 4.x models support extended context windows');+ console.log('Note: Claude 3.x models deprecated in 2025, use Claude 4.x instead');}main().catch(console.error);diff --git a/skills/ai-sdk-core/templates/openai-setup.ts b/skills/ai-sdk-core/templates/openai-setup.tsindex 75542dda..6e743736 100644--- a/skills/ai-sdk-core/templates/openai-setup.ts+++ b/skills/ai-sdk-core/templates/openai-setup.ts@@ -16,14 +16,22 @@ async function main() {apiKey: process.env.OPENAI_API_KEY,});- // Available models+ // Available models (latest)const models = {- gpt4Turbo: openai('gpt-4-turbo'),- gpt4: openai('gpt-4'),- gpt35Turbo: openai('gpt-3.5-turbo'),- gpt5: openai('gpt-5'), // If available in your account+ gpt51: openai('gpt-5.1'), // Latest flagship model (Nov 2025)+ gpt5Pro: openai('gpt-5-pro'), // Advanced reasoning+ gpt41: openai('gpt-4.1'), // Latest GPT-4 series+ o3: openai('o3'), // Reasoning model+ gpt4Turbo: openai('gpt-4-turbo'), // Previous generation (still excellent)+ gpt35Turbo: openai('gpt-3.5-turbo'), // Fast, cost-effective};+ // Older models (still functional)+ // const olderModels = {+ // gpt5: openai('gpt-5'), // Superseded by gpt-5.1+ // gpt4: openai('gpt-4'), // Use gpt-4-turbo instead+ // };+// Example: Generate text with GPT-4console.log('Generating text with GPT-4 Turbo...\n');@@ -62,10 +70,12 @@ async function main() {// Model selection guideconsole.log('\n=== Model Selection Guide ===');- console.log('- gpt-4-turbo: Best for complex reasoning, current model');- console.log('- gpt-4: High quality, slightly older');+ console.log('- gpt-5.1: Latest flagship model (November 2025)');+ console.log('- gpt-5-pro: Advanced reasoning and complex tasks');+ console.log('- o3: Specialized reasoning model');+ console.log('- gpt-4.1: Latest GPT-4 series, excellent quality');+ console.log('- gpt-4-turbo: Previous generation, still very capable');console.log('- gpt-3.5-turbo: Fast and cost-effective for simple tasks');- console.log('- gpt-5: Latest model (if available)');}main().catch(console.error);diff --git a/skills/ai-sdk-core/templates/package.json b/skills/ai-sdk-core/templates/package.jsonindex 84349369..f34d82ab 100644--- a/skills/ai-sdk-core/templates/package.json+++ b/skills/ai-sdk-core/templates/package.json@@ -10,10 +10,10 @@"type-check": "tsc --noEmit"},"dependencies": {- "ai": "^5.0.81",- "@ai-sdk/openai": "^2.0.56",- "@ai-sdk/anthropic": "^2.0.38",- "@ai-sdk/google": "^2.0.24",+ "ai": "^5.0.95",+ "@ai-sdk/openai": "^2.0.68",+ "@ai-sdk/anthropic": "^2.0.45",+ "@ai-sdk/google": "^2.0.38","workers-ai-provider": "^2.0.0","zod": "^3.23.8"},diff --git a/skills/ai-sdk-core/templates/stream-text-chat.ts b/skills/ai-sdk-core/templates/stream-text-chat.tsindex 78132bc2..f48c964f 100644--- a/skills/ai-sdk-core/templates/stream-text-chat.ts+++ b/skills/ai-sdk-core/templates/stream-text-chat.ts@@ -6,7 +6,7 @@ import { anthropic } from '@ai-sdk/anthropic';async function main() {const stream = streamText({- model: anthropic('claude-3-5-sonnet-20241022'),+ model: anthropic('claude-sonnet-4-5'),messages: [{role: 'system',diff --git a/skills/ai-sdk-ui/README.md b/skills/ai-sdk-ui/README.mdindex c1f4c24b..1787ac24 100644--- a/skills/ai-sdk-ui/README.md+++ b/skills/ai-sdk-ui/README.md@@ -1,9 +1,9 @@# AI SDK UI - Frontend React Hooks-**Version**: AI SDK v5.0.76++**Version**: AI SDK v5.0.95+**Status**: Production-Ready ✅**Framework**: React 18+, Next.js 14+-**Last Updated**: 2025-10-22+**Last Updated**: 2025-11-19---@@ -308,10 +308,19 @@ This skill documents and prevents 12 common UI errors:- ✅ All 11 templates work copy-paste- ✅ v5 breaking changes documented- ✅ 12 common errors prevented-- ✅ Package versions current (2025-10-22)+- ✅ Package versions current (2025-11-19)- ✅ Next.js App Router & Pages Router examples- ✅ Token savings: 55%---+## Recent Updates (v1.0.1 - 2025-11-19)++- **Updated Package Versions**: AI SDK 5.0.95, @ai-sdk/anthropic 2.0.45, @ai-sdk/openai 2.0.68, @ai-sdk/google 2.0.38+- **Added Metadata**: YAML frontmatter now includes version tracking and last_verified date+- **Clarified Engine Versions**: Added comment explaining minimum supported versions in package.json+- **Zod 3.x for Compatibility**: Templates use Zod 3.23.8 for maximum compatibility++---+**License**: MITdiff --git a/skills/ai-sdk-ui/SKILL.md b/skills/ai-sdk-ui/SKILL.mdindex 09fa8008..2cd4f457 100644--- a/skills/ai-sdk-ui/SKILL.md+++ b/skills/ai-sdk-ui/SKILL.md@@ -13,15 +13,21 @@ description: |ai file attachments, message persistence, useChat error, streaming failed ui, parse stream error,useChat no response, react ai hooks, nextjs app router ai, nextjs pages router ailicense: MIT+metadata:+ version: 1.0.1+ last_verified: 2025-11-19+ ai_sdk_version: 5.0.95++ breaking_changes: false+ production_tested: true---# AI SDK UI - Frontend React HooksFrontend React hooks for AI-powered user interfaces with Vercel AI SDK v5.-**Version**: AI SDK v5.0.76+ (Stable)+**Version**: AI SDK v5.0.95+ (Stable)**Framework**: React 18+, Next.js 14+-**Last Updated**: 2025-10-22+**Last Updated**: 2025-11-19---@@ -962,8 +968,8 @@ See `references/streaming-patterns.md` for comprehensive best practices.```json{"dependencies": {- "ai": "^5.0.76",- "@ai-sdk/openai": "^2.0.53",+ "ai": "^5.0.95",+ "@ai-sdk/openai": "^2.0.68","react": "^18.2.0","zod": "^3.23.8"}@@ -982,10 +988,10 @@ See `references/streaming-patterns.md` for comprehensive best practices.```**Version Notes:**-- AI SDK v5.0.76+ (stable)+- AI SDK v5.0.95+ (stable, latest as of November 2025)- React 18+ (React 19 supported)- Next.js 14+ recommended (13.4+ works)-- Zod 3.23.8+ for schema validation+- Zod 3.23.8+ for schema validation (templates use 3.x for compatibility)---@@ -1046,4 +1052,4 @@ See `references/` for:---**Production Tested**: WordPress Auditor (https://wordpress-auditor.webfonts.workers.dev)-**Last Updated**: 2025-10-22+**Last Updated**: 2025-11-19diff --git a/skills/ai-sdk-ui/references/use-chat-migration.md b/skills/ai-sdk-ui/references/use-chat-migration.mdindex b9eb6bfa..f11482d1 100644--- a/skills/ai-sdk-ui/references/use-chat-migration.md+++ b/skills/ai-sdk-ui/references/use-chat-migration.md@@ -3,7 +3,7 @@Complete guide to migrating from AI SDK v4 to v5 for UI hooks.**Last Updated**: 2025-10-22-**Applies to**: AI SDK v5.0.76++**Applies to**: AI SDK v5.0+---diff --git a/skills/ai-sdk-ui/templates/package.json b/skills/ai-sdk-ui/templates/package.jsonindex 5a76caf1..b746c6ea 100644--- a/skills/ai-sdk-ui/templates/package.json+++ b/skills/ai-sdk-ui/templates/package.json@@ -11,10 +11,10 @@"type-check": "tsc --noEmit"},"dependencies": {- "ai": "^5.0.76",- "@ai-sdk/openai": "^2.0.53",- "@ai-sdk/anthropic": "^2.0.0",- "@ai-sdk/google": "^2.0.0",+ "ai": "^5.0.95",+ "@ai-sdk/openai": "^2.0.68",+ "@ai-sdk/anthropic": "^2.0.45",+ "@ai-sdk/google": "^2.0.38","react": "^18.2.0","react-dom": "^18.2.0","next": "^14.0.0",@@ -40,5 +40,6 @@"node": ">=18.0.0","npm": ">=9.0.0"},- "packageManager": "[email protected]"+ "packageManager": "[email protected]",+ "comment": "Engine versions specify minimum supported versions for compatibility"}