agentleFS
varunk130varunk130/claude-code-skills/skills/ai-ux-design/ai-failure-state-designer/SKILL.md

ai-failure-state-designer

Skill1 starsChanged 21 days agoMITView on GitHub

Maps an Artificial Intelligence (AI) feature's failure modes - hallucination, refusal, low confidence, latency, partial results, tool errors, and outdated knowledge - to detection signals, User Interface (UI) patterns, recovery actions, and ready-to-use microcopy. Use when designing error states for a chatbot, copilot, or agent; users hit dead ends after an AI failure; writing refusal or fallback copy; or preparing a failure-handling spec before launch.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every AI failure collapsing into one generic error message

    line 16
  2. Distinctive:

    Start from this taxonomy and add product-specific modes:

    line 33
  3. Distinctive:

    Every failure state needs at least one forward action.

    line 81
  4. Distinctive:

    Use a single generic error for all AI failures

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Failure State Designer

An AI feature is judged by how it fails, because it will fail more often and more strangely than deterministic software.

What this skill is

A workflow that inventories the ways an AI feature can fail, separates failures the system can detect from those only the user can catch, and assigns each one a UI pattern, a recovery path, and microcopy. It replaces the generic "Something went wrong" with failure states that preserve work, explain what happened in plain terms, and give the user a next best action.

What it solves

  • Every AI failure collapsing into one generic error message
  • Hallucinations presented with the same confidence and styling as correct answers
  • Refusals that lecture the user or give no alternative path
  • Long waits with a spinner and no sense of progress or option to stop
  • Partial results discarded entirely when one step or tool call fails
  • Answers based on outdated information with no date context

When to invoke

  • Designing a new chatbot, copilot, search assistant, or agent
  • Support tickets describe dead ends, lost work, or "it just stopped"
  • Writing or reviewing refusal and fallback copy
  • Adding tool use or retrieval, which introduces new failure surfaces
  • Launch readiness review requires a failure-handling spec

Phase 1: Inventory failure modes

Start from this taxonomy and add product-specific modes:

Failure modeDefinitionSystem-detectable?
HallucinationFluent output that is false or unsupportedPartially (grounding checks, citation validation)
RefusalModel declines a request, correctly or notYes
Low confidenceAnswer produced but evidence is weak or conflictingPartially (retrieval scores, self-consistency)
LatencyResponse exceeds expected timeYes
Partial resultSome steps or items succeeded, others failedYes
Tool or integration errorExternal call failed, timed out, or lacked permissionYes
Outdated knowledgeAnswer reflects stale data or training cutoffPartially (source dates, time-sensitive topics)
Misunderstood intentCorrect answer to the wrong questionRarely; usually user-detected

Phase 2: Rate frequency and impact

For each mode, estimate from evaluation data or logs:

Failure priority = Frequency (1-5) x Impact (1-5) x Detection difficulty (1-3)
Detection difficulty: 1 = system detects, 2 = user can easily notice, 3 = user unlikely to notice

Undetectable, high-impact failures (typically hallucination and outdated knowledge) rank highest because the interface is the only defense.

Phase 3: Assign UI patterns

Failure modePrimary patternSupporting pattern
HallucinationInline citations with verify-on-hover; unsupported claims visually distinct"Check this" prompt on high-stakes facts (numbers, names, dates)
RefusalBrief reason plus nearest allowed alternativeLink to the human or manual path
Low confidenceHedged phrasing plus clarifying question or multiple optionsShow sources that conflict
LatencyStaged progress (step names, not just a spinner) and stop controlStream partial output; offer "notify me when done" past 20 seconds
Partial resultShow completed items, mark failed items, offer retry on failures onlySummary line: "7 of 9 done"
Tool errorName the system that failed in user terms; preserve inputsRetry, use alternative source, or continue without
Outdated knowledge"As of" date on time-sensitive answersOffer to search current sources if available
Misunderstood intentRestate interpretation for ambiguous requestsEasy edit-and-resend on the original prompt

Latency thresholds to design for:

Wait timeTreatment
Under 1 secondNo indicator needed
1-5 secondsTyping or thinking indicator; stream tokens if possible
5-20 secondsNamed stages ("Searching 3 sources", "Drafting") and a stop button
Over 20 secondsBackground the task, notify on completion, keep the user unblocked

Phase 4: Define recovery actions

Every failure state needs at least one forward action. Rank options by user effort:

  1. Automatic recovery - silent retry or fallback model, only if the result is equivalent
  2. One-click recovery - retry, try a narrower request, use a different source
  3. Guided recovery - suggested rephrasing, clarifying question, or form fallback
  4. Manual path - link to the non-AI way to do the job
  5. Human path - handoff to support with context preserved

Rules: never discard user input; never retry silently more than twice; never auto-retry an action with side effects.

Phase 5: Write the microcopy

Microcopy formula:

[What happened, plainly] + [What it means for the user] + [What they can do next]
FailureWeak copyStrong copy
Tool error"An error occurred.""I couldn't reach your calendar, so this schedule skips your meetings. Retry, or continue without calendar data."
Refusal"I can't help with that.""I can't change payroll records. I can draft the request for your payroll admin instead."
Low confidence"I'm not sure.""I found two conflicting policies (2023 and 2025). The 2025 version says 30 days. Want me to show both?"
Partial"Task failed.""Updated 7 of 9 records. 2 were locked by another user. Retry those 2?"

Voice rules: first person for the assistant is acceptable, but no apologies longer than three words, no blaming the user, no anthropomorphic feelings ("I'm so sorry, I feel terrible"), and no technical codes in the primary message.

Output

  • Failure mode inventory with detectability and priority scores
  • Pattern assignment table per failure mode
  • Latency treatment spec with time thresholds
  • Recovery action ladder per failure mode
  • Microcopy library (primary message, secondary detail, action labels)
  • Instrumentation list to measure each failure's frequency in production

Operating rules

Always

  • Design for undetectable failures, not just the ones the system can catch
  • Preserve user input and completed work through every failure
  • Pair every refusal with an alternative path
  • Show progress stages and a stop control for long waits
  • Date-stamp time-sensitive answers

Never

  • Use a single generic error for all AI failures
  • Style unverified claims identically to cited ones in high-stakes contexts
  • Auto-retry actions that have side effects
  • Blame the user's prompt in error copy
  • Hide a partial failure inside a success message

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.