remix-optimizer
/remix-optimizer
Sprawdza i optymalizuje aplikacje Remix 3 pod kątem czasu odpowiedzi, zbędnej hydratacji, dostarczania modułów, zapytań, cache i bezpieczeństwa, a także planuje migrację z Remix v2.
- Autor
- RuneStone-Tech ↗
- Repozytorium
- optimize-anything ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 04.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 13
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 04.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/audit.py
Co robi i kiedy
Sprawdza i optymalizuje aplikacje Remix 3 pod kątem czasu odpowiedzi, zbędnej hydratacji, dostarczania modułów, zapytań, cache i bezpieczeństwa, a także planuje migrację z Remix v2.
Oryginalny opis (EN)
Audit and optimize Remix 3 apps (remix 3.1, Node 24.3+, no build step, controllers and actions, clientEntry hydration, frames, built-in data/auth/assets) for server and frame TTFB, unnecessary hydration, module/asset delivery, data and query cost, middleware ordering, caching, security, and production deployment, with real before/after measurement. Also diagnoses legacy Remix v2 / React Router framework-mode apps and maps the migration path. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions a slow Remix app, Remix 3,
Jak działa
- Workflow
- Principles
Podgląd SKILL.md
--- name: remix-optimizer description: Audit and optimize Remix 3 apps (remix 3.1, Node 24.3+, no build step, controllers and actions, clientEntry hydration, frames, built-in data/auth/assets) for server and frame TTFB, unnecessary hydration, module/asset delivery, data and query cost, middleware ordering, caching, security, and production deployment, with real before/after measurement. Also diagnoses legacy Remix v2 / React Router framework-mode apps and maps the migration path. Always produces a written findings report and a fix plan for approval before touching code. Use this whenever the user mentions a slow Remix app, Remix 3, routes.ts or controllers, createController, clientEntry or hydration, Frame or streaming, remix/assets or import maps, data-table or migrations, sessions/auth, remix doctor/test, or upgrading from @remix-run v2 / React Router v7 -- even if they never say "audit" or "optimize". --- # Remix Optimizer Audit a Remix codebase, report what is slow or fragile and why, agree a plan with the user, then fix it. Order: evidence, approval, edits. Remix 3 runs TypeScript directly, serves unbundled browser modules, and hydrates only explicit `clientEntry` boundaries; changing those boundaries, frames or data access changes behavior and security, so nothing is edited before approval. ## Workflow ### 1. Scope (quick) - Find the root (`package.json`). Record: `remix` version (3.x current; `@remix-run/*` 2.x is legacy), Node runtime (3.x requires >=24.3), `app/routes.ts`, `app/router.ts`, `server.ts`, `app/assets.ts`, database adapter, auth/session storage, client entries, frames, and whether this is Remix 3, legacy Remix v2, or React Router framework mode. - Run `python <skill-dir>/scripts/audit.py <project-root>` -- static scan of `package.json`, `remix.json`, `app/routes.ts`, `app/router.ts`, `server.ts`, `app/assets.ts`, controllers, data modules and components for legacy v2 patterns, hydration/asset/config issues, middleware ordering, data and security risks, with file:line evidence. Use `--json` to post-process. - Classify the pain: slow document TTFB (actions/DB/frames), slow module graph (unbundled assets), hydration cost, slow mutations (forms/actions), deploy/runtime issues, or security/migration. Ask which hurts if unclear. - Read `references/tooling.md` once: what can be measured here (`remix doctor`, production server, Network panel, Server-Timing, `remix test`, load tests). ### 2. Audit The script finds cheap leads; you find the rest by reading. Read `app/routes.ts`, `app/router.ts`, the document shell, the 3-5 controllers/actions the user cares about, `app/assets.ts`, and any `clientEntry`/`Frame` components. Load only what applies: | Area | Reference | | ------------------------------------------------------------- | --------------------------------- | | Typed routes, controllers, responses, middleware, server entry | `references/routing-controllers.md` | | Tables, migrations, queries, relations, transactions, adapters | `references/data-database.md` | | Component model, state/update, hydration, mixins, CSS | `references/ui-hydration.md` | | Frames, streaming, fallbacks, frame reloads, prefetch | `references/frames-streaming.md` | | Asset server, import maps, preloads, fingerprinting, deploy | `references/assets-production.md` | | Sessions, auth, CSRF/COP, uploads, asset allowlist, XSS | `references/auth-security.md` | | Remix v2 → React Router v7/v8, or Remix 3 rewrite | `references/legacy-migration.md` | | Measurement and honest reporting | `references/tooling.md` | **Measure, never guess.** Run the production start command (`node --import remix/node-tsx server.ts` or the platform adapter) behind the same proxy/CDN, then measure that. Dev mode and a single warm page are not evidence. Record document TTFB, module requests/bytes, hydration count, frame requests, action latency and DB time. Mark each finding **Confirmed** (build/server output, network/profiler, code evidence) or **Suspected** (needs measuring). ### 3. Report Fill `assets/report-template.md`, save it as `REMIX_OPTIMIZATION_REPORT.md` in the project root, and show the user. Five-line summary, findings table by impact/effort, then per-finding detail (evidence, why it hurts, fix, risk, behavior impact). Group near-duplicates. ### 4. Plan -- then stop for approval Use plan mode: `EnterPlanMode` (load with ToolSearch if deferred), write the plan, present with `ExitPlanMode`; if unavailable show it in chat and wait for an explicit "go". Structure: 1. **Quick wins** -- narrow `clientEntry` boundaries, add `fallback` to slow frames, prefetch intent links, enable asset minify/fingerprint, fix middleware order, add limits/timeouts, select fewer columns, add missing indexes. Low risk. 2. **Structural** -- move data into actions/frames, split route-owned regions into frames, batch N+1 queries, adopt streaming for slow regions, move CPU work off the request path, shared session/upload storage for replicas. Name each behavior change. 3. **Heavy** -- Remix v2 → React Router v7/v8 or a Remix 3 rewrite, database adapter change, auth provider migration, SPA mode, bundler adoption for a very large app. Separately approved. Each step: files touched, expected effect, how to verify, how to roll back. ### 5. Fix Only approved items, in small groups. After each: `tsc --noEmit`, `remix doctor`, `remix test`, then start the production server. A break must trace to one change. Do not mix a legacy migration with optimization edits. If a change moves auth/session/upload storage, exposes a new browser-reachable module, or changes a frame's HTML contract, stop and ask. ### 6. Verify and wrap up Re-measure the same pages and load: document TTFB, module count/bytes, hydration count, frame TTFB, action latency, LCP/INP/CLS, and DB time. State plainly what could not be measured. End with deferred items and one suggested next step. ## Principles - **Server first, hydrate the smallest boundary.** `clientEntry` is the only browser boundary; never hydrate a page because one button needs state. - **Data loads in actions.** Components render synchronously; a route-owned region that needs its own data gets a frame/action, not an async component. - **Explicit updates.** State is ordinary JavaScript and `handle.update()` schedules a render; forgetting it is a UI bug, not a framework optimization. - **No build step means module discipline.** Unbundled modules need HTTP/2, preloads, minification and fingerprinting; a very large app may eventually justify a bundler. - **Frames are requests.** A blocking frame delays TTFB; a fallback streams, but every frame is another action/DB call. Choose whole-page vs per-region deliberately. - **Middleware order is behavior.** Sessions before auth, form parsing before CSRF/method override, compression before responses it should wrap, static before enrichment. - **The asset allowlist is a security boundary.** Only files under explicit `public/` directories should be browser-reachable. - **Caching is correctness first.** Personalized HTML and private files are `private`/`no-store`; fingerprinted assets are immutable. - **Remix v2 is EOL.** The path forward is React Router v7/v8 (evolution) or Remix 3 (rewrite). Do not present Remix 3 as a drop-in upgrade. - **Docs move.** Remix 3 ships its docs in `node_modules/remix`; read those for the installed version instead of recalling Remix v2 APIs.
Pliki w paczce (13)
- LICENSE 1 KB
- README.md 1 KB
- SKILL.md 7 KB
- assets/report-template.md 2 KB
- references/assets-production.md 6 KB
- references/auth-security.md 6 KB
- references/data-database.md 5 KB
- references/frames-streaming.md 5 KB
- references/legacy-migration.md 4 KB
- references/routing-controllers.md 6 KB
- references/tooling.md 3 KB
- references/ui-hydration.md 6 KB
- scripts/audit.py 19 KB
Wersje
W bazie nie ma innych skilli o nazwie remix-optimizer.
Migawka bazy z 13.11.2026 · wersja paczki e95da81dd01e (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95remix
Buduje i przegląda aplikacje Remix 3 z pakietem npm remix: struktura aplikacji, trasy, kontrolery, middleware, walidacja, dostęp do danych, uwierzytelnianie, sesje, pliki, komponenty UI i testy. - 100remix
Buduje i przegląda aplikacje Remix 3 z pakietem npm remix: trasy, kontrolery, middleware, walidacja, dostęp do danych, autoryzacja, sesje, uploady, hydratacja i testy. - 100remix-v2-perf-ssr
Obsługuje wydajność, streaming, cache i granice serwer-klient w Remix v2: cache HTTP, moduły tylko serwerowe, bezpieczeństwo hydratacji i prefetch. - 100remix
Obsługuje framework full-stack React Remix: loadery, akcje, zagnieżdżony routing i progressive enhancement podczas budowy aplikacji Remix. - 90frontend-remix-architecture
Projektuje architekturę Remix: routing zagnieżdżony z Outlet, trasy układowe, loadery i akcje, sesje oraz wdrożenie w Vite. - 100remix
Pomaga budować aplikacje full-stack React w Remix v2 i jego następcy React Router framework mode: zagnieżdżony routing, loadery i akcje, progressive enhancement, wdrożenia oraz migracja do React Router v7.