textual

Build and test Python Textual TUIs with stable selectors and headless run_test() validation.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/oornnery/skills --skill textual-oornnery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: textual
Source: https://github.com/oornnery/skills/tree/main/skills/textual
Command: npx skills add https://github.com/oornnery/skills --skill textual-oornnery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Developing and testing Python Textual TUIs often requires boilerplate, consistent structure, and reliable UI testing harnesses. This Skill consolidates recommended patterns for building modular Textual apps, composing widgets with stable selectors, and validating behavior with headless tests using the Pilot API.

Core Features & Use Cases

  • App structure and widget composition with predictable layout and stable IDs
  • Styling with .tcss and semantic selectors to enable testable visuals
  • Bindings, focus control, and screen/dialog patterns for complex flows
  • Headless testing with run_test() and Pilot API to verify interactions deterministically

Quick Start

Create a minimal Textual app and verify its UI with headless tests using run_test().

Frequently Asked Questions about textual

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

FAQPage Schema
How do I write headless tests for a Python Textual TUI?

Headless testing for a Python Textual TUI uses the Pilot API and run_test() to deterministically verify widget interactions and UI behavior without rendering to a terminal.

What is the best way to structure a Textual app for testable widget composition?

Structuring a Textual app for testing involves composing widgets with stable selectors and predictable layouts, using .tcss for styling to enable deterministic UI validation.

Can I test Textual UI interactions across different terminal sizes?

Yes, you can validate Textual UI interactions across sizes by running headless tests with the Pilot API to ensure responsive behavior deterministically.

Does Textual support styling with semantic selectors for testable visuals?

Textual supports styling via .tcss files and semantic selectors, allowing you to define testable visuals and stable IDs for modular app components.

How do I handle reactive state and focus control when building Textual apps?

Building Textual apps with reactive state and focus control requires using bindings and screen or dialog patterns to manage complex UI flows and stable app structure.