React Router 路由配置
routing
本 SPA 的 React Router v7 路由约定。适用于:编辑 `app/routes.ts`、添加/删除路由或更改导航时。
- License 许可
- MIT
- 所属仓库
- github/replica
- 最近更新
- 2026-11-15
- Stars
- ★ 273
- Forks
- 35
01 前言 Front Matter
- name
- routing
- description
- React Router v7 routing conventions for this SPA. USE WHEN: editing `app/routes.ts`, adding/removing a route, or changing navigation.
03 SKILL.md 正文
Routing
Paths below are relative to this app's directory.
- This app disables runtime SSR (
ssr: false) and renders routes client-side. React Router still generates the SPA HTML shell during the build. - Routes are defined in
app/routes.tsusing React Router v7 config (the "framework" style).
General Structure
- Main navigation structure:
- Home:
index("routes/home.tsx")at/ - Discover section:
/discover/models,/discover/tools - Build section:
/build/agents,/build/tools - Operate section:
/operate/dashboard,/operate/agents - Docs:
/docs
- Home:
- Layout wrapper:
app/components/shell/NavLayout.tsxprovides top/left nav - Export
topNavRoutesandgetLeftNavRoutes(pathname)fromapp/routes.tsfor navigation components - Type-safe routes via auto-generated types in
.react-router/types/
Adding a Route
- Create the file in
app/routes/ - Add it to
app/routes.tsconfig array - Use type-safe route imports:
import type { Route } from "./+types/routeName" - Run
npm run type-checkfrom this app's directory to regenerate route types and check TypeScript.
04 同仓库更多 Skills
create-prototype-from-production
Use when asked to copy, clone, replicate or recreate a live production website or web app as a Replica prototype from its URL, such as "create a prototype from https://example.com" or "replicate this site for a demo". Do not use for building a new design from a brief, or for changing an existing prototype.
页面视觉设计评审
visual-design-review
依据使用方自有的产品与设计系统指南,审查页面层级、分组、密度、操作及状态设计。当用户要求视觉设计评审、页面点评,或询问新页面是否清晰传达其任务时使用。
技能共享源配置与上下文起草
setup-skills
配置共享源,并使用独立的 writer 起草上下文。普通/全新设置会提供用户指定包的安装,并复用内置浏览器能力,仅在确有证据表明必要检查存在缺口时才添加浏览器工具。适用于设置、源修复、编写上下文或刷新草稿。仅配置模式会跳过工具安装和编写;安装和激活需要单独批准。
Hub 反馈设计主题提炼
review-hub-feedback
通过发现、独立判断和综合归纳,审查 Hub 反馈以提炼可复用的设计主题。不进行诊断或优化。
UI 响应式布局审计
responsive-audit
使用使用者上下文和浏览器工具,跨产品定义的视口审查 UI 布局、溢出和导航。当用户要求检查响应式、测试移动端布局或审查断点行为时使用。
Replica 原型控件创建与绑定
prototype-controls
创建并连接 Replica 原型控件。当用户要求添加或修改下拉框、滑块、输入框、切换开关或操作按钮(用于配置变体、场景、可见 UI、应用状态或数据源)时使用,即使未使用画布术语也一样。涵盖声明、类型化绑定、默认值、条件、重置和动作。仅涉及产品 UI 表单字段和筛选器时,应使用 create-prototype。