Skip to content
Back to skills

Tui App

ASecurity

Build a terminal UI app with a render loop, input handling, and clean teardown using ratatui, ink, or textual

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 3, 2026
ai-agentspythonrustgoshellreactnodeaws

Works with

  • terminal

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill tui-app --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tui App?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tui App
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-tui-app/badge)](https://www.skillsdirectory.com/skills/black141312-tui-app)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tui-app
description: Build a terminal UI app with a render loop, input handling, and clean teardown using ratatui, ink, or textual
category: shell
---

# TUI App

Reach for this when building an interactive full-screen terminal application — dashboards, pickers, file browsers — with keyboard navigation and live updates.

1. Pick a framework: Rust → `ratatui` + `crossterm`, Node → `ink` (React-style), Python → `textual` or `urwid`.
2. Model state explicitly (a single app struct/store) and render the whole UI as a pure function of that state each frame — never mutate widgets imperatively from scattered handlers.
3. Run an event loop that blocks on input/timer events, updates state, then redraws; keep heavy or blocking work (I/O, network) off the UI thread via async tasks or a worker channel.
4. On startup enter raw mode and the alternate screen; on exit — including panics and Ctrl-C — restore the terminal so the user's shell isn't left corrupted.
5. Handle resize events and recompute layout; never hardcode width/height, and degrade gracefully on tiny terminals.
6. Provide clear key hints and a quit binding (`q`/Ctrl-C), and test the render-from-state logic without a real TTY.

## Rules
- Always restore the terminal on exit: wrap teardown in a guard/`defer`/panic hook so a crash mid-frame doesn't leave a broken shell.
- Keep the event loop non-blocking; spawn long tasks elsewhere and feed results back as events, or the UI freezes.
- Throttle redraws (only on state change or a frame tick) instead of busy-looping the CPU at full speed.
- Don't print to stdout/stderr while in alternate-screen mode — it scrambles the display; route logs to a file.
- Make every action keyboard-reachable and show the active keymap; assume no mouse.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…