AGENT SKILL

routing

React Router v7 routing conventions for this SPA. USE WHEN: editing `app/routes.ts`, adding/removing a route, or changing navigation.

License 许可
CC-BY-4.0
最近更新
2026-11-06
Stars
★ 2
Forks
1

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.

02 资源文件 1

03 SKILL.md 正文

Routing

Paths below are relative to apps/prototype/.

  • 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.ts using 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
  • Layout wrapper: components/shell/NavLayout.tsx provides top/left nav
  • Export topNavRoutes and getLeftNavRoutes(pathname) from routes.ts for navigation components
  • Type-safe routes via auto-generated types in .react-router/types/

Adding a Route

  1. Create the file in app/routes/
  2. Add it to app/routes.ts config array
  3. Use type-safe route imports: import type { Route } from "./+types/routeName"
  4. Run react-router typegen via npm --workspace apps/prototype run type-check from the repository root (or npm run type-check from the app directory) to regenerate types and check TypeScript

04 同仓库更多 Skills

microsoft
microsoft/coreai-design-system

coreai-ds-fluentui-react

MANDATORY for @coreai-ds/react-components work. Use the CoreAI documentation MCP to discover components, props, stories, templates, and implementation patterns. If the MCP is unavailable, stop and ask the user to enable or troubleshoot it with you.

前端开发Skill与智能体开发
★ 2
microsoft
microsoft/coreai-design-system

state-management

CoreAI Sandbox's simplified TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.

★ 2
microsoft
microsoft/coreai-design-system

start-app

Start the CoreAI Sandbox dev server and open it using available browser tools. USE WHEN: the user asks you to "start the app", "run the dev server", "open the app", or "launch CoreAI Sandbox".

★ 2
microsoft
microsoft/coreai-design-system

react-components

CoreAI Sandbox component usage: import boundaries, CoreAI MCP documentation, and local adapter inspection. USE WHEN: editing any `*.tsx` file, picking a component, or writing component imports.

前端开发Skill与智能体开发
★ 2
microsoft
microsoft/coreai-design-system

new-variant

Create a new design variant or alternative for a page using the built-in feature/variant system. USE WHEN: a designer wants to try a different layout, create an "option B" or "version 2", compare designs side by side, add an A/B alternative, or explore an alternate version. Do NOT build a custom toggle solution.

视觉设计
★ 2
microsoft
microsoft/coreai-design-system

lint

Run the full lint workflow: format, typecheck, CSS lint, JS lint. USE WHEN: the user asks to "lint", "fix lint", "run the linters", "check types", or after making code changes that need verification.

代码审查
★ 2