.claude/skills/rezi-create-screen/SKILL.md
Create a new screen/page for a Rezi TUI application. Use when adding views, pages, or screens to an app.
npx skillsauth add rtlzeromemory/rezi rezi-create-screenInstall 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/widgets/ui.ts — all ui.* factory functionspackages/core/src/widgets/composition.ts — defineWidget() and animation hookspackages/core/src/router/ — router and route definitionspackages/core/src/keybindings/ — keybinding systempackages/create-rezi/templates/animation-lab/ — canonical animation screen patterndocs/guide/widget-authoring.md — design system integration patternsCreate screen file at src/screens/{screen-name}.ts:
import { ui } from "@rezi-ui/core";
import type { AppState } from "../state.js";
export function MyScreen(state: AppState) {
return ui.column({ gap: 1 }, [
ui.text("Screen Title", { style: { bold: true } }),
// screen content
]);
}
Prefer intent-based button styling (intent: "primary", "secondary", "danger", "success", "warning", "link"):
ui.button({
id: "action",
label: "Go",
intent: "primary",
onPress: handleAction,
})
Use ui.column() or ui.row() as the root container
If the screen needs motion, prefer declarative hooks inside defineWidget:
import { defineWidget, ui, useAnimatedValue, useTransition } from "@rezi-ui/core";
const AnimatedScreen = defineWidget<{ target: number }>((props, ctx) => {
const drift = useTransition(ctx, props.target, {
duration: 180,
easing: "easeOutCubic",
});
const energy = useAnimatedValue(ctx, props.target, {
mode: "spring",
spring: {
stiffness: 190,
damping: 22,
},
});
return ui.box(
{
width: Math.round(20 + drift),
opacity: Math.max(0.35, Math.min(1, energy.value / 100)),
transition: { duration: 180, easing: "easeInOutCubic", properties: ["size", "opacity"] },
exitTransition: { duration: 200, easing: "easeInCubic", properties: ["opacity"] },
},
[ui.text("Animated screen")],
);
});
If using router, add a route definition (see rezi-routing skill)
Add keybindings for screen-specific actions in the app's key handler
Wire into main via router or view switch:
view: (state) => {
if (state.screen === "my-screen") return MyScreen(state);
return HomeScreen(state);
}
testing
Write tests for Rezi widgets, screens, or app logic using createTestRenderer and node:test.
development
Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
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.