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 fluid-tools/claude-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
16
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
16
stars
Use this skill when:
useChat hookToolLoopAgentOutput.object(), Output.array(), etc. 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)
- @ai-sdk/mcp (MCP integration)
- @modelcontextprotocol/sdk (MCP client SDK)
- 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/anthropic'
Import: import { anthropic } from '@ai-sdk/anthropic'
Package needed: @ai-sdk/anthropic
Install with the CORRECT package manager
# If pnpm-lock.yaml exists (MOST COMMON for Next.js evals):
pnpm install @ai-sdk/anthropic
# or
pnpm add @ai-sdk/anthropic
# If package-lock.json exists:
npm install @ai-sdk/anthropic
# If yarn.lock exists:
yarn add @ai-sdk/anthropic
# If bun.lockb exists:
bun install @ai-sdk/anthropic
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!
In v6, generateObject and streamObject are DEPRECATED. Use generateText/streamText with Output helpers instead.
// DO NOT USE - DEPRECATED in v6
import { generateObject } from "ai";
const result = await generateObject({
model: anthropic("claude-sonnet-4-5"),
schema: z.object({
sentiment: z.enum(["positive", "neutral", "negative"]),
}),
prompt: "Analyze sentiment",
});
import { generateText, Output } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
const { output } = await generateText({
model: anthropic("claude-sonnet-4-5"),
output: Output.object({
schema: z.object({
sentiment: z.enum(["positive", "neutral", "negative"]),
topics: z.array(z.string()),
}),
}),
prompt: "Analyze this feedback...",
});
// Access typed output
console.log(output.sentiment); // 'positive' | 'neutral' | 'negative'
console.log(output.topics); // string[]
| Helper | Purpose | Example |
|---|---|---|
Output.object() |
Generate typed object | Output.object({ schema: z.object({...}) }) |
Output.array() |
Generate typed array | Output.array({ schema: z.string() }) |
Output.choice() |
Generate enum value | Output.choice({ choices: ['A', 'B', 'C'] }) |
Output.json() |
Unstructured JSON | Output.json() |
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 v6
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 toolimport { ToolLoopAgent, tool, stepCountIs } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
const myAgent = new ToolLoopAgent({
model: anthropic("claude-sonnet-4-5"),
instructions: "You are a helpful assistant that can search and analyze data.",
tools: {
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ 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.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
find-skills
34vercel-labs/skills
Productivitytag: vercelvercel-react-best-practices
25vercel-labs/agent-skills
Frontendtag: vercelvercel-composition-patterns
11vercel-labs/agent-skills
Frontendtag: vercelml-paper-writing
76davila7/claude-code-templates
AI/MLsame categorybeautiful-mermaid
32intellectronica/agent-skills
AI/MLsame categoryllm-council
26am-will/codex-skills
AI/MLsame categoryReviews
4.7★★★★★38 reviews- DDhruvi Jain★★★★★Dec 28, 2024
Useful defaults in vercel-ai-sdk — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- CCamila Garcia★★★★★Dec 20, 2024
I recommend vercel-ai-sdk for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- IIra Martinez★★★★★Dec 4, 2024
vercel-ai-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
- NNia Martin★★★★★Nov 23, 2024
Useful defaults in vercel-ai-sdk — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- OOshnikdeep★★★★★Nov 19, 2024
vercel-ai-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
- CCamila Haddad★★★★★Nov 11, 2024
Solid pick for teams standardizing on skills: vercel-ai-sdk is focused, and the summary matches what you get after install.
- IIra Torres★★★★★Oct 14, 2024
I recommend vercel-ai-sdk for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- GGanesh Mohane★★★★★Oct 10, 2024
Solid pick for teams standardizing on skills: vercel-ai-sdk is focused, and the summary matches what you get after install.
- FFatima Sharma★★★★★Oct 2, 2024
vercel-ai-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
- RRahul Santra★★★★★Sep 25, 2024
We added vercel-ai-sdk from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 38
1 / 4Discussion
Comments — not star reviews- No comments yet — start the thread.