← 返回 Skills 市场
anderskev

Remix V2 Routing Review

作者 Kevin Anderson · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
15
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install remix-v2-routing-review
功能描述
Reviews Remix v2 route files for naming convention violations, missing layouts, resource-route shape, and v1 holdovers. Use when reviewing files under app/ro...
使用说明 (SKILL.md)

Remix v2 Routing Code Review

Loaded by review-remix-v2 (umbrella) to flag routing anti-patterns in app/routes/ modules. See remix-v2-routing for canonical patterns.

Quick Reference

Issue Type Reference
Filename smells (index.tsx, __auth, wrong escape, non-route files) references/route-files.md
Missing \x3COutlet />, orphan dotted segments, duplicated layout logic references/layouts-outlets.md
Default export on a resource, \x3CLink> without reloadDocument, splat params references/resource-routes.md
react-router-dom imports, __double folders, v1-adapter fallback references/v1-holdovers.md
Missing \x3CMeta />/\x3CLinks />/\x3CScripts />/\x3CScrollRestoration />, Vite-vs-Classic \x3CLiveReload />, root ErrorBoundary without document shell references/root-shell.md

Scope

This skill flags issues in:

  • Files under app/routes/ (filenames, exports, imports, JSX shape)
  • app/root.tsx (document shell, root \x3COutlet />)
  • remix.config.js (entries that change route discovery: routes(), ignoredRouteFiles, @remix-run/v1-route-convention)
  • Any module that links to a resource route (\x3CLink> usage)

Out of scope: loader/action data contracts (covered by remix-v2-data-flow-review), form behavior (remix-v2-forms-review), meta/headers (remix-v2-meta-sessions-review).

Review Checklist

  • Index routes named _index.tsx, not index.tsx
  • Pathless layouts use single underscore (_auth.tsx), not double (__auth/)
  • Dotted child routes (users.profile.tsx) have a parent module or use trailing underscore (users_.profile.tsx)
  • Parent route modules render \x3COutlet />
  • Splat segments read params["*"], never params.splat / params.rest
  • Literal dots/special chars escaped with brackets (sitemap[.]xml.tsx)
  • Resource routes have no default export
  • \x3CLink> to a resource route uses reloadDocument (or is a plain \x3Ca>)
  • Imports come from @remix-run/react, not react-router-dom
  • Non-route files (CSS, helpers, tests) live in a folder with route.tsx, or are listed in ignoredRouteFiles
  • Trailing-underscore opt-outs only used when a parent layout actually exists to escape
  • Optional segments ($lang) narrow params.lang in the loader (see references/route-files.md)

Valid Patterns (Do NOT Flag)

  • Resource route with no default export — this is the convention that makes it a resource route. Never flag.
  • Any _-prefixed pathless layout file without \x3COutlet /> when the module is intentionally a wrapper that renders fixed UI only. Confirm by checking children — if no *.{segment}.tsx siblings exist, the wrapper-only shape is intentional.
  • Files prefixed with _ that don't appear in any URL — pathless layouts and _index are supposed to be hidden from the URL.
  • @remix-run/v1-route-convention wired up in remix.config.js — legitimate migration adapter, not a smell on its own. Only flag if v1-style files appear without the adapter installed.
  • useLoaderData\x3Ctypeof loader>() — type annotation, not assertion.
  • Splat route accessing params["*"] with bracket syntax — that is the only correct access pattern.
  • Folder app/routes/dashboard/ with route.tsx plus sibling .server.ts, .css, component files — co-location is the documented pattern.
  • Trailing underscore (concerts_.mine.tsx) when a sibling concerts.tsx layout exists and this URL intentionally skips it.

Context-Sensitive Rules

Only flag these issues when the specific context applies:

Issue Flag ONLY IF
index.tsx under app/routes/ Project is v2 and @remix-run/v1-route-convention is NOT wired in remix.config.js
Parent module without \x3COutlet /> Sibling dotted children (parent.*.tsx) exist in app/routes/
__double underscore folder No v1-convention adapter is installed
Trailing-underscore segment No corresponding parent layout exists (nothing to opt out of)
Default export on a module returning non-HTML The loader/action actually returns a raw Response (PDF, JSON, RSS)
\x3CLink> to resource route Target route has no default export AND \x3CLink> lacks reloadDocument

