agentleFS
Aarvion-AIAarvion-AI/stackwise-skills/skills/remix-expert/SKILL.md

remix-expert

Skill5 starsChanged 3 months agoMITView on GitHub

Use when working in a React Router 7 / Remix v2 framework-mode codebase with app/routes, loaders and actions, react-router.config.ts, useLoaderData / useActionData, Form, useNavigation, Outlet, or ErrorBoundary. Builds and refactors route modules, server data loading, mutations, pending UI, nested routing, and route-level error handling. Invoke for adding routes, replacing unnecessary useEffect data fetching, implementing Form/action mutations, fixing nested routing or revalidation bugs, and debugging route errors.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add or modify routes and route modules in a React Router 7 Framework Mode project

    line 19
  2. Very specific:

    Add pending UI with useNavigation or fetcher state

    line 23
  3. Very specific:

    Choose the route API: - Use loader for server route data, clientLoader only for browser-side data needs, action for server mutations, and …

    line 31
  4. Very specific:

    Implement: - Use nested routes and <Outlet> for shared layouts, <Form> for navigational mutations, useFetcher for non-navigational …

    line 33
  5. Distinctive:

    Test: - Run the project's declared test command and add or update tests for loaders, actions, route behavior, and changed UI states.

    line 37
  6. Distinctive:

    Prove it works: - Run the project's React Router build command or equivalent.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Remix Expert

Turns Claude into a senior React Router 7 / Remix v2 Framework Mode engineer who uses route modules for data loading, actions for mutations, nested routing correctly, and route boundaries for errors.

When to Use This Skill

  • Add or modify routes and route modules in a React Router 7 Framework Mode project
  • Load server data with loader instead of unnecessary component-level useEffect fetching
  • Implement mutations with action, <Form>, useSubmit, or useFetcher
  • Fix nested routes, layouts, dynamic params, <Outlet>, or outlet context
  • Add pending UI with useNavigation or fetcher state
  • Handle route failures with ErrorBoundary
  • Diagnose stale route data, incorrect revalidation, or hydration behavior

Core Workflow

  1. Analyze - Inspect package.json, app/routes.ts, react-router.config.ts, the target route module, parent routes, and existing tests. Confirm the project's React Router version and Framework Mode setup. Trace the route hierarchy before changing code.
  2. Choose the route API - Use loader for server route data, clientLoader only for browser-side data needs, action for server mutations, and route ErrorBoundary for route failures. Prefer generated Route.ComponentProps types in Framework Mode when available.
  3. Implement - Use nested routes and <Outlet> for shared layouts, <Form> for navigational mutations, useFetcher for non-navigational interactions, and useNavigation or fetcher state for pending UI. Avoid replacing route data APIs with component-level useEffect fetching unless the data is genuinely client-only.
  4. Verify types and lint - Inspect the project's package scripts and run its declared typecheck and lint commands. Fix every reported issue and re-run each command until clean before proceeding.
  5. Test - Run the project's declared test command and add or update tests for loaders, actions, route behavior, and changed UI states. Fix every failure and re-run until clean.
  6. Prove it works - Run the project's React Router build command or equivalent. Fix all build errors and re-run until clean. Exercise the changed route in development and verify navigation, pending UI, mutations, revalidation, and relevant error boundaries.

Reference Guide

Load detailed guidance only when the task needs it:

TopicReferenceLoad When
Routes, loaders, nested layouts, params, and Outletreferences/routing-and-loaders.mdAdding routes, loading data, changing route hierarchy, or using params and Outlet
Forms, actions, fetchers, pending UI, and revalidationreferences/forms-actions-and-mutations.mdImplementing mutations, forms, fetchers, validation, or revalidation behavior
Error boundaries, testing, builds, and verificationreferences/errors-testing-and-deployment.mdHandling route errors, writing tests, debugging builds, or verifying production behavior

Key Patterns

Typed route module with a server loader:

import type { Route } from "./+types/product";

export async function loader({ params }: Route.LoaderArgs) {
  const product = await getProduct(params.id);

  if (!product) {
    throw new Response("Not Found", { status: 404 });
  }

  return product;
}

export default function Product({ loaderData }: Route.ComponentProps) {
  return <h1>{loaderData.name}</h1>;
}

Common Mistakes

  • Using useEffect() for route data instead of loaders.
  • Using manual fetch() POST requests instead of route actions.
  • Using client-side form state when <Form> and actions provide the required workflow.
  • Missing nested route and <Outlet> context when working with child routes.
  • Handling route failures inside components instead of route ErrorBoundary.
  • Mutating client state without allowing route data to revalidate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.