Skip to content

laguagu/claude-code-nextjs-skills / skills/nextjs-chatbot

nextjs-chatbot

Verified

Production Next.js web-chat integration: tool approval, persisted conversations, tool result UI, grounded retrieval, follow-up suggestions and embedded widgets. Use when building or debugging a web chatbot that needs these features. Use nextjs-shadcn for scaffolding and ai-sdk for general SDK APIs; multi-platform bots use Chat SDK.

FileKindSize
SKILL.mdskill md5.6 KB
hitl.mdmarkdown4.1 KB
persistence.mdmarkdown4.0 KB
popup-widget.mdmarkdown1.6 KB
search.mdmarkdown1.8 KB
suggestions.mdmarkdown1.4 KB
testing.mdmarkdown2.2 KB
tool-rendering.mdmarkdown1.7 KB
web-search.mdmarkdown1.6 KB

testing.md

View on GitHub
# Chatbot verification

UI transitions, retrieval quality and model behavior are separate checks.
Choose checks for the changed behavior, using the project's existing tooling.

## Interface and transport

Drive representative typed messages through the actual installed renderer and
chat lifecycle. For deterministic `useChat` UI tests, consider the optional
[`createChat` helper](https://ui.shadcn.com/docs/helpers/ai-sdk) from
`@shadcn/helpers/ai-sdk`; releases through 0.3 declare an `ai` >=7 <8 peer,
so it does not fit a v6 app. It scripts text, reasoning, tools and approval
through the real UI lifecycle without a model or API key, while backend checks
remain separate. Inspect the installed helper's types/source for its local
transport and part builders.

Exercise partial input, tool completion, approval/denial, empty results,
safe errors, cancellation, restored history and rapid conversation switching.
Verify a second turn after reload, readable Markdown, scroll anchoring, keyboard
focus and mobile composer reachability. An agent-level eval cannot detect
controls hidden behind a loading animation.

Verify the production stream path: first visible output, proxy buffering,
timeout/disconnect behavior and terminal in-stream errors. A successful HTTP
status alone does not prove completion.

## Model and retrieval

Use cases representative of the supported domain: answerable questions,
missing records, ambiguous requests, off-topic requests and prompt injection
through both user input and retrieved content. Assert supported claims,
appropriate tool choice, permissions and source coverage rather than exact
prose.

When changing retrieval/model/prompt behavior, compare baseline and candidate
on the same fixtures. Include short and long queries and target languages.
Repeat where run-to-run variance could change the conclusion, recording model
version/settings, latency, cost and per-case failures. Judge answer support
separately from retrieval rank.

Keep real secrets and customer content out of fixtures and captures. Report
what ran, what failed and which provider/deployment checks were unavailable.
Do not add benchmark commands or a fixture schema for files that the project
does not actually have.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall