/web-meta-framework-remix
File-based routing, loaders, actions, defer streaming, useFetcher, error boundaries, progressive enhancement
$ npx -y skills add agents-inc/skills --skill web-meta-framework-remix --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/web-meta-framework-remix
Context preview
The summary Claude sees to decide when to auto-load this skill.
File-based routing, loaders, actions, defer streaming, useFetcher, error boundaries, progressive enhancement
SKILL.md
web-meta-framework-remix.SKILL.mdname: web-meta-framework-remix
description: File-based routing, loaders, actions, defer streaming, useFetcher, error boundaries, progressive enhancement
Remix / React Router v7 Framework Patterns
> **Quick Guide:** Each route exports a `loader` for reads and an `action` for writes. Both run on the server. Data flows through loaders, mutations go through actions, forms work without JavaScript, and nested routes enable parallel data loading. `json()` and `defer()` are deprecated in React Router v7 -- return raw objects instead, use `data()` for custom headers/status.
---
<migration_notice>
IMPORTANT: React Router v7 Migration
**Remix has merged into React Router v7.** What was planned as Remix v3 is now React Router v7 "framework mode".
| Remix v2 (Deprecated) | React Router v7 (Current) | | --------------------------------- | ------------------------------------------------ | | `json(data)` | Return raw objects directly | | `json(data, { status, headers })` | `data(data, { status, headers })` | | `defer({ key: promise })` | Return `{ key: promise }` with Single Fetch | | `@remix-run/node` imports | `react-router` / `@react-router/node` | | `LoaderFunctionArgs` | `Route.LoaderArgs` (generated types) | | `ActionFunctionArgs` | `Route.ActionArgs` (generated types) | | `useLoaderData<typeof loader>()` | `loaderData` prop via `Route.ComponentProps` | | `RemixServer` | `ServerRouter` (from `react-router`) | | `RemixBrowser` | `HydratedRouter` (from `react-router/dom`) | | File-based routing (automatic) | `routes.ts` + optional `@react-router/fs-routes` |
**This skill covers both Remix v2 and React Router v7 patterns.** Examples use Remix v2 imports by default with RR v7 equivalents documented in [examples/react-router-v7.md](examples/react-router-v7.md).
**Migration guide:** [Upgrading from Remix](https://reactrouter.com/upgrading/remix)
</migration_notice>
---
<critical_requirements>
CRITICAL: Before Using This Skill
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST export loaders and actions as named exports from route modules only -- they do not work in non-route files)**
**(You MUST throw Response objects for expected errors (404, 403) -- use ErrorBoundary for handling)**
**(You MUST await critical data and return non-critical data as Promises for streaming)**
**(You MUST use named constants for HTTP status codes -- no magic numbers)**
</critical_requirements>
---
**Auto-detection:** Remix routes, React Router v7, loader function, action function, clientAction, clientLoader, useLoaderData, useActionData, useFetcher, defer, ErrorBoundary, Form component, meta function, links function, Single Fetch, ServerRouter, HydratedRouter, Route.LoaderArgs, Route.ComponentProps, shouldRevalidate
**When to use:**
- Building full-stack React applications with server-side rendering
- Implementing data loading with loaders and mutations with actions
- Creating progressively enhanced forms that work without JavaScript
- Streaming non-critical data with defer/Promises and Suspense
- Handling errors gracefully with route-level ErrorBoundary
**When NOT to use:**
- Static sites without server-side logic
- Simple SPAs without server rendering needs
- Projects already committed to a different meta-framework
**Key patterns covered:**
- File-based routing (routes/, \_index, $params, \_layout)
- Loaders for server-side data fetching
- Actions for mutations with progressive enhancement
- Streaming with defer() / raw Promises (RR v7)
- useFetcher for non-navigation mutations and optimistic UI
- Error boundaries with multi-status handling
- Meta and Links functions for SEO
- Resource routes (API endpoints, file downloads)
- Nested routing with parallel data loading
- React Router v7 migration (Single Fetch, type generation, clientAction)
---
<philosophy>
Philosophy
Remix simplifies full-stack development to a single mental model: **each route exports a loader for reads and an action for writes**. Both functions execute exclusively on the server, enabling direct database access without exposing secrets to the client.
**Core Principles:**
1. **Server-first data loading**: Loaders run on the server before rendering, eliminating client-side data fetching waterfalls 2. **Progressive enhancement**: Forms work with plain POST requests -- JavaScript enhances but isn't required 3. **HTTP semantics**: Caching uses standard HTTP headers (Cache-Control), not framework-specific solutions 4. **Nested routes**: URL segments map to component hierarchy, enabling parallel data loading 5. **Web standards**: Uses Fetch API Request/Response objects throughout
**Data Flow:**
URL Change -> Loader(s) Execute -> Component Renders -> User Interacts
|
Action Executes -> Loaders Revalidate</philosophy>
---
<patterns>
Core Patterns
Pattern 1: File-Based Routing
Files in `app/routes/` become URL paths. File naming conventions control nesting, layouts, and dynamic segments.
| File Name | URL | Description | | ----------------- | ------------- | ----------------------------- | | `_index.tsx` | `/` | Index route (root) | | `about.tsx` | `/about` | Static route | | `blog.$slug.tsx` | `/blog/:slug` | Dynamic parameter | | `blog_.tsx` | `/blog` | Pathless layout escape | | `_auth.tsx` | (none) | Layout route (no URL segment) | | `_auth.login.tsx` | `/login` | Route nested in layout | | `$.tsx`
Read more
name: web-meta-framework-remix description: File-based routing, loaders, actions, defer streaming, useFetcher, error boundaries, progressive enhancement
Remix / React Router v7 Framework Patterns
> **Quick Guide:** Each route exports a `loader` for reads and an `action` for writes. Both run on the server. Data flows through loaders, mutations go through actions, forms work without JavaScript, and nested routes enable parallel data loading. `json()` and `defer()` are deprecated in React Router v7 -- return raw objects instead, use `data()` for custom headers/status.
---
<migration_notice>
IMPORTANT: React Router v7 Migration
**Remix has merged into React Router v7.** What was planned as Remix v3 is now React Router v7 "framework mode".
| Remix v2 (Deprecated) | React Router v7 (Current) | | --------------------------------- | ------------------------------------------------ | | `json(data)` | Return raw objects directly | | `json(data, { status, headers })` | `data(data, { status, headers })` | | `defer({ key: promise })` | Return `{ key: promise }` with Single Fetch | | `@remix-run/node` imports | `react-router` / `@react-router/node` | | `LoaderFunctionArgs` | `Route.LoaderArgs` (generated types) | | `ActionFunctionArgs` | `Route.ActionArgs` (generated types) | | `useLoaderData<typeof loader>()` | `loaderData` prop via `Route.ComponentProps` | | `RemixServer` | `ServerRouter` (from `react-router`) | | `RemixBrowser` | `HydratedRouter` (from `react-router/dom`) | | File-based routing (automatic) | `routes.ts` + optional `@react-router/fs-routes` |
**This skill covers both Remix v2 and React Router v7 patterns.** Examples use Remix v2 imports by default with RR v7 equivalents documented in [examples/react-router-v7.md](examples/react-router-v7.md).
**Migration guide:** [Upgrading from Remix](https://reactrouter.com/upgrading/remix)
</migration_notice>
---
<critical_requirements>
CRITICAL: Before Using This Skill
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST export loaders and actions as named exports from route modules only -- they do not work in non-route files)**
**(You MUST throw Response objects for expected errors (404, 403) -- use ErrorBoundary for handling)**
**(You MUST await critical data and return non-critical data as Promises for streaming)**
**(You MUST use named constants for HTTP status codes -- no magic numbers)**
</critical_requirements>
---
**Auto-detection:** Remix routes, React Router v7, loader function, action function, clientAction, clientLoader, useLoaderData, useActionData, useFetcher, defer, ErrorBoundary, Form component, meta function, links function, Single Fetch, ServerRouter, HydratedRouter, Route.LoaderArgs, Route.ComponentProps, shouldRevalidate
**When to use:**
- Building full-stack React applications with server-side rendering
- Implementing data loading with loaders and mutations with actions
- Creating progressively enhanced forms that work without JavaScript
- Streaming non-critical data with defer/Promises and Suspense
- Handling errors gracefully with route-level ErrorBoundary
**When NOT to use:**
- Static sites without server-side logic
- Simple SPAs without server rendering needs
- Projects already committed to a different meta-framework
**Key patterns covered:**
- File-based routing (routes/, \_index, $params, \_layout)
- Loaders for server-side data fetching
- Actions for mutations with progressive enhancement
- Streaming with defer() / raw Promises (RR v7)
- useFetcher for non-navigation mutations and optimistic UI
- Error boundaries with multi-status handling
- Meta and Links functions for SEO
- Resource routes (API endpoints, file downloads)
- Nested routing with parallel data loading
- React Router v7 migration (Single Fetch, type generation, clientAction)
---
<philosophy>
Philosophy
Remix simplifies full-stack development to a single mental model: **each route exports a loader for reads and an action for writes**. Both functions execute exclusively on the server, enabling direct database access without exposing secrets to the client.
**Core Principles:**
1. **Server-first data loading**: Loaders run on the server before rendering, eliminating client-side data fetching waterfalls 2. **Progressive enhancement**: Forms work with plain POST requests -- JavaScript enhances but isn't required 3. **HTTP semantics**: Caching uses standard HTTP headers (Cache-Control), not framework-specific solutions 4. **Nested routes**: URL segments map to component hierarchy, enabling parallel data loading 5. **Web standards**: Uses Fetch API Request/Response objects throughout
**Data Flow:**
URL Change -> Loader(s) Execute -> Component Renders -> User Interacts
|
Action Executes -> Loaders Revalidate</philosophy>
---
<patterns>
Core Patterns
Pattern 1: File-Based Routing
Files in `app/routes/` become URL paths. File naming conventions control nesting, layouts, and dynamic segments.
| File Name | URL | Description | | ----------------- | ------------- | ----------------------------- | | `_index.tsx` | `/` | Index route (root) | | `about.tsx` | `/about` | Static route | | `blog.$slug.tsx` | `/blog/:slug` | Dynamic parameter | | `blog_.tsx` | `/blog` | Pathless layout escape | | `_auth.tsx` | (none) | Layout route (no URL segment) | | `_auth.login.tsx` | `/login` | Route nested in layout | | `$.tsx`
Showing the first part of this file.
The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Other skills on agents-inc-skills.
- /ai-infrastructure-huggingface-inference
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation, audio transcription, translation, summarization, and Inference Endpoints
Open skill - /ai-infrastructure-litellm
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production deployment
Open skill - /ai-infrastructure-modal
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Open skill - /ai-infrastructure-ollama
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and OpenAI-compatible endpoint
Open skill - /ai-infrastructure-replicate
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Open skill - /ai-infrastructure-together-ai
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation, fine-tuning, and OpenAI-compatible endpoints
Open skill

