building-ai-chat

building-ai-chat is a skill for Claude Code from ancoleman/ai-design-components. It costs 80 tokens per session (3,131 once invoked), scanned A, original, MIT.

Guidance for building chat interfaces where people converse with an AI assistant, including ChatGPT-style apps, copilots, and chatbots. It covers live response display, conversation context, text, images, files, and voice inputs.

In plain words
What is it for?
Use it to create AI chat screens, stream responses as they arrive, manage conversation history and limits, support multiple input types, and show actions taken by tools.
Why use it?
It helps handle the interaction details that make AI chat usable, such as long conversations, response limits, errors, regeneration, feedback, and visible tool use.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ui-interaction-skills plugin — 3 skills shipped together

Good fit Use it to create AI chat screens, stream responses as they arrive, manage conversation history and limits, support multiple input types, and show actions taken by tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/building-ai-chat
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.

Any agent
npx skills add ancoleman/ai-design-components --skill building-ai-chat
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install ui-interaction-skills, the plugin that ships this one along with the rest of its 3 skills.

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 building-ai-chat

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-ai-chat/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/building-ai-chat)
Your own site
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/building-ai-chat"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-ai-chat/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 building-ai-chat

Your own site · 80×15
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/building-ai-chat"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-ai-chat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,131 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.00080 $0.03131
Opus 5 $0.00040 $0.01566
Sonnet 5 $0.00016 $0.00626
Haiku 4.5 $0.00008 $0.00313

Measured 9d ago against content hash f5755c187121, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

building-ai-chat 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 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/calculate_tokens.py, scripts/format_messages.js, scripts/parse_stream.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/building-ai-chat/SKILL.md · 487 lines

How it starts

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

AI Chat Interface Components

Purpose

Define the emerging standards for AI/human conversational interfaces in the 2024-2025 AI integration boom. This skill leverages meta-knowledge from building WITH Claude to establish definitive patterns for streaming UX, context management, and multi-modal interactions. As the industry lacks established patterns, this provides the reference implementation others will follow.

When to Use

Activate this skill when:

  • Building ChatGPT-style conversational interfaces
  • Creating AI assistants, copilots, or chatbots
  • Implementing streaming text responses with markdown
  • Managing conversation context and token limits
  • Handling multi-modal inputs (text, images, files, voice)
  • Dealing with AI-specific errors (hallucinations, refusals, limits)
  • Adding feedback mechanisms (thumbs, regeneration, editing)
  • Implementing conversation branching or threading
  • Visualizing tool/function calling

Quick Start

Minimal AI chat interface in under 50 lines:

import { useChat } from 'ai/react';

export function MinimalAIChat() {
  const { messages, input, handleInputChange, handleSubmit, isLoading, stop } = useChat();

  return (
    <div className="chat-container">
      <div className="messages">
        {messages.map(m => (
          <div key={m.id} className={`message ${m.role}`}>
            <div className="content">{m.content}</div>
          </div>
        ))}
        {isLoading && <div className="thinking">AI is thinking...</div>}
      </div>

      <form onSubmit={handleSubmit} className="input-form">
        <input
          value={input}
          onChange={handleInputChange}
          placeholder="Ask anything..."
          disabled={isLoading}
        />
        {isLoading ? (
          <button type="button" onClick={stop}>Stop</button>
        ) : (
          <button type="submit">Send</button>
        )}
      </form>
    </div>
  );
}

For complete implementation with streaming markdown, see examples/basic-chat.tsx.

Read the full file on GitHub · 487 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. 9d ago First seen · 487 lines · 80 tokens per session scan A f5755c187121

Subscribe to this mod's changes

building-ai-chat is a skill published in the GitHub repository ancoleman/ai-design-components (519 stars, last pushed 9mo ago), licensed MIT. It adds 80 tokens to every session and 3,131 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

ui-ux-laws

Priority-ordered rulebook of core UX/UI laws, cognitive-psychology principles, Nielsen's usability heuristics, and accessibility requirements that Claude must actively apply (not just cite) whenever it designs, builds, redesigns, reviews, or critiques any user interface — websites, web/mobile apps, dashboards, forms…

AmirGhl/ui-ux-laws · 203 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

b1rdmania/claude-brand-skills · 43 tokens

internationalization

Plan and run a multi-language or multi-region site. Use this skill when adding new locales, choosing URL structure for languages (subfolders vs subdomains vs ccTLDs), implementing hreflang, planning translation workflow, handling currency and date formats, designing for RTL languages, or auditing a stalled…

rampstackco/claude-skills · 123 tokens

information-architecture

Design the structure of a website or product including sitemap, navigation, URL structure, content types, taxonomy, and labeling. Use this skill whenever the user asks to plan a sitemap, design navigation, structure URLs, define content types, build taxonomies, design site search, or organize content at the system…

rampstackco/claude-skills · 131 tokens

frontend

Builds, styles, and polishes web UI and UX. Use for any frontend, page, component, styling, layout, animation, or visual-quality task, or when asked to make an interface look or feel a certain way.

code-yeongyu/oh-my-openagent · 49 tokens

interaction-skill

Layer A interaction-mechanics reference anchored to the beui.dev catalog. Stacks on any style skill whenever work adds or changes motion or interaction — micro-interactions, animated components, transitions, gestures, hover/press/state feedback, loading/success/error morphs, 'make it feel alive'. Mandates reading the…

code-yeongyu/oh-my-openagent · 104 tokens