agentleFS
UwayxtUwayxt/agent-skills/.agents/skills/ai-feature-ux-patterns/SKILL.md

ai-feature-ux-patterns

Skill4 starsChanged 3 months agoMITView on GitHub

Design intuitive UX patterns for AI interfaces including streaming, confidence, overrides, and prompts. Use when AI features, prompt UX, streaming UI, LLM interface, or AI assistant.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Cancel affordance: Always provide an immediate "Stop Generating" button (motion-fast reaction) during streaming.

    line 11
  2. Distinctive:

    Confidence levels: When an AI output is probabilistic, display confidence badges or alternate suggestions instead of pretending certainty.

    line 15
  3. Distinctive:

    Every AI output card must provide simple feedback buttons (👍 / 👎, "Copy", "Regenerate", "Edit").

    line 19
  4. Distinctive:

    If an agent task fails or hallucinates, provide a direct "Undo" or "Revert to Previous Version" action.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AI features are non-deterministic by nature — exceptional AI design embraces uncertainty with progressive streaming, clear attribution, immediate human overrides, and predictable error states.

1. Design progressive streaming & generation feedback

  • Streaming response: Animate streaming tokens smoothly without jarring scroll jumps; provide an auto-scroll toggle that pauses when the user scrolls up.
  • Thinking / Processing state: Differentiate between "Connecting/Thinking" (animated shimmering indicator or pulsing dot) vs "Rendering" (progressive text/card reveal).
  • Cancel affordance: Always provide an immediate "Stop Generating" button (motion-fast reaction) during streaming.

2. Establish AI attribution and confidence indicators

  • Provenance & citation: Highlight generated content clearly with distinct AI badging (e.g. subtle badge or sparkle icon) and clickable source links/tool citations.
  • Confidence levels: When an AI output is probabilistic, display confidence badges or alternate suggestions instead of pretending certainty.
  • Non-destructive suggestions: AI-generated code, text, or data edits should appear in a diff/staging preview (accept/reject controls) rather than overwriting user work directly.

3. Provide immediate human override & correction mechanisms

  • Every AI output card must provide simple feedback buttons (👍 / 👎, "Copy", "Regenerate", "Edit").
  • Allow users to edit generated text inline without re-prompting from scratch.
  • If an agent task fails or hallucinates, provide a direct "Undo" or "Revert to Previous Version" action.

4. Optimize prompt input and conversational ergonomics

  • Expanding textarea: Auto-grow prompt inputs up to a maximum height (e.g. 200px) before enabling internal scrolling.
  • Context attachments: Visual chips indicating attached files, screenshots, or referenced documents with clear remove buttons.
  • Quick suggestions & shortcuts: Provide one-tap starter prompt pills to reduce blank-slate anxiety.

5. Handle AI-specific failure modes

  • Rate limiting / Quota: Clear message indicating when quota resets with an option to upgrade or switch models.
  • Safety / Policy refusal: Transparent, non-accusatory explanation of why a request was filtered, with suggestions to rephrase.
  • Model degradation / Timeout: Graceful fallback with cached responses or manual fallback options.

Completion Criteria

  • Streaming animation, autoscroll pause, and "Stop Generating" controls defined
  • Generated content clearly marked with AI badges, citations, and confidence cues
  • Inline editing, accept/reject diffs, and regeneration affordances designed
  • Prompt input ergonomically designed with attachment chips and starter pills
  • Error states defined for rate limits, safety refusals, and service timeouts

Output

An ai-interaction-spec.md detailing the component states, streaming protocols, feedback loops, and human-in-the-loop override controls for all AI-enabled features.

Anti-patterns

  • Silently overwriting user documents with AI output without preview or undo.
  • Infinite un-cancellable streaming that traps user interaction.
  • Blaming the user when model safety blocks occur with accusatory error copy.
  • Hiding the fact that content was machine-generated.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.