johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk
Claude Code and agent skill by johnku2011/boilerplates-with-ai-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when adding chat routes, LLM tools, structured outputs, or streaming UI with the Vercel AI SDK in this Next.js AI app.
Install
npx vskill@latest install johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdkSKILL.md
The same SKILL.md was published earlier as johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk.
Next.js AI SDK
Overview
Build AI product features with the Vercel AI SDK: server route handlers for streaming, Zod-validated tool schemas, and thin client UI. Keep secrets and model calls on the server.
Process
- Add or extend
app/api/chat/route.tswithstreamText(or equivalent) — never
call providers from client components with secret keys.
- Define tools with Zod schemas in
lib/tools.ts(or colocated modules); return
typed, small results agents/UI can render.
- Prefer structured outputs (
generateObject/ schema) when the UI needs a
known shape instead of free-form prose.
- Keep
app/page.tsx(or chat UI) as a client leaf; pass messages to the API
route only.
- Verify with
npm run typecheckandnpm run build. Smoke the chat UI with
npm run dev when changing streaming behavior.
Guidelines
- Read
OPENAI_API_KEY(or provider env) only on the server. - Validate all tool arguments with Zod; reject unknown keys.
- Document model id and provider choice in code comments when non-default.
- For browser QA of the chat UI, use the project Playwright MCP (see AGENTS.md).
- Re-check secrets and data exposure with
project-securitybefore shipping.
Anti-patterns
- Exposing API keys via
NEXT_PUBLIC_*. - Untyped tool arguments or free-form JSON without a schema.
- Doing privileged tool work in the browser.
- Giant route handlers mixing UI strings, prompts, and business logic.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingboilerplates/nextjs-ai-app/skills/nextjs-ai-sdk/SKILL.md
Popularity
- Repository stars
- 240
- Repository forks
- 24
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk)