agentsclimarketplace

Error boundaries ui

Skill Amey-Thakur/AI-SKILLS/skills/frontend/error-boundaries-ui

Isolate render failures behind boundaries with useful fallbacks, retry, and reporting so one broken component does not blank the app. Use when adding error boundaries, designing failure UI, or a crash takes down a whole page.From its SKILL.md

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill error-boundaries-ui

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 24 days oldThe repository was created 24 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 607 tokens by cl100k_base, as published. Nobody here has run it

Error boundaries UI

An unhandled render error unmounts the entire React tree to a white screen. Boundaries contain the blast radius so a failing widget degrades to a small fallback while the rest of the page keeps working.

Method

  1. Place boundaries at blast-radius seams, not one at the root. Wrap each independent region: the shell, each route, each self-contained widget (a chart, a comment list, a sidebar panel). A single top-level boundary turns any error into a full-page failure; nested boundaries let the header survive a broken chart. Put the coarsest boundary at the route level as the floor.
  2. Design the fallback to fit the hole it fills. A widget-level fallback is a small inline message sized like the widget, not a full-page error card that reflows the layout. State plainly what failed ("Couldn't load activity"), keep surrounding chrome intact, and never leak stack traces or raw error text to end users.
  3. Give a retry affordance that actually re-attempts. Provide a Try again button that resets the boundary and re-mounts the subtree so a transient failure recovers without a full reload. In React, reset via the boundary's resetErrorBoundary (react-error-boundary) or a changing key; ensure the retry re-runs the failed data load, not just the render.
  4. Report the error before showing the fallback. In the boundary's error handler, send the error, component stack, route, and user-safe context to your monitoring service (Sentry, etc.). A fallback with no reporting hides failures from you while showing them to users. Deduplicate to avoid flooding on a render loop.
  5. Handle async and event errors separately. Error boundaries catch errors thrown during render, not in event handlers, promises, or setTimeout. Catch those where they occur and route them into state that renders the same failure UI, or into your data layer's error state, so the two paths look consistent to the user.
  6. Distinguish expected failures from crashes. A 404 or a validation rejection is an expected state to render as designed content, not a thrown error to catch in a boundary. Reserve boundaries for the unexpected: null dereferences, bad shapes, code bugs. Overusing them to model normal states hides real problems.

Boundaries

  • Boundaries do not catch errors in event handlers, async code, or SSR; those need explicit try/catch and error state.
  • This does not replace input validation or typed data contracts; it is the last line, not the first.
  • Network and data-fetch errors are better modeled as query error states; see frontend-data-fetching.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,750. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.