Rezi Routing
Developmentrezi-routingRezi Routing is an Agent Skill for development published in the RtlZeroMemory/Rezi repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/RtlZeroMemory/Rezi/blob/HEAD/.claude/skills/rezi-routing/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rezi-routing, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
When to use
Use this skill when:
- App needs multiple pages or screens
- Need route guards (auth, permissions)
- Need nested routes with outlets
Source of truth
packages/core/src/router/— router implementation, guards, outletspackages/core/src/widgets/ui.ts—ui.routerBreadcrumb(),ui.routerTabs()
Steps
-
Define routes with optional guards and nested children:
const routes = [ { id: "home", screen: (_params, context) => HomeScreen(context.state), }, { id: "settings", screen: (_params, context) => SettingsScreen(context.state), guard: (_params, state) => { if (!state.meta.isAuthenticated) return { redirect: "home" }; return true; }, }, { id: "operations", screen: (_params, context) => ui.column([ Header(context.state), context.outlet, ]), children: [ { id: "operations.overview", screen: (_params, context) => OverviewPanel(context.state) }, { id: "operations.logs", screen: (_params, context) => LogsPanel(context.state) }, ], }, ] as const; -
Pass to app:
const app = createApp({ routes, initialRoute: "home" }); -
Navigate programmatically:
app.router.navigate("settings"); app.router.navigate("operations.overview"); -
Nested routes render via
context.outletin the parent view -
Add navigation widgets (optional):
if (app.router) { ui.routerBreadcrumb(app.router, routes) ui.routerTabs(app.router, routes) }
Verification
- Correct screens render for each route
- Guards block unauthorized access and redirect
- Nested outlet renders child routes
- Back navigation works