Use this skill when:
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionvercel-ai-sdkExecute the skills CLI command in your project's root directory to begin installation:
Fetches vercel-ai-sdk from wsimmonds/claude-nextjs-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate vercel-ai-sdk. Access via /vercel-ai-sdk in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
82
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
82
stars
Use this skill when:
useChat hook NEVER accept "Module not found" errors as environment issues
YOU must install the required packages with the CORRECT package manager
Common packages needed:
- ai (core AI SDK)
- @ai-sdk/openai (OpenAI provider)
- @ai-sdk/anthropic (Anthropic provider)
- @modelcontextprotocol/sdk (MCP integration)
- zod (for tool schemas)
</critical>
"Code is correct" is NOT enough
You must achieve FULL PASSING status
This is what it means to be an autonomous agent
</critical>
You are not just writing code - you are COMPLETING TASKS AUTONOMOUSLY.
This means:
❌ WRONG: "The code is correct, but the package isn't installed - that's an environment issue" ✅ CORRECT: "Build failed due to missing package - installing it now with npm install [package]"
❌ WRONG: "Tests pass but build fails - not my problem" ✅ CORRECT: "Build is failing - debugging the error and fixing it now"
❌ WRONG: "There's a framework bug, can't fix it" ✅ CORRECT: "Framework error detected - researching the issue, trying workarounds, debugging until I find a solution"
❌ WRONG: "The implementation is complete" (with failing tests) ✅ CORRECT: "Tests are failing - debugging and fixing until they all pass"
When you encounter "Module not found" errors:
Detect the package manager FIRST - Check for lockfiles:
ls -la | grep -E "lock"
# Look for: pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb
Identify the package from the import statement
Error: Cannot find module '@ai-sdk/openai'
Import: import { openai } from '@ai-sdk/openai'
Package needed: @ai-sdk/openai
Install with the CORRECT package manager
# If pnpm-lock.yaml exists (MOST COMMON for Next.js evals):
pnpm install @ai-sdk/openai
# or
pnpm add @ai-sdk/openai
# If package-lock.json exists:
npm install @ai-sdk/openai
# If yarn.lock exists:
yarn add @ai-sdk/openai
# If bun.lockb exists:
bun install @ai-sdk/openai
Re-run build to verify
npm run build
# or pnpm run build, yarn build, bun run build
Fix any new errors that appear
⚠️ CRITICAL WARNING: Using the WRONG package manager (e.g., npm when the project uses pnpm) will:
When build fails:
When tests fail:
Task is ONLY complete when:
npm run build succeeds)npm run lint succeeds)npm run test succeeds)NEVER stop at "code is correct" - achieve FULL PASSING status!
When implementing tool calling, you MUST use the tool() helper function from the 'ai' package.
// DO NOT DO THIS - This pattern is INCORRECT
import { z } from 'zod';
tools: {
myTool: {
description: 'My tool',
parameters: z.object({...}), // ❌ WRONG - "parameters" doesn't exist in v5
execute: async ({...}) => {...},
}
}
This will fail with: Type '{ description: string; parameters: ... }' is not assignable to type '{ inputSchema: FlexibleSchema<any>; ... }'
// ALWAYS DO THIS - This is the ONLY correct pattern
import { tool } from 'ai'; // ⚠️ MUST import tool
import { z } from 'zod';
tools: {
myTool: tool({ // ⚠️ MUST wrap with tool()
description: 'My tool',
inputSchema: z.object({...}), // ⚠️ MUST use "inputSchema" (not "parameters")
execute: async ({...}) => {...},
}),
}
Before implementing any tool, verify:
tool from 'ai' package: import { tool } from 'ai';tool({ ... })inputSchema property (NOT parameters)z.object({ ... })execute function with async callbackdescription string for the tool❌ WRONG (v4 pattern):
const { messages, input, setInput, append } = useChat();
// Sending message
append({ content: text, role: 'user' });
✅ CORRECT (v5 pattern):
const { messages, sendMessage } = useChat();
const [input, setInput] = useState('');
// Sending message
sendMessage({ text: input });
❌ WRONG (v4 simple content):
<div>{message.content}</div>
✅ CORRECT (v5 parts-based):
<div>
{message.parts.map((part, index) =>
part.type === 'text' ? <span key={index}>{part.text}</span> : null
)}
</div>
✅ PREFER: String-based (v5 recommended):
import { generateText } from 'ai';
const result = await generateText({
model: 'openai/gpt-4o', // String format
prompt: 'Hello',
});
✅ ALSO WORKS: Function-based (legacy support):
import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';
const result = await generateText({
model: openai('gpt-4o'), // Function format
prompt: 'Hello',
});
Purpose: Generate text for non-interactive use cases (email drafts, summaries, agents with tools).
Signature:
import { generateText } from 'ai';
const result = await generateText({
model: 'openai/gpt-4o', // String format: 'provider/model-id'
prompt: 'Your prompt here', // User input
system: 'Optional system message', // Optional system instructions
tools?: { ... }, // Optional tool calling
maxSteps?: 5, // For multi-step tool calling
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
vercel-labs/skills
vercel-labs/agent-skills
vercel-labs/agent-skills
davila7/claude-code-templates
intellectronica/agent-skills
am-will/codex-skills
vercel-ai-sdk is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
vercel-ai-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
We added vercel-ai-sdk from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Registry listing for vercel-ai-sdk matched our evaluation — installs cleanly and behaves as described in the markdown.
vercel-ai-sdk fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Solid pick for teams standardizing on skills: vercel-ai-sdk is focused, and the summary matches what you get after install.
vercel-ai-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: vercel-ai-sdk is focused, and the summary matches what you get after install.
Useful defaults in vercel-ai-sdk — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
vercel-ai-sdk reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 47