tui-standards

Enforces shared component standards for building terminal UI screens in Python.

4|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/yeaboi-ai/yeaboi.ai --skill tui-standards-yeaboi-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tui-standards
Source: https://github.com/yeaboi-ai/yeaboi.ai/tree/main/.claude/skills/tui-standards
Command: npx skills add https://github.com/yeaboi-ai/yeaboi.ai --skill tui-standards-yeaboi-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Terminal UI codebases tend to accumulate duplicated rendering logic, hardcoded colors, and inconsistent page layouts across screens. This Skill defines the mandatory shared component system and page structure so every TUI screen in the yeaboi codebase is built the same way. ## Core Features & Use Cases - Shared Primitives: Mandates use of shared functions in ui/shared/_components.py for themes, page panels, buttons, scrollbars, progress dots, viewport math, titles, popups, and badges. - Page Structure Contract: Defines the exact layout every build*_screen function must follow, from title through viewport to button rows. - Enforced Rules: Covers DRY rendering, theme-based colors, page backgrounds, saved-session hubs, beta badges, and per-frame logging restrictions, with tests that fail the build on violations. - Use Case: When adding a new mode screen to the yeaboi TUI, follow this Skill to create the theme constant, title function, mode card entry, feature tip, and saved-sessions hub correctly the first time. ## Quick Start Ask the AI to create a new TUI screen for a mode following the tui-standards shared component rules.

Frequently Asked Questions about tui-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new TUI screen with shared components?

Build the screen with build_page_panel using the mode's Theme constant, then compose title, subtitle, viewport content, and button rows from build_action_buttons. Never return a raw full-screen Panel or inline rendering logic.

What is the required page structure for a Rich terminal UI?

Every page follows the same order: blank line, ASCII art title, subtitle or progress dots, scrollable viewport with optional scrollbar, then button rows. All of it is wrapped in build_page_panel which applies the theme background.

Can I hardcode RGB color values in TUI code?

No. Colors must come from the appropriate Theme constant such as theme.accent or theme.muted. Hardcoded values like rgb(100,180,100) are prohibited so every page stays consistent with its mode palette.

How do I add a scrollbar to overflowing terminal content?

Call build_scrollbar with the viewport height, total content length, current offset, and max scroll value. Use always_show=True on pages where the track should remain visible even when content fits.

Why does the build fail when I add a new mode screen?

Tests like TestTips, TestSavedSessions, and test_screen_backgrounds enforce the standards. A new mode needs a Theme constant, title function, COLOR_RGB entry, mode card, FeatureTip, and a saved-sessions hub if it records runs.

When should logging be avoided in TUI rendering code?

Never log inside _build_*_screen builders or render paths because they run every frame at roughly 60 fps. Logging belongs in key-handling branches of runner loops and one-shot functions only.