agentleFS
fusebase-devfusebase-dev/fusebase-flow/.agents/skills/app-routing/SKILL.md

app-routing

Skill9 starsChanged 27 days agoMITView on GitHub

Guide for implementing client-side routing in Fusebase Apps apps. Use when: 1. Adding routing (React Router) to an app, 2. Fixing broken routes or 404s after deployment, 3. Configuring the router.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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. Very specific:

    Read FUSEBASE_APP_HOST from the project .env when constructing app URLs.

    line 14

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

App Routing

Fusebase Apps apps are each served from their own subdomain root:

https://{app-subdomain}.{FUSEBASE_APP_HOST}/

Read FUSEBASE_APP_HOST from the project .env when constructing app URLs. The app always owns the full path space from /.

IMPORTANT: Always use path-based routing (BrowserRouter). Hash-based routing (HashRouter) is forbidden — hash fragments are stripped during redirects (e.g. OAuth, SSO), causing users to lose their navigation state.

Path-Based Routing

Routes work as normal from root:

https://my-app.{FUSEBASE_APP_HOST}/settings
https://my-app.{FUSEBASE_APP_HOST}/users/42

Configure the router

import { BrowserRouter, Routes, Route } from 'react-router-dom'

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/settings" element={<Settings />} />
      </Routes>
    </BrowserRouter>
  )
}

Common Pitfalls

  1. Using HashRouter — Forbidden. Hash fragments are dropped on redirects, breaking navigation after OAuth or SSO flows.
  2. Hardcoded absolute paths — Use React Router's <Link> component, not raw <a href="/settings">.
  3. Defining routes under /api — The /api prefix is reserved for the backend when an app has one. Never create SPA routes under /api/*. See skill app-backend.

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.