Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add johnku2011/boilerplates-with-ai-skills --skill nextjs-ai-sdkgit clone --depth 1 https://github.com/johnku2011/boilerplates-with-ai-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk)<a href="https://agentmods.dev/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk"><img src="https://agentmods.dev/badge/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk"><img src="https://agentmods.dev/badge/skills/johnku2011/boilerplates-with-ai-skills/nextjs-ai-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.00431 |
| Opus 5 | $0.00017 | $0.00216 |
| Sonnet 5 | $0.00007 | $0.00086 |
| Haiku 4.5 | $0.00003 | $0.00043 |
Grade A, and why
nextjs-ai-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
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 withnpm run devwhen 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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 46 lines · 35 tokens per session scan A c7676103215e
nextjs-ai-sdk is a skill published in the GitHub repository johnku2011/boilerplates-with-ai-skills (240 stars, last pushed 19d ago), licensed MIT. It adds 35 tokens to every session and 431 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
claude-api-in-prototypes
Call Claude from your HTML artifacts via window.claude.complete.
html-to-interaction-prompts
Convert a supplied HTML page or generated HTML reference into a screenshot-backed article containing multiple reusable interaction prompts. Use when the user provides an HTML file, exported page, generated-page.html, or local/live reference and asks to extract animation/interactions, create prompts, capture…
typescript-data-visualization-engineering
Build typed data visualizations in TypeScript. Use when the user wants TypeScript visualization code, typed data models, browser visualization components, UML-like diagram models, interactive graph or architecture diagram contracts, scroll-driven scene contracts, library selection guidance, or a maintainable…
ag-referencia-prompt-guide
Guia canonico de prompts para gerar UI em Claude/Cursor/Lovable/v0. Estrutura 6 blocos (Contexto/Layout/Estilo/Refs/Constraints/Entregavel). Invocar ANTES de pedir geracao de UI.
vercel-ai-sdk
Implementation patterns for Vercel AI SDK in generative UI applications.
image-prompt-guide
A reference guide for writing prompts that tell an AI image generator what picture to create.