deepagents-architectur…
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Reviews Remix v2 error-handling code for the unified ErrorBoundary, isRouteErrorResponse narrowing, throw-vs-return, root boundary scaffolding, and v1 holdovers (CatchBoundary, useCatch). Use when reviewing routes that throw or define ErrorBoundary in a Remix v2 codebase.
$ npx -y skills add existential-birds/beagle --skill remix-v2-error-boundaries-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/remix-v2-error-boundaries-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Reviews Remix v2 error-handling code for the unified ErrorBoundary, isRouteErrorResponse narrowing, throw-vs-return, root boundary scaffolding, and v1 holdovers (CatchBoundary, useCatch). Use when reviewing routes that throw or define ErrorBoundary in a Remix v2 codebase.
name: remix-v2-error-boundaries-review description: Reviews Remix v2 error-handling code for the unified ErrorBoundary, isRouteErrorResponse narrowing, throw-vs-return, root boundary scaffolding, and v1 holdovers (CatchBoundary, useCatch). Use when reviewing routes that throw or define ErrorBoundary in a Remix v2 codebase.
Targets TypeScript route modules importing from `@remix-run/*`. No sibling knowledge skill exists for this topic; the canonical mental model is summarized inline below and expanded in `references/`.
Remix v2 unified v1's `CatchBoundary` + `ErrorBoundary` into a **single** `ErrorBoundary` route-module export. The framework calls it for **both** thrown `Response`s (e.g. `throw new Response(...)`, `throw json(...)`) **and** thrown runtime errors (loader/action/render exceptions). Inside the boundary you read the value with the `useRouteError()` hook, then narrow in this order:
1. `isRouteErrorResponse(error)` → it was a thrown `Response`; read `error.status`, `error.statusText`, `error.data`. 2. `error instanceof Error` → real runtime error; read `error.message`. 3. else → unknown thrown value; render a generic fallback.
The boundary takes **no props**. `CatchBoundary`, `useCatch`, and the `future.v2_errorBoundary` flag are all gone — finding any of them is a v1 holdover. Errors render the *nearest* `ErrorBoundary` and bubble to the root if none exists; the root boundary remounts the whole document, so it must render `<Meta />`, `<Links />`, and `<Scripts />`. Only **thrown** loader/action results reach the boundary — a `return json(...)` with a 4xx status is a successful loader, not an error. Server-side runtime errors also flow through an optional `entry.server.tsx` `handleError` export (thrown `Response`s do *not*).
| Issue Type | Reference | |------------|-----------| | Missing route `ErrorBoundary`, props-on-boundary, narrowing-only `instanceof Error`, narrowing-only `isRouteErrorResponse` | [references/boundary-shape.md](references/boundary-shape.md) | | Return-instead-of-throw 4xx/5xx, swallowing `error.data`, throwing strings, missing `handleError` | [references/throw-response.md](references/throw-response.md) | | Missing root boundary, root boundary without `<Meta />`/`<Links />`/`<Scripts />`, `useLoaderData()` in root boundary | [references/root-boundary.md](references/root-boundary.md) | | `CatchBoundary` export, `useCatch` import, `v2_errorBoundary` future flag | [references/v1-holdovers.md](references/v1-holdovers.md) |
These are correct Remix v2 usage and must not be reported as issues:
Use these defaults unless the codebase has documented a different scale:
| Pattern | Default severity | |---|---| | `CatchBoundary` export or `useCatch` import in v2 codebase | BLOCKER (build-breaking or dead code) | | Root `ErrorBoundary` missing `<Scripts />` | BLOCKER (dead-end error page) | | `ErrorBoundary` with `({ error })` v1 prop signature | WARN (silent runtime undefined) | | `return json(...)` for 4xx instead of `throw` | WAR
Image: NASA, Public Domain. Source Beagle is an Agent Skills marketplace: framework-aware code review, documentation, testing, architectural analysis, and git workflows for any compatible coding agent.
Repo: existential-birds/beagle
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Reviews Deep Agents code for bugs, anti-patterns, and improvements. Use when reviewing code that uses create_deep_agent, backends, subagents, middleware, or…
Implements agents using Deep Agents. Use when building agents with create_deep_agent, configuring backends, defining subagents, adding middleware, or setting…
Guides architectural decisions for LangGraph applications. Use when deciding between LangGraph vs alternatives, choosing state management strategies, designing…
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges, checkpointing, or other LangGraph…
Implements stateful agent graphs using LangGraph. Use when building graphs, adding nodes/edges, defining state schemas, implementing checkpointing, handling…