agentleFS
NVIDIAKnown publisherNVIDIA/nvcf/src/uis/nvcf-ui/.agents/skills/routing/SKILL.md

routing

Skill268 starsChanged 3 days agoApache-2.0View on GitHub

Add or change routes in the nvcf-ui app with TanStack Router file-based routing: route files in ui/src/routes, loaders, search params, path params, navigation, pending and error states, layout routes, and code splitting. Use when adding a page, editing a loader or search schema, linking between pages, or loading the official TanStack Router skills for this project.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use parallelization and prompt-chaining.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hajekimSkill

    parallelization

    This skill should be used when the user wants to "run tasks in parallel", "concurrent LLM calls", "fan-out and fan-in", "parallel agents", "simultaneous execution", "reduce latency with concurrency", "parallel sub-tasks", "parallel processing", "concurrent agent execution", "run agents simultaneously", "speed up with parallelism", "async agent execution", "batch LLM calls", "parallel workflow", "parallelize agent tasks", or needs to execute multiple independent tasks simultaneously. Also responds to Korean: "병렬 작업 실행", "동시 LLM 호출", "팬아웃 팬인 패턴", "병렬 에이전트", "동시 실행", "동시성으로 지연 시간 감소", "병렬로 실행", "동시에 여러 작업", "병렬 처리", "동시에 돌려줘", "빠르게 병렬로", "여러 작업 동시 실행해줘". Also responds to Japanese: "並列処理", "同時実行", "並列エージェント", "並行LLM呼び出し", "ファンアウト・ファンイン", "複数タスクを同時に実行したい", "処理速度を上げたい", "非同期エージェント", "バッチ処理", "並列で動かしたい" Also responds to Chinese: "并行处理", "并发执行", "并行智能体", "同时调用多个LLM", "扇出扇入模式", "多任务并行运行", "加快处理速度", "异步智能体", "批量LLM调用", "同时运行多个任务".. Apply this skill to design or implement the Parallelization agentic design pattern.

    Also in 3 projects that use this

  • hajekimSkill

    prompt-chaining

    This skill should be used when the user wants to "chain prompts", "build a pipeline", "break down complex tasks into steps", "sequential LLM calls", "multi-step reasoning", "pipeline pattern", "sequential agent pipeline", "multi-step prompt pipeline", "LLM chain", "step-by-step agent", "prompt pipeline", "decompose task into prompts", "stage-by-stage processing", "chained LLM calls", or when a task is too complex for a single prompt and needs to be decomposed into sequential sub-tasks. Also responds to Korean: "프롬프트 체이닝", "체인 방식 에이전트", "단계별 LLM 호출", "복잡한 작업 분해", "순차적 프롬프트 파이프라인", "단계적 작업 처리", "단계별 처리", "순차 처리 에이전트", "파이프라인 만들어줘", "단계적으로 처리해줘", "연속 프롬프트", "체이닝 해줘". Also responds to Japanese: "プロンプトチェーニング", "ステップごとに処理", "順次LLM呼び出し", "パイプライン構築", "複雑なタスクを分解", "段階的エージェント", "連続プロンプト", "LLMパイプライン", "順番に処理してほしい", "チェーン方式エージェント" Also responds to Chinese: "提示词链", "顺序调用LLM", "构建流水线", "分解复杂任务", "逐步处理", "链式提示", "多步骤流水线", "按顺序处理任务", "提示词管道", "帮我一步一步处理".. Apply this skill to design, implement, or explain the Prompt Chaining agentic design pattern.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not export the page component or pending component.

    line 45
  2. Very specific:

    If you added, renamed, or moved a route file and task ui:dev is not running, run task test first.

    line 105

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Routing

nvcf-ui uses TanStack Router file-based routing with its default layout. TanStack's docs and skills apply as written. This skill covers only what is specific to this project.

How it works here

  • Route files live in ui/src/routes/. Their names follow TanStack's file-naming conventions, so the folder structure is the URL structure.
  • @tanstack/router-plugin generates ui/src/routeTree.gen.ts whenever Vite or Vitest starts, and on file changes during task ui:dev. The file is committed (TanStack FAQ). Never edit it.
  • autoCodeSplitting is on. The page component is split into its own chunk; loader, pendingComponent, and the rest of the route options stay in the main bundle.
  • Files ending in .test.* or .spec.* are ignored by route generation (routeFileIgnorePattern in ui/vite.config.ts).

What a route file holds

A route file holds the route options and the page component:

export const Route = createFileRoute("/functions/")({
  head: () => ({ meta: [{ title: "Functions · NVCF" }] }),
  validateSearch: functionsSearchSchema,
  pendingComponent: FunctionsListPending,
  loader: async ({ context: { queryClient } }) => { ... },
  component: FunctionsList,
});
  • Do not export the page component or pending component. The code splitter requires route properties to stay unexported.
  • Inside the route file, read route data with Route.useLoaderData(), Route.useSearch(), Route.useParams(), and Route.useNavigate().
  • In other files, use getRouteApi("<route id>") instead of importing Route. Importing the route object risks circular imports.
  • Page scaffolding (heading, layout, composition, table columns, URL-state wiring) stays in the route file. Domain building blocks come from ~/features/<domain>/. See ARCHITECTURE.md for placement rules.

Project conventions

  • Loaders call queryClient.ensureQueryData({ ...getXQueryOptions(...), revalidateIfStale: true }) for blocking data and void queryClient.prefetchQuery(...) for data below the fold.
  • Page components read data with the generated suspense hooks (useGetXSuspense).
  • validateSearch uses a Zod schema. List pages extend baseTableSearchSchema from ~/components/DataTable/utils/tableSearchSchema.
  • Errors render through the router's global defaultErrorComponent (RouteErrorFallback). Do not add a per-route errorComponent unless the page needs recovery the global fallback cannot give, and record that in ARCHITECTURE.md.
  • Account-specific detail pages set staticData: { account: { redirectOnChange: "<list path>" } } so switching accounts leaves the page.
  • Shared layout for every page under a URL section goes in a layout route, ui/src/routes/<section>/route.tsx, rendering <Outlet />.
  • Top-level pages need a nav entry in navItems in ui/src/routes/__root.tsx.

Official TanStack skills

The @tanstack/intent CLI prints the skills that ship with the installed TanStack packages, matched to the installed version. Run from ui/:

pnpm exec intent list
pnpm exec intent load @tanstack/router-core#router-core
pnpm exec intent load @tanstack/router-core#router-core/data-loading
pnpm exec intent load @tanstack/router-core#router-core/search-params
pnpm exec intent load @tanstack/router-core#router-core/path-params
pnpm exec intent load @tanstack/router-core#router-core/navigation
pnpm exec intent load @tanstack/router-core#router-core/not-found-and-errors
pnpm exec intent load @tanstack/router-core#router-core/code-splitting
pnpm exec intent load @tanstack/router-core#router-core/type-safety
pnpm exec intent load @tanstack/react-router#compositions/router-query

Load the skill that matches the task before changing route code. Where a TanStack skill and this file disagree, this file wins for project conventions.

Examples

  • List page: ui/src/routes/functions/index.tsx
  • Detail page with path params: ui/src/routes/functions/$functionId.versions.$versionId.tsx
  • Page composing several features: ui/src/routes/index.tsx
  • Root route and app shell: ui/src/routes/__root.tsx

Validate

  1. If you added, renamed, or moved a route file and task ui:dev is not running, run task test first. It regenerates routeTree.gen.ts, and task verify typechecks before it runs tests.
  2. Run task lint:fix.
  3. Run task verify.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.