ai-chat-setup

ai-chat-setup is a command for Claude Code from Matt-Dionis/claude-code-configs. It costs 9 tokens per session (501 once invoked), scanned A, original, MIT.

A setup command for building an AI chat interface with streaming replies, using the Vercel AI SDK. It can target basic, advanced, multimodal, retrieval-based, or tool-using chats.

In plain words
What is it for?
Use it to add a streaming chat screen, message history, file support, knowledge-base answers, or chat agents that call functions.
Why use it?
It provides a planned starting point for chat features, including the API connection, React interface, types, and error handling.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to add a streaming chat screen, message history, file support, knowledge-base answers, or chat agents that call functions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/matt-dionis/claude-code-configs/ai-chat-setup
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configs

Made for: Claude Code.

Wrote 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.

agentmods badge for ai-chat-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/ai-chat-setup/github.svg)](https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-chat-setup)
Your own site
<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-chat-setup"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/ai-chat-setup/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.

agentmods 80×15 button for ai-chat-setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-chat-setup"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/ai-chat-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 501 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.00501
Opus 5.5 $0.00004 $0.00200
Sonnet 5.5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 1mo ago against content hash 8e871962be5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-chat-setup 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.

configurations/tooling/vercel-ai-sdk/.claude/commands/ai-chat-setup.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Set up AI Chat Interface

Create a production-ready chat interface with the Vercel AI SDK based on the specified type: $ARGUMENTS

Project Context

Current project structure: !find . -type f -name "*.json" -o -name "*.ts" -o -name "*.tsx" | head -10

Current dependencies: !cat package.json | jq '.dependencies // {}' 2>/dev/null || echo "No package.json found"

Requirements Analysis

Based on the requested chat type ($ARGUMENTS), I'll implement:

Basic Chat: Simple text-based streaming chat interface Advanced Chat: Enhanced UI with message history, error handling, and optimizations
Multimodal Chat: Support for images, PDFs, and file uploads RAG Chat: Retrieval-augmented generation with knowledge base Agent Chat: Tool-calling agents with function execution

Your Task

  1. Analyze the current project structure to understand the existing setup
  2. Install required dependencies if not already present
  3. Create the appropriate chat implementation based on the specified type
  4. Set up the API route with proper streaming and error handling
  5. Implement the React component with modern UI patterns
  6. Add proper TypeScript types for type safety
  7. Include error boundaries and loading states
  8. Test the implementation and provide usage instructions

Implementation Guidelines

  • Use the latest AI SDK patterns and best practices
  • Implement proper error handling and loading states
  • Add TypeScript types for all interfaces
  • Follow Next.js App Router conventions
  • Include proper accessibility features
  • Use modern React patterns (hooks, Suspense, etc.)
  • Add responsive design considerations
  • Implement proper security measures

Expected Deliverables

  1. API route handler (app/api/chat/route.ts)
  2. Chat component (components/chat.tsx or similar)
  3. Required TypeScript types
  4. Updated package.json dependencies
  5. Basic styling (Tailwind classes)
  6. Usage documentation and examples

Focus on creating a robust, production-ready implementation that follows AI SDK best practices and modern web development standards.

Read the full file on GitHub · 59 lines

Changes

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.

  1. 1mo ago First seen · 59 lines · 9 tokens per session scan A 8e871962be5f

Subscribe to this mod's changes

ai-chat-setup is a command published in the GitHub repository Matt-Dionis/claude-code-configs (619 stars, last pushed 1y ago), licensed MIT. It adds 9 tokens to every session and 501 once invoked, about $0.0000 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-09-03.