agentleFS
UwayxtUwayxt/agent-skills/.agents/skills/error-boundary-resilience-design/SKILL.md

error-boundary-resilience-design

Skill4 starsChanged 3 months agoMITView on GitHub

Design comprehensive state resilience including empty, partial, offline, timeout, and failure states. Use when error state, empty state, offline mode, fallback UI, or resilient UX.

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:

    Empty State (First Use / Zero Data): No data created yet. Explain the value proposition and provide a clear primary CTA to create the first …

    line 14
  2. Distinctive:

    Never display raw stack traces, status codes (e.g., "Error 500"), or generic phrases ("Something went wrong") without actionable next steps:

    line 20
  3. Distinctive:

    When an action takes time (e.g.

    line 26
  4. Distinctive:

    If the server returns an error, gracefully rollback the UI state and display a floating toast or inline banner with a "Retry" trigger.

    line 28

≈ “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

An interface is only as robust as its failure boundaries — great products design the error, empty, offline, and partial-degradation states with the same fidelity as the ideal path.

1. Map component resilience zones

Deconstruct the page into isolated resilience zones (e.g. global shell, sidebar widgets, main data feed, analytics summary). An error in one zone (like a third-party analytics widget) must never trigger a white screen or crash the entire page.

2. Design the complete 5-state matrix per view

For every view or data-dependent component, document:

  1. Ideal State: Full data populated, typical user scenario.
  2. Empty State (First Use / Zero Data): No data created yet. Explain the value proposition and provide a clear primary CTA to create the first entity.
  3. Empty State (Filtered / Zero Matches): User search or filter returned zero results. Provide clear action to reset filters without leaving the page.
  4. Partial Failure / Degraded State: 3 of 4 API queries succeeded. Show the 3 working modules and display an inline retry card for the failed 4th module.
  5. Fatal Error / Network Failure: Request failed or timed out. Provide plain-language diagnostic ("Unable to reach billing server") + retry button + offline status indicator.

3. Establish clear error communication standards

Never display raw stack traces, status codes (e.g., "Error 500"), or generic phrases ("Something went wrong") without actionable next steps:

  • What happened: Explain in human terms without jargon.
  • Why it matters: State whether data was saved or lost.
  • How to recover: Provide an immediate action (Retry, Edit Input, Contact Support, Work Offline).

4. Design optimistic updates and rollback UX

When an action takes time (e.g. liking, archiving, deleting, status toggle):

  • Apply UI state immediately to feel instantaneous.
  • If the server returns an error, gracefully rollback the UI state and display a floating toast or inline banner with a "Retry" trigger.

5. Define offline and reconnect behaviors

  • Detect offline status via browser navigator.onLine and offline events.
  • Display a non-intrusive status banner indicating offline mode.
  • Queue user mutations locally when applicable (IndexedDB/localStorage) and provide a sync status indicator when connection is restored.

Completion Criteria

  • Every data container has documented Ideal, Empty (first-use & filtered), Degraded, and Error states
  • Error messages contain explanation, impact, and immediate recovery CTA
  • Partial failure boundaries defined so one broken widget does not crash the viewport
  • Optimistic update failure and rollback flows documented
  • Offline status presentation and sync reconciliation behavior defined

Output

A resilience-matrix.md or component state table detailing how each module behaves across all failure and empty conditions with specific error copy and recovery affordances.

Anti-patterns

  • Global full-page error screens for localized widget failures.
  • Dead-end empty states with no guidance or CTA button.
  • "Something went wrong" without a retry button or clear recovery step.
  • Silent failures where optimistic changes revert without user notification.

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.