review-remix-v2
FreeNo executable scriptsNot checkedReviews legacy Remix v2 (@remix-run/*) codebases for routing, data flow, forms, error boundaries, meta/sessions, and SSR/caching traps. Remix v2 is EOL and…
by existential-birds★ 92 GitHub starsAbout this skill
Remix v2 Maintenance Code Review
EOL & Migration Status: Remix v2 (
@remix-run/*) is End-of-Life and superseded by React Router v7 (react-router-v7). Use this skill strictly for maintaining existing@remix-run/*applications. Notev3_*future flags (v3_fetcherPersist,v3_relativeSplatPath,v3_lazyRouteDiscovery,v3_singleFetch,v3_throwAbortReason) or React Router v7 migration readiness as Informational only when relevant. Never prescribe Remix v1 (CatchBoundary,useTransition) or Next.js ("use client") patterns.
Arguments
- Path: Target directory or diff scope (default: current working directory)
Step 1: Identify Scope & Confirm Remix v2
git diff --name-only $(git merge-base HEAD main)..HEAD | grep -E '\.(tsx?|jsx?|mjs|cjs|css)$|^(remix|vite)\.config\.'
grep -E '"@remix-run/(react|node|cloudflare|deno|serve)"' package.json | head -3
If git diff returns nothing, inspect staged/working-tree changes or ask for an explicit file list. If package.json contains no @remix-run/* package, stop—route to react-router-code-review or review-frontend instead. Check vite.config.* vs remix.config.js (including @remix-run/v1-route-convention and future.v3_* flags) before flagging compiler or routing issues.
Quick surface greps for targeted inspection:
- Routes & shells:
app/routes/filenames,app/root.tsx - Loaders/actions/boundaries:
grep -rE 'export (async )?function (loader|action|ErrorBoundary)|defer\(|useRouteError' app/ - Forms/meta/sessions/headers:
grep -rE '<Form|useFetcher|export (const|function) (meta|headers)|commitSession' app/
Step 2: Load Verification Protocol
Load the review-verification-protocol skill (review-verification-protocol when installed alongside sibling skills) before making any substantive severity judgment. Do not classify or write findings until this gate clears.
Step 3: Consolidated Remix v2 Review Checklist
1. Routing & Root Shell (app/routes/, app/root.tsx)
- Flat-routes v2 grammar: Index routes use
_index.tsx(notindex.tsxunless@remix-run/v1-route-conventionis wired). Pathless layouts use single_(_auth.tsx). Dotted children (users.profile.tsx) require<Outlet />inusers.tsxor trailing-underscore opt-out (users_.profile.tsx, valid only when a parent layout exists). Literal dots escape with brackets (sitemap[.]xml.tsx); splat routes readparams["*"], neverparams.splat. - Resource routes: Non-HTML
Responseroutes (JSON/PDF/RSS/webhooks) must have nodefaultexport. Parent loaders do not run for resource routes, so auth checks must live inside the resource route's ownloader/action. Callers using<Link>must passreloadDocument(or use<a>). - Root document shell:
app/root.tsxmust render<Meta />,<Links />,<Outlet />,<ScrollRestoration />before<Scripts />, and omit<LiveReload />under Vite (@remix-run/dev/vite). RootErrorBoundaryreplaces the whole document—useLayout(Remix>=2.4) or return the complete<html>shell with<Scripts />.- Under Classic Compiler (
remix.config.js),<LiveReload />already no-ops in production—do not wrap it inNODE_ENV === "development". - Under Vite, remove
<LiveReload />completely; Vite handles HMR natively.
- Under Classic Compiler (
2. Data Flow & Streaming (loader, action, shouldRevalidate)
- Pure loaders & throws: Never mutate inside
loader; move writes toaction. Short-circuit 401/403/404 withthrow new Response(...)orthrow json(...)—returningjson(..., { status: 404 })skipsErrorBoundary. - Streaming (
defer()/<Await>): Pre-v3_singleFetch, start slow unawaited promises before anyawaitinloadersodefer()streams immediately, and wrap every<Await>in<Suspense>witherrorElementso rejections degrade locally:
Underconst reviewsPromise = db.getReviews(params.id); // kick off BEFORE await const product = await db.getProduct(params.id); return defer({ product, reviews: reviewsPromise });v3_singleFetch,json()/defer()are deprecated in favor of raw object returns anddata(). - Navigation state & revalidation:
nav.formMethod/fetcher.formMethodare UPPERCASE ("POST","GET"); lowercase comparisons silently fail.useNavigation()skips"submitting"for GET navigations (idle -> loading -> idle), whereas<fetcher.Form>enters"submitting"even on GET (fetcher.load()skips it). Avoid blanketshouldRevalidate = () => falsewithout checkingformAction/defaultShouldRevalidate, and never calluseRevalidator().revalidate()immediately after<Form>/useFetchermutations.
3. Forms & Uploads (<Form>, useFetcher, FormData)
- Primitive choice & pending state: Use
<Form>+redirect()(PRG) when URL/history changes; useuseFetcher()for inline/per-row mutations. Derive pending and optimistic UI directl
Install review-remix-v2 in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the review-remix-v2 skill do?
Reviews legacy Remix v2 (@remix-run/*) codebases for routing, data flow, forms, error boundaries, meta/sessions, and SSR/caching traps. Remix v2 is EOL and superseded by React Router v7; use only when maintaining existing @remix-run/* applications.
How do I install the review-remix-v2 skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the review-remix-v2 skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic