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 62 stars 18 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
60
Recency 20%
90
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
8 months ago
Last Updated
1 weeks ago
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

ai-app

Full-stack AI application generator with Next.js, AI SDK, and ai-elements. Use when creating chatbots, agent dashboards, or custom AI applications. Triggers: chatbot, chat app, agent dashboard, AI application, Next.js AI, useChat, streamText, ai-elements, build AI app, create chatbot

62 Updated 1 weeks ago
laguagu
AI & Automation Listed

ai-ui-patterns

Build production-grade LLM-powered interfaces in React and Next.js — token streaming, tool-call rendering, cancellation, cost and rate-limit handling, prompt-injection-safe rendering, and graceful degradation. Use this skill whenever the user is building a chat UI, AI assistant, copilot, streaming completion, RAG interface, or agent front end, or mentions the Vercel AI SDK, useChat, streamText, SSE, server-sent events, token-by-token rendering, or asks how to display AI output safely and responsively.

0 Updated 1 weeks ago
jayeshsojitra103
AI & Automation Solid

ai-elements

Build AI chat interfaces with pre-built shadcn-style components (Message, Conversation, PromptInput, Reasoning, Sources, Tool, Artifact, CodeBlock, Branch, Suggestions, Task, Image, ChainOfThought, InlineCitation, WebPreview, and more). Use when adding AI chat UI to a Next.js + AI SDK app, installing AI Elements components via the CLI (`bun x ai-elements@latest add <name>` or `npx shadcn@latest add @ai-elements/<name>`), composing message displays with markdown, building prompt inputs with attachments, or rendering streaming reasoning and tool output.

62 Updated 1 weeks ago
laguagu