nextjs-chatbot

Solid

Advanced patterns for production Next.js web chatbots built with AI SDK 6 + ai-elements. Covers tool calling with human-in-the-loop (HITL) approval, PostgreSQL session persistence, GDPR consent gating, SQL-first search, per-tool UI rendering, popup widget embedding, message feedback, follow-up suggestions, scope enforcement, and evals. Use when building a customer support bot, conversational interface, or any web chatbot needing tool approval, database sessions, or custom tool output components. Not a scaffolding tool — use `/ai-app` to scaffold from scratch, `/ai-sdk-6` for general SDK questions, `/ai-elements` for chat UI components, `/vercel:chat-sdk` for multi-platform (Slack/Teams/Discord) bots.

AI & Automation 60 stars 19 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
59
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Next.js Chatbot Opinionated blueprint for production **web** chatbots. Focuses on patterns **not** covered by `/ai-sdk-6`, `/ai-elements`, or `/nextjs-shadcn` — use those skills for general SDK, component, and framework questions. For multi-platform bots (Slack, Teams, Discord), use `/vercel:chat-sdk` instead. ## Stack defaults - **Runtime:** bun - **Model:** the latest GPT-5.x non-reasoning model with `reasoningEffort: "none"` - **AI SDK:** `ai@6` — `ToolLoopAgent`, `createAgentUIStreamResponse` - **UI:** shadcn/ui + ai-elements (see `/ai-elements` for component docs) - **ORM:** Drizzle + PostgreSQL - **State:** Zustand for client-side chat state (consent, session, suggestions) - **Attachments:** See `/ai-elements` Attachments component for file upload ## Recommended MCP servers - **next-devtools** (`next-devtools-mcp@latest` via npx) — route inspection, build diagnostics. See [nextjs.org/docs/app/guides/mcp](https://nextjs.org/docs/app/guides/mcp) - **ai-elements** (via `mcp-remote` → `https://registry.ai-sdk.dev/api/mcp`) — component registry search Add both to `.claude/settings.json` mcpServers. ## Agent setup ```ts export function createAgent(opts?: { model?: LanguageModel }) { return new ToolLoopAgent({ model: opts?.model ?? openai("gpt-5.6"), // current flagship as of 2026-07 — verify from the live model catalog instructions, providerOptions: { openai: { reasoningEffort: "none" } }, tools, stopWhen: stepCountIs(10), }); } export const ...

Details

Author
laguagu
Repository
laguagu/claude-code-nextjs-skills
Created
7 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category