ai-product-ux

ai-product-ux is a skill for Claude Code, Codex from build-with-dhiraj/ai-workflow-framework-portability-kit. It costs 29 tokens per session (1,597 once invoked), scanned A, original, MIT.

A design guide for interfaces built around AI features such as generated text and chat. It covers streaming replies, conversation history, first-use guidance, loading indicators, and error recovery.

In plain words
What is it for?
Designing AI chat screens, showing text as it arrives, preserving multi-turn conversations, and adding retry actions for failed replies.
Why use it?
AI interfaces can feel broken when replies arrive slowly, context is lost, or failures give no useful next step. This guide helps make those states clear to users.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Designing AI chat screens, showing text as it arrives, preserving multi-turn conversations, and adding retry actions for failed replies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux
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 build-with-dhiraj/ai-workflow-framework-portability-kit --skill ai-product-ux
Clone the repo
git clone --depth 1 https://github.com/build-with-dhiraj/ai-workflow-framework-portability-kit

Made for: Claude Code, Codex.

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-product-ux

README.md
[![agentmods](https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux/github.svg)](https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux)
Your own site
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux/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-product-ux

Your own site · 80×15
<a href="https://agentmods.dev/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux"><img src="https://agentmods.dev/badge/skills/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-product-ux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,597 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.00029 $0.01597
Opus 5.5 $0.00012 $0.00639
Sonnet 5.5 $0.00006 $0.00319
Haiku 4.5 $0.00003 $0.00160

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

Security

Grade A, and why

ai-product-ux 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 25d 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.

Skills/ai-product-ux/SKILL.md · 138 lines

How it starts

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

AI Product UX

Reference implementation: https://github.com/vercel/ai-chatbot (Next.js App Router + Vercel AI SDK + shadcn/ui)

This skill covers the UX design layer — what to show, when, and why. For SDK mechanics see vercel-plugin:ai-sdk. For chat SDK wiring see vercel-plugin:chat-sdk.

1. AI UX Primitives

Typing indicator — show immediately on send, before the first token arrives. Three-dot pulse or skeleton. Never leave the user staring at nothing.

Streaming text — render tokens as they arrive using useChat from @ai-sdk/react. Sentence-boundary rendering (buffer until ./?/!) works better for TTS or screen readers; character-level is fine for visual chat.

Error recovery — always surface a retry button inline with the failed message, not as a toast. The message is the context; that's where the action belongs.

Retry affordance — for transient failures, auto-retry once silently, then surface the error. For content-filter hits, explain without alarming: "I can't help with that specific question — try rephrasing."

2. Multi-Turn State

Persist: message array (role + content + id + timestamp), conversation ID, model/persona used per turn.

Derive, don't persist: loading state, error state, scroll position, whether a message is streaming.

Context window awareness: when conversation grows long, show a subtle "Summarizing earlier context…" notice rather than silently truncating. Users notice when AI "forgets."

3. Optimistic UI for AI

Send the user's message to the UI immediately (optimistic insert) before the API call resolves. If the call fails, mark the optimistic message as failed and show retry — do not remove it. Removing it disorients the user.

For file uploads or tool calls, show a pending state on the attachment/tool card, not a spinner over the whole chat.

4. Streaming Display Patterns

character-level  → feels alive, best for general chat
sentence-level   → better for accessibility, TTS integration
paragraph-level  → best for long-form content (essay, explanation)

Read the full file on GitHub · 138 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. 25d ago First seen · 138 lines · 29 tokens per session scan A 9e943478a8c2

Subscribe to this mod's changes

ai-product-ux is a skill published in the GitHub repository build-with-dhiraj/ai-workflow-framework-portability-kit (5 stars, last pushed 12d ago), licensed MIT. It adds 29 tokens to every session and 1,597 once invoked, about $0.0001 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-21.