Agent skill · pedronauck
ratatui-tui
Build terminal UIs with ratatui following 2026 Rust best practices. Use when: (1) Creating new TUI apps, (2) Adding widgets/layouts, (3) Keyboard navigation/state management, (4) Image integration via ratatui-image, (5) Async event handling, (6) Release optimization. Covers v0.30.0+ API, Elm Architecture, StatefulWidget, color-eyre.
What it needs
About 4k tokens when loaded.
What this skill does
Ratatui TUI Development Quick Start 1. Copy template to project: 2. Run: Template Selection Complexity Template Use Case ---------- --------------- --------------------------- Minimal hello-world Learning, quick demos Simple simple-app Single-screen apps, tools Async async-app Background tasks, network Full component-app Multi-view, config, logging Decision tree: Need async/network? → async-app Multiple screens/components? → component-app Just a simple tool? → simple-app Learning ratatui? → hello-world Project Setup Minimal Cargo.toml Full Dependencies (component-app) Release Profile Core Loop: TEA (The Elm Architecture) Styling Rules Use Stylize trait helpers: Color palette: Primary: .cyan(), .green() Error: .red() Warning: .yellow() (sparingly) Muted: .dim(), .darkgray() Accent: .magenta() Text wrapping: See: references/style-guide.md Widget Patterns StatefulWidget Layout Built-in State Types ListState - for List widget TableState - for Table widget ScrollbarState - for Scrollbar See: references/architecture-patterns.md Async Event Handling See: references/async-patterns.md Image Integration Key points: Use chafa-static feature for portable binaries Query protocol once, not per-frame Offload resize/encode to background thread Use StatefulImage to avoid re-encoding on redraws See: references/image-integration.md Error Handling Error propagation: Release Build Binary at target/release/<name>. Size optimization: Templates Overview hello-world (~25 lines) Minimal ratatui demo using ratatui::run(). simple-app (~80 lines) Synchronous event loop, App struct, basic render. async-app (~120 lines) Tokio runtime, EventStream, select! pattern. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills pedronauck/ratatui-tui--695ecb