agentleFS
gabriellstgabriellst/codm/.claude/skills/route/SKILL.md

route

Skill4 starsChanged 2 months agoMITView on GitHub

Create a page route. Defines the URL contract, search/path params validation, layout, and breadcrumbs. Routes through a react / astro child based on the working directory.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the path is ambiguous, ask the user once and don't proceed until they answer.

    line 17

“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

Create Route (parent)

A route is the URL contract for a page: it declares the path, validates path/search params, defines the layout, and composes route-scoped components. Each platform implements this with its own router.

Platform routing (READ FIRST)

Working file pathUse
packages/app/react/**./react/SKILL.md + ./react/registry.yaml — TanStack Router + Start (file-based via bun tsr generate)
packages/app/astro/**/*.astro./astro/SKILL.md + ./astro/registry.yaml — Astro pages + content collections + sitemap

If the path is ambiguous, ask the user once and don't proceed until they answer.

What "route" means (cross-platform)

A route is:

  1. A URL contract — path segments, optional locale prefix, validated search params (where supported), breadcrumb metadata.
  2. A thin shell — declares layout + which route-scoped components render in it. Does not fetch data to pass into components; on the interactive platforms, components own their own data.
  3. Server-renderable on react (Start) and astro — static-by-default on astro; opt-in SSR on react Start.

Shared principles

  1. One file per route. File path mirrors URL.
  2. Validated search params. React: validateSearch: zodValidator. Astro: parse Astro.url.searchParams in frontmatter.
  3. Localized paths where the platform supports it. React + astro use a [locale] segment.
  4. Breadcrumbs / <title> declared at the route level. React via staticData.breadcrumb; astro via <BaseLayout title=...>.
  5. No data fetching in the route shell (react). Components own their data. Astro is the exception — its frontmatter IS where data fetching happens.

When to use this skill

  • Adding a new page or screen URL.
  • Adding a localized variant of an existing route.
  • Adding an Astro content page (blog post, landing section as its own URL).

When NOT to use this skill

  • Adding a sub-section of an existing route → /component.
  • Adding a modal / dialog → /component (react).
  • Adding a primitive → /primitive.

Checklist (parent-level)

  • Platform identified from working directory (or asked the user).
  • Reading only the matching child SKILL + registry.
  • Search/path params declared with the right validator for the platform.
  • Route file is a thin shell — components own their data (react) or frontmatter owns it (astro).

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.