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.5 | $0.00014 | $0.00172 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (239 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 431 once invoked, about $0.0001 per session on Opus 5.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
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
prompt-engineer
Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…
prompt-optimization
Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…
omh-model-optimization
This is a Hermes-native model-optimization workflow skill.
ideogram4
Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…
prompt-library-for-startups
AWS-curated copy-paste prompts for AI coding agents (MVP scaffolding, RAG chatbot with Claude on Bedrock, security baseline evaluation, cost anomaly detection, GPU quota requests, EKS deployment, Well-Architected review, etc.) plus downloadable installable agents (Multi-Account Transition Advisor, Bill Shock…