.codex/skills/rezi-routing/SKILL.md
Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
npx skillsauth add rtlzeromemory/rezi rezi-routingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when:
packages/core/src/router/ — router implementation, guards, outletspackages/core/src/widgets/ui.ts — ui.routerBreadcrumb(), ui.routerTabs()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: "dashboard",
screen: (_params, context) => ui.column([
Header(context.state),
context.outlet,
]),
children: [
{ id: "dashboard.overview", screen: (_params, context) => OverviewPanel(context.state) },
{ id: "dashboard.stats", screen: (_params, context) => StatsPanel(context.state) },
],
},
] as const;
Pass to app:
const app = createApp({ routes, initialRoute: "home" });
Navigate programmatically:
app.router.navigate("settings");
app.router.navigate("dashboard.overview");
Nested routes render via context.outlet in the parent view
Add navigation widgets (optional):
if (app.router) {
ui.routerBreadcrumb(app.router, routes)
ui.routerTabs(app.router, routes)
}
testing
Write tests for Rezi widgets, screens, or app logic using createTestRenderer and node:test.
tools
Profile and optimize Rezi app performance. Use when app feels slow, frames drop, or render phases take too long.
tools
Add modal dialogs and overlay UI with focus trapping. Use when implementing confirmations, alerts, or layered interfaces.
tools
Set up keyboard shortcuts and chord bindings for a Rezi app. Use when adding hotkeys, key combos, or modal input modes.