better-chatbot

Teaches better-chatbot project conventions for contributing code across its three-tier tool system.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill better-chatbot-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-chatbot
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/better-chatbot
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill better-chatbot-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Contributing to the better-chatbot open-source project requires knowing its specific conventions—server action validators, the three-tier tool system (MCP/Workflow/Default), repository patterns, and component design—and mistakes like missing auth checks or Zustand state mutations cause real bugs. This Skill encodes those standards so contributions follow established patterns and avoid the most common errors. ## Core Features & Use Cases - Top 5 Error Prevention: Documents the most frequent mistakes (missing auth validators, tool type mismatches, FormData parsing errors, cross-field validation issues, Zustand mutations) with wrong/right code examples. - Progressive Reference Loading: Twelve on-demand references cover API architecture, tool system, component patterns, database patterns, server actions, templates, extension points, UX patterns, and contribution guidelines. - Use Case: When adding a new default tool to better-chatbot, load the tool-system and templates references to follow the exact enum, toolkit registration, execution, and client-side rendering pattern the project expects. ## Quick Start Ask the assistant to help you add a new feature or fix a bug in the better-chatbot repository following its project conventions.

Frequently Asked Questions about better-chatbot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new tool to better-chatbot?

Implement the tool with createTool in lib/ai/tools, register it in the AppDefaultToolkit enum and APP_DEFAULT_TOOL_KIT, then create a rendering component in components/tool-invocation. The tool becomes available via @toolname mentions in chat.

How do server action validators work in better-chatbot?

Use validatedActionWithUser or validatedActionWithAdminPermission from lib/action-utils.ts instead of manual auth checks. These wrappers handle Zod validation, FormData parsing, authentication, and error responses automatically.

What is the three-tier tool system in better-chatbot?

It consists of MCP tools from external Model Context Protocol servers, workflow tools built with the visual DAG builder, and built-in default tools like web search and code execution. All three merge into a single tool record passed to the LLM.

Why does my Zustand state update not trigger re-renders?

Direct mutation of nested state does not trigger re-renders because Zustand relies on reference changes. Use shallow updates with the spread operator to create new objects for the changed branches of state.

What database pattern does better-chatbot use?

All database access goes through repository interfaces implemented with Drizzle ORM on PostgreSQL. Define the interface in src/types, implement it in lib/db/pg/repositories, and export it from lib/db/repository.ts.

What must I run before submitting a PR to better-chatbot?

Run pnpm check to lint, type-check, and run unit tests, plus pnpm test:e2e for critical flows. PR titles must follow Conventional Commits format, and UI changes require before/after screenshots.