frontend-remix-architecture
Use when the user asks about Remix v2 or React Router v7 framework mode, Remix loaders and actions, nested routes with Outlet, sessions, Remix Vite setup…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-remix-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Remix Architecture
Purpose
Build Remix applications with file-based routing, server-side data loading, progressive form mutations, and per-runtime deployment. Everything runs on the server by default.
Version Note (2026)
Remix v2 continues as React Router v7 framework mode: same loaders, actions, <Form>, useFetcher and nested routes, but imports come from react-router / @react-router/* instead of @remix-run/*, and json()/defer() are no longer needed (return plain objects). New projects start with npx create-react-router@latest; existing Remix v2 apps upgrade via the future flags and the official "Upgrading from Remix" guide. "Remix 3" is a separate, non-React framework and is not the upgrade path. Examples below use Remix v2 imports; map them as described when the project uses React Router v7.
Agent Protocol
Trigger
Exact user phrases: "Remix", "Remix architecture", "Remix routing", "Remix loader", "Remix action", "Remix form", "Remix server", "Remix session", "Remix deployment", "Remix Vite".
Input Context
Before activating, verify:
- package.json has @remix-run/* (Remix v2) or react-router + @react-router/* (React Router v7 framework mode).
- Check entry.server.tsx and root.tsx patterns.
- Determine server runtime: Node, Cloudflare Workers, or Deno.
- Confirm Vite plugin setup (
vitePluginfrom @remix-run/dev in Remix v2;reactRouter()from @react-router/dev/vite in v7).
Output Artifact
No file output. Produces route structure, loader/action code, and deployment configs as text.
Response Format
Route structure:
app/routes/
_index.tsx
products.$id.tsx
admin.tsx + admin.users.tsx
Code: show loader, action, component in one file.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Routes use file-based colocation with nested Outlet layout routes.
- Loaders fetch data in parallel for matched routes.
- Actions handle POST/PUT/PATCH/DELETE with form data validation.
- Session storage configured (cookie/memory/DB) with flash messages.
- Auth guard in root loader redirects unauthenticated requests.
- Deployment target adapter configured (Cloudflare/Vercel/Fly).
- Vite build produces correct server bundles per runtime.
Max Response Length
Route structure: unlimited. Code: 15 lines per example.
Component Architecture / Decision Trees
Architecture Options
| Approach | Trade-off | When to Use |
|---|---|---|
| Flat route files (dot notation) | Simple, flat folder | Small apps with few routes |
| Folder-based routes (folders + route.tsx) | Organized, scalable | Large apps with many child routes |
| Pathless layout routes (__ prefix) | Shared UI without URL nesting | Auth layouts, onboarding flows |
| Resource routes (no component export) | JSON APIs, files, webhooks | API endpoints, sitemaps, RSS |
| Server loaders vs universal loaders | Server load: DB access, no client bundle | Private data |
| Universal loaders | Public API calls, runs on client too | Public data, cached responses |
Decision Tree: Route Type
Does the route need to render UI?
├── No -> Resource route (export loader/action only)
└── Yes -> Is there shared UI with sibling routes?
├── Yes -> Layout route with <Outlet />
└── No -> Flat route page
Decision Tree: Loader Type
Does the loader need server-only data (DB, secrets)?
├── Yes -> Server loader (+page.server.ts)
└── No -> Is the data public and cacheable?
├── Yes -> Universal loader (+page.ts) with Cache-Control
└── No -> Server loader
Decision Tree: Session Strategy
How should user sessions persist?
├── Cookie-only (small payload) -> createCookieSessionStorage
├── Server-side DB (large payload) -> createSessionStorage with DB
└── Signed cookies (medium payload) -> createCookie + session
Decision Tree: Deployment Target
Which runtime?
├── Node.js (Fly, Railway, DIY) -> @remix-run/node + @remix-run/serve
├── Cloudflare Workers -> @remix-run/cloudflare
├── Vercel Edge -> @remix-run/vercel preset
├── Netlify Edge -> @remix-run/netlify
└── Deno -> @remix-run/deno
Decision Tree: Error Handling Strategy
What type of error?
├── Expected (404, 403, 400) -> throw new Response(status) + ErrorBoundary
├── Unexpected (crash, network) -> ErrorBoundary per route + root fallback
└── Validation error -> return json({ errors }, { status: 400 }) + useActionData
Component Design Patterns
Layout Route with Outlet
// app/routes/dashboard.tsx
import { Outlet, useLoaderData } from '@remix-run/react'
import { json } from '@remix-run/node'
export async function loader({ request }: LoaderFunctionArgs) {
const user = await getSessionUser(request)
if (!user) throw new Response('Unauthorized', { status: 401 })
return json({ user })
}
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/remix-caching-strategies.md
- references/remix-data-loading.md
- references/remix-data.md
- references/remix-deployment.md
- references/remix-error-handling.md
- references/remix-loader-patterns.md
- references/remix-routing.md
- references/remix-sessions-auth.md
FAQ
Что делает скилл frontend-remix-architecture?
Use when the user asks about Remix v2 or React Router v7 framework mode, Remix loaders and actions, nested routes with Outlet, sessions, Remix Vite setup, deployment adapters or upgrading Remix to React Router v7. Produces route structure, loader/action code and runtime config. Not for validation, optimistic UI or caching (use frontend-remix-patterns).
Как установить скилл frontend-remix-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-remix-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…