tui-good-practices

Review and refactor interactive terminal user interfaces for predictable focus behavior and state transitions.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/davzucky/lazygitlab --skill tui-good-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tui-good-practices
Source: https://github.com/davzucky/lazygitlab/tree/main/.opencode/skills/tui-good-practices
Command: npx skills add https://github.com/davzucky/lazygitlab --skill tui-good-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to building robust, user-friendly, and maintainable interactive terminal interfaces (TUIs), ensuring predictable behavior and a positive user experience.

Core Features & Use Cases

  • Interaction Design: Establishes clear contracts for keyboard navigation, focus management, and state transitions.
  • Layout Stability: Offers principles for responsive and non-drifting terminal layouts.
  • State Management: Guides on separating UI state from data fetching and handling asynchronous operations gracefully.
  • Error Handling: Details strategies for in-line error display and recovery.
  • Validation: Includes a checklist for verifying TUI quality and common pitfalls to avoid.

Quick Start

Review the TUI good practices to ensure predictable keyboard paths and loading states.

Frequently Asked Questions about tui-good-practices

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

FAQPage Schema
What are the best practices for terminal UI state management and keyboard navigation?

Terminal UI state management best practices involve separating UI state from data fetching, establishing clear contracts for predictable keyboard navigation paths, and handling asynchronous operations gracefully to prevent layout drift.

How do I design predictable focus behavior and state transitions in a TUI?

Design predictable focus behavior in a TUI by defining strict interaction contracts for state transitions, ensuring keyboard navigation paths remain logical, and validating layouts against a quality checklist to avoid common pitfalls.

Why does my terminal UI layout drift during loading or error states?

Terminal UI layout drift occurs when loading and error states are not handled gracefully, which can be resolved by applying layout stability principles and establishing clear state data flow for asynchronous operations.

How to handle errors and recovery in interactive terminal interfaces?

Handle errors in interactive terminal interfaces by implementing strategies for in-line error display and recovery, ensuring that state transitions remain predictable and users can easily navigate back from failure states.

Do I need a specific framework to apply these TUI design principles?

No framework is required, as these TUI design principles provide framework-agnostic guidelines for reviewing and refactoring keyboard-driven workflows, focusing on interaction contracts and layout rendering rather than specific dependencies.