agentleFS
UwayxtUwayxt/agent-skills/.agents/skills/route-integrity-checker/SKILL.md

route-integrity-checker

Skill4 starsChanged 3 months agoMITView on GitHub

Audit and maintain route connections across the application. Use when adding pages or refactoring navigation.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Pattern matching: Verify router configuration matches the declared parameter format.

    line 41
  2. Very specific:

    Entity existence check: Verify that the destination view handles invalid or deleted IDs (e.g.

    line 42
  3. Very specific:

    Breadcrumb resolution: Ensure dynamic routes resolve parent crumbs correctly (Home > Invoices > #INV-2024-001).

    line 43
  4. Distinctive:

    When a user encounters a nonexistent route:

    line 46
  5. Very specific:

    Search input / Command Palette shortcut (⌘K)

    line 50
  6. Very specific:

    When module-registry-sync registers a new module, scan pending intents.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

Route Integrity Checker

Broken routes shatter user trust instantly — every intended destination must resolve to a functioning view, and every dynamic entity link must handle missing records gracefully.

1. Cross-reference with Information Architecture

Cross-reference the intent registry against the sitemap from information-architecture. Every nav item, footer link, and card CTA must map to a defined destination; every registered route must be reachable without dead ends.

2. Maintain the Intent Registry (.agents/route-intents.json)

Maintain a structured intent registry in the project root to track pending vs. live routes across iterations:

{
  "intents": [
    {
      "id": "intent-nav-analytics",
      "sourceLocation": "components/sidebar/Sidebar.tsx",
      "sourceLabel": "Analytics",
      "expectedRoute": "/dashboard/analytics",
      "status": "connected",
      "isDynamic": false
    },
    {
      "id": "intent-invoice-detail",
      "sourceLocation": "pages/invoices/InvoiceRow.tsx",
      "sourceLabel": "View Invoice",
      "expectedRoute": "/invoices/:invoiceId",
      "status": "connected",
      "isDynamic": true,
      "paramKey": "invoiceId"
    }
  ]
}

3. Handle dynamic & parameterized routes

For parameterized paths (/invoices/:id, /workspaces/:slug/settings):

  • Pattern matching: Verify router configuration matches the declared parameter format.
  • Entity existence check: Verify that the destination view handles invalid or deleted IDs (e.g. /invoices/invalid-999) by rendering an inline "Entity Not Found" state rather than an unhandled client-side crash.
  • Breadcrumb resolution: Ensure dynamic routes resolve parent crumbs correctly (Home > Invoices > #INV-2024-001).

4. Design the branded 404 & escape route

When a user encounters a nonexistent route:

  • Never display a default browser or framework 404: Render a custom view aligned with the design system.
  • Provide clear escape paths:
    1. Primary CTA: "Return to Dashboard" (/dashboard)
    2. Search input / Command Palette shortcut (⌘K)
    3. Quick links to recent or popular modules

5. Sync with Module Registry & Growth Review

When module-registry-sync registers a new module, scan pending intents. Auto-connect matching routes and trigger growth-impact-review to confirm breadcrumb and sitemap coherence.

Completion Criteria

  • All static navigation links and CTAs resolve to live routes (zero href="#")
  • Parameterized dynamic routes handle missing or malformed ID parameters
  • Custom branded 404 page designed with search and return CTAs
  • .agents/route-intents.json schema validated and updated
  • Zero orphaned pages exist outside the IA sitemap

Output Format

An updated .agents/route-intents.json registry file and a route_integrity_report.md artifact detailing connected routes, pending intents, and verified 404 escape behaviors.

Anti-patterns

  • Leaving href="#" or onClick={() => {}} placeholders on buttons shipped to production.
  • Throwing unhandled exceptions on dynamic routes when an ID does not exist in the database.
  • Generic 404 pages that trap users without search or navigation escape routes.
  • Connecting routes by filename without verifying the view renders without runtime crashes.

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.