بنقرة واحدة
rezi-add-widget
// Add a new widget type to the Rezi framework. Use when creating new ui.* factory functions with layout, rendering, and tests.
// Add a new widget type to the Rezi framework. Use when creating new ui.* factory functions with layout, rendering, and tests.
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.
Add routing with guards and nested outlets to a Rezi app. Use when building multi-page/screen TUI applications.
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.
| name | rezi-add-widget |
| description | Add a new widget type to the Rezi framework. Use when creating new ui.* factory functions with layout, rendering, and tests. |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Edit, Write, Bash(node scripts/run-tests.mjs*) |
| argument-hint | [widget-name] |
| metadata | {"short-description":"Add new widget"} |
Use this skill when:
@rezi-ui/coreui.* factory functionpackages/core/src/widgets/types.ts — all widget prop types and VNode unionpackages/core/src/widgets/ui.ts — all ui.* factory functionspackages/core/src/layout/kinds/ — layout handlers by categorypackages/core/src/renderer/renderToDrawlist/widgets/ — render handlers by categorypackages/core/src/index.ts — public exportspackages/core/src/ui/ — design tokens, recipes, and capabilitiesdocs/guide/widget-authoring.md — widget authoring guide with design system integrationAdd props type to packages/core/src/widgets/types.ts:
Readonly<{...}> patternkey?: string if the widget can appear in listsAdd VNode kind to the VNode discriminated union in types.ts
Add factory function to packages/core/src/widgets/ui.ts:
@example tagAdd layout handler in packages/core/src/layout/kinds/:
leaf.ts for non-container widgetsbox.ts / stack.ts for containerscollections.ts for data widgetsoverlays.ts for layered widgetsAdd render handler in packages/core/src/renderer/renderToDrawlist/widgets/:
basic.ts, containers.ts, collections.ts, editors.ts, overlays.ts, navigation.ts, or files.tsAdd design system support (if the widget is interactive):
packages/core/src/widgets/protocol.tsdsVariant?, dsTone?, dsSize?) for advanced customizationThemeDefinition semantic tokens are available; DS props override defaults when specifieddocs/guide/widget-authoring.md for the full patternExport both props type and factory from packages/core/src/index.ts
Add JSX wrapper (if needed) in packages/jsx/src/components.ts
Write tests in packages/core/src/widgets/__tests__/
Add docs in docs/widgets/{widget-name}.md
node scripts/run-tests.mjs
packages/core/src/index.tscreateTestRendererds* props for design-system-based styling (if interactive)