Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

review-remix-v2

FreeNo executable scriptsNot checked

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…

existential-birdsby existential-birds★ 92 GitHub stars

About 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. Note v3_* 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 (not index.tsx unless @remix-run/v1-route-convention is wired). Pathless layouts use single _ (_auth.tsx). Dotted children (users.profile.tsx) require <Outlet /> in users.tsx or trailing-underscore opt-out (users_.profile.tsx, valid only when a parent layout exists). Literal dots escape with brackets (sitemap[.]xml.tsx); splat routes read params["*"], never params.splat.
  • Resource routes: Non-HTML Response routes (JSON/PDF/RSS/webhooks) must have no default export. Parent loaders do not run for resource routes, so auth checks must live inside the resource route's own loader/action. Callers using <Link> must pass reloadDocument (or use <a>).
  • Root document shell: app/root.tsx must render <Meta />, <Links />, <Outlet />, <ScrollRestoration /> before <Scripts />, and omit <LiveReload /> under Vite (@remix-run/dev/vite). Root ErrorBoundary replaces the whole document—use Layout (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 in NODE_ENV === "development".
    • Under Vite, remove <LiveReload /> completely; Vite handles HMR natively.

2. Data Flow & Streaming (loader, action, shouldRevalidate)

  • Pure loaders & throws: Never mutate inside loader; move writes to action. Short-circuit 401/403/404 with throw new Response(...) or throw json(...)—returning json(..., { status: 404 }) skips ErrorBoundary.
  • Streaming (defer() / <Await>): Pre-v3_singleFetch, start slow unawaited promises before any await in loader so defer() streams immediately, and wrap every <Await> in <Suspense> with errorElement so rejections degrade locally:
    const reviewsPromise = db.getReviews(params.id); // kick off BEFORE await
    const product = await db.getProduct(params.id);
    return defer({ product, reviews: reviewsPromise });
    
    Under v3_singleFetch, json()/defer() are deprecated in favor of raw object returns and data().
  • Navigation state & revalidation: nav.formMethod / fetcher.formMethod are 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 blanket shouldRevalidate = () => false without checking formAction/defaultShouldRevalidate, and never call useRevalidator().revalidate() immediately after <Form>/useFetcher mutations.

3. Forms & Uploads (<Form>, useFetcher, FormData)

  • Primitive choice & pending state: Use <Form> + redirect() (PRG) when URL/history changes; use useFetcher() for inline/per-row mutations. Derive pending and optimistic UI directl
Full SKILL.md on GitHub

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
Sign up freeI already have an account

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

Compare review-remix-v2 with