error-boundary-generator
Installation
SKILL.md
Error Boundary Generator
Before generating any output, read config/defaults.md and adapt all patterns, imports, and code examples to the user's configured stack.
Process
- Scan the React component tree and identify components that need error boundaries.
- For each gap, generate an error boundary with a typed fallback component.
- For Next.js App Router, generate
error.tsxandloading.tsxfiles where missing.
Identification Rules
Scan for components that:
- Fetch data: contain
fetch(),useQuery,useSWR, server componentasyncfunctions, or Prisma calls - Use external services: Stripe, auth providers, third-party SDKs
- Have complex state logic:
useReducerwith many cases, complexuseEffectchains - Render user-generated content:
dangerouslySetInnerHTML, rich text renderers, markdown parsers - Are page-level route components:
page.tsxfiles in Next.js App Router