Hard gates (before writing findings)

Run these in order. Do not draft user-facing findings until every gate passes for the batch you are about to report.

  1. Location evidencePass: Each issue lists a repo path (file under app/routes/ or remix.config.js) and either a line range or a short verbatim quote from the file you read. Filename-only smells must quote the literal filename.

  2. Exemption checkPass: For each issue, state in one line why it is not covered by Valid Patterns (Do NOT Flag). Resource-route flags require explicit evidence of a default export or a \x3CLink> without reloadDocument.

  3. Version checkPass: Confirm the project is Remix v2 (check package.json for @remix-run/react ^2, or presence of v2 flat-routes filenames elsewhere in app/routes/). If @remix-run/v1-route-convention is wired in remix.config.js, v1 filenames (__auth/, index.tsx) are intentional — do not flag them as smells.

  4. ProtocolPass: Complete the Pre-Report Verification Checklist in review-verification-protocol for this review.

When to Load References

Review Questions

  1. Does every parent route render \x3COutlet />, or is it a deliberate wrapper-only?
  2. Do filenames match the v2 grammar (single _ for pathless, _index for index, [...] for escapes)?
  3. Are resource routes free of default exports, and do all \x3CLink>s to them use reloadDocument?
  4. Are all router imports from @remix-run/react (and server helpers from @remix-run/node)?
  5. If v1 filenames exist, is @remix-run/v1-route-convention wired up — or are they accidental?

Additional Documentation

  • Route file naming smells: references/route-files.mdindex.tsx, __double folders, wrong escape syntax, dot/underscore confusion, non-route files under app/routes/.
  • Layouts and outlets: references/layouts-outlets.md — pathless layout misuse, missing \x3COutlet />, orphan dotted children, duplicated layout logic.
  • Resource routes: references/resource-routes.md — accidental default export, \x3CLink> without reloadDocument, splat params["*"] access.
  • v1 holdovers: references/v1-holdovers.mdreact-router-dom imports, __auth folders, @remix-run/v1-route-convention as a deliberate-vs-accidental tell.
安全使用建议
Install this if you want an agent to help review Remix v2 routing conventions. Expect it to inspect relevant route and config files and to suggest routing fixes, but review any suggested code changes before applying them.
能力评估
Purpose & Capability
The skill's purpose is to review Remix v2 routing files for naming, layout, resource-route, root-shell, and v1-migration issues, and its files are consistent with that documentation and review purpose.
Instruction Scope
Instructions are limited to user-directed code review of Remix route modules, root/config files, and related references, with explicit checks to avoid false positives before reporting findings.
Install Mechanism
The package consists of markdown skill and reference files only; metadata and SkillSpector report show no executable scripts or declared dependencies.
Credentials
Reading app/routes, app/root.tsx, Remix config, and package metadata is proportionate to a Remix routing review; no credential, network, broad local indexing, or unrelated data access is requested.
Persistence & Privilege
No persistence, privilege escalation, startup hooks, background workers, session/profile use, or automatic mutation behavior is present.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install remix-v2-routing-review
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /remix-v2-routing-review 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of remix-v2-routing-review: - Flags routing anti-patterns in Remix v2 projects under app/routes/. - Checks for naming violations, missing layouts, outdated v1 conventions, and invalid resource route patterns. - Includes comprehensive scope, context-sensitive rules, and a pre-report verification protocol. - Provides references and a checklist for consistent routing code reviews. - Designed to load only when reviewing Remix v2 route files; not user-invocable.
元数据
Slug remix-v2-routing-review
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Remix V2 Routing Review 是什么?

Reviews Remix v2 route files for naming convention violations, missing layouts, resource-route shape, and v1 holdovers. Use when reviewing files under app/ro... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 15 次。

如何安装 Remix V2 Routing Review?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install remix-v2-routing-review」即可一键安装,无需额外配置。

Remix V2 Routing Review 是免费的吗?

是的,Remix V2 Routing Review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Remix V2 Routing Review 支持哪些平台?

Remix V2 Routing Review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Remix V2 Routing Review?

由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.0.0。

💬 留言讨论