deepagents-architectur…
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing…
Remix v2 routing patterns. Use when implementing flat-routes v2 conventions, route file naming, nested layouts, resource routes, or root.tsx scaffolding. Triggers on _<name>.tsx (pathless layout), _index.tsx, $param, app/routes/, @remix-run/dev, defineRoutes, <Outlet /> in route
Claude Code
$ npx -y skills add existential-birds/beagle --skill remix-v2-routing --agent claude-code
Codex
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a codex -y
Cursor
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a cursor -y
Gemini CLI
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a gemini-cli -y
GitHub Copilot
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a github-copilot -y
OpenCode
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a opencode -y
Windsurf
$ npx skills add existential-birds/beagle --skill remix-v2-routing -a windsurf -y
name: remix-v2-routing description: Remix v2 routing patterns. Use when implementing flat-routes v2 conventions, route file naming, nested layouts, resource routes, or root.tsx scaffolding. Triggers on _<name>.tsx (pathless layout), _index.tsx, $param, app/routes/, @remix-run/dev, defineRoutes, <Outlet /> in route modules.
**Flat-routes v2 filename rules** (all files live in `app/routes/`):
_index.tsx → / concerts.tsx → /concerts (acts as layout when dotted children exist; otherwise leaf for /concerts) concerts._index.tsx → /concerts (renders under layout) concerts.$city.tsx → /concerts/:city params.city concerts.trending.tsx → /concerts/trending _auth.tsx + _auth.login.tsx → /login (pathless layout, no URL segment) files.$.tsx → /files/* params["*"] ($lang)._index.tsx → / and /en (or /fr etc.) — optional segment sitemap[.]xml.tsx → /sitemap.xml (escape literal) concerts_.mine.tsx → /concerts/mine (opts out of layout) dashboard/route.tsx → /dashboard (folder + route.tsx) reports.$id[.pdf].tsx → /reports/:id.pdf (no default export = resource)
**Imports — always use `@remix-run/react`, never `react-router-dom`**:
import { Outlet, Link, useLoaderData, useParams } from "@remix-run/react";
import type { LoaderFunctionArgs } from "@remix-run/node"; // or /cloudflare, /denoDots in filenames create URL slashes and parent/child nesting. Underscore prefix marks pathless segments (`_auth.tsx`) and index routes (`_index.tsx`). Trailing underscore (`concerts_.mine.tsx`) opts out of layout nesting while keeping the URL nested. Brackets escape literal characters: `sitemap[.]xml.tsx`. Splat is the single dollar sign: `$.tsx` exposes the rest of the path under `params["*"]`. Optional segments are wrapped in parens: `($lang)`.
See [references/conventions.md](references/conventions.md) for the full table and edge cases.
A parent module (`concerts.tsx`) renders `<Outlet />`; child routes (`concerts.$city.tsx`, `concerts._index.tsx`) mount inside it automatically based on the dot-delimited filename.
// app/routes/concerts.tsx
import { Outlet } from "@remix-run/react";
export default function ConcertsLayout() {
return (
<section>
<nav>{/* concerts subnav */}</nav>
<Outlet />
</section>
);
}// app/routes/concerts._index.tsx (renders at exactly /concerts)
export default function ConcertsIndex() {
return <h1>Browse concerts</h1>;
}For a layout with **no** URL contribution, prefix with a single underscore:
// app/routes/_auth.tsx → wraps /login, /signup; no URL segment // app/routes/_auth.login.tsx → /login (inherits _auth layout) // app/routes/_auth.signup.tsx → /signup
`$name` captures a single segment; `$.tsx` captures the rest of the path. Loader receives values via `params`:
// app/routes/concerts.$city.tsx
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
export async function loader({ params }: LoaderFunctionArgs) {
if (!params.city) throw new Response("Not found", { status: 404 });
return json({ city: params.city });
}
export default function City() {
const { city } = useLoaderData<typeof loader>();
return <h1>{city}</h1>;
}Splat values live under `"*"` — there is no `params.splat`:
// app/routes/files.$.tsx
export async function loader({ params }: LoaderFunctionArgs) {
const rest = params["*"]; // bracket access only
return new Response(await readBlob(rest), { headers: { "Content-Type": "application/octet-stream" } });
}`app/root.tsx` is the only required route. It owns the document shell and must render `<Meta />`, `<Links />`, `<Outlet />`, `<ScrollRestoration />`, `<Scripts />`, and (during dev) `<LiveReload />`. See [references/root.md](references/root.md).
A route module without a `default` export is a **resource route** — it returns raw `Response` objects (PDF, JSON, RSS, webhooks). Parent loaders do **not** run, and `<Link>` must use `reloadDocument` (or be replaced with `<a>`) to trigger a real document request. See [references/resource-routes.md](references/resource-routes.md).
Answer **in order**. **Pass** means the condition is true; pick the answer on the same line and **stop**.
0. **Is there shared chrome at all (nav, breadcrumbs, sidebar) at this level**?
1. **Should this URL share UI (nav, breadcrumbs, sidebar) with a parent path**?
2. **Does the URL just *happen* to be nested but should render standalone**?
3. **Need a wrapper layout but no parent URL segment**?
1. **Does this URL ever render HTML to a user**?
2. **Returns JSON, PDF, RSS, sitemap, webhook, or other raw `Response`**?
1. **On Remix v2 with flat-routes**?
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.
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing…
Reviews Deep Agents code for bugs, anti-patterns, and improvements. Use when reviewing code that uses create_deep_agent,…
Implements agents using Deep Agents. Use when building agents with create_deep_agent, configuring backends, defining subagents,…
Guides architectural decisions for LangGraph applications. Use when deciding between LangGraph vs alternatives, choosing state…
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges,…
Implements stateful agent graphs using LangGraph. Use when building graphs, adding nodes/edges, defining state schemas,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.