mit einem Klick
rezi-routing
// Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
// Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
Create a new screen/page for a Rezi TUI application. Use when adding views, pages, or screens to an app.
Profile and optimize Rezi app performance. Use when app feels slow, frames drop, or render phases take too long.
Set up form input handling with validation and submission. Use when building forms with inputs, selects, checkboxes, etc.
Add modal dialogs and overlay UI with focus trapping. Use when implementing confirmations, alerts, or layered interfaces.
Debug rendering and layout issues in Rezi apps. Use when UI looks wrong, has layout problems, or renders unexpectedly.
Add a new widget type to the Rezi framework. Use when creating new ui.* factory functions with layout, rendering, and tests.
| name | rezi-routing |
| description | Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications. |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Edit, Write |
| argument-hint | [route-name] |
| metadata | {"short-description":"Add routing"} |
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: "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.outlet in the parent view
Add navigation widgets (optional):
if (app.router) {
ui.routerBreadcrumb(app.router, routes)
ui.routerTabs(app.router, routes)
}