界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

textual-tui-skill

textual-tui-skill

【开发与工程】Deep-dive Textual (Python) TUI skill — 40+ widgets, layout systems, TCSS styling, reactive programming, background workers, multi-screen navigation, modal dialogs, and testing via Pilot API. Covers 10 common pitfalls and thread-safety rules for async/worker patterns. v1.0.0.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: textual-tui-skill description: | Deep-dive Textual (Python) TUI skill — 40+ widgets, layout systems, TCSS styling, reactive programming, background workers, multi-screen navigation, modal dialogs, and testing via Pilot API. Covers 10 common pitfalls and thread-safety rules for async/worker patterns. v1.0.0. triggers:


textual-tui-skill

Catalogue stub — full skill: aperepel/textual-tui-skill

Install the full skill

# Clone and run quickstart
git clone https://github.com/aperepel/textual-tui-skill
cd textual-tui-skill
bash quickstart.sh

Or install the pre-compiled skill file directly into your agent's skills directory:

# Global
curl -o ~/.agents/skills/textual-tui-skill/SKILL.md \
  https://raw.githubusercontent.com/aperepel/textual-tui-skill/main/skill/SKILL.md

# Project
curl -o .agents/skills/textual-tui-skill/SKILL.md \
  https://raw.githubusercontent.com/aperepel/textual-tui-skill/main/skill/SKILL.md

What it does

Comprehensive Textual framework reference for building professional Python TUIs:

AreaCoverage
Widgets40+ built-in: Input, Button, Select, Checkbox, DataTable, Tree, Log, RichLog, Tabs, TabbedContent
LayoutsVertical, Horizontal, Grid; fixed/fractional sizing; responsive patterns
StylingTCSS syntax, semantic color system, external stylesheets, borders, padding
ReactivityReactive attributes, watchers, computed properties, DOM-like widget tree
AsyncWorkers for long-running tasks, call_from_thread() for thread-safe UI updates, cancellation
NavigationMulti-screen apps, modal screens, screen stack management
EventsMount, Click, Key; keyboard bindings; action methods; message propagation
TestingPilot API, async test patterns with pytest, UI interaction simulation
Pitfalls10 common mistakes documented: blocking event loop, thread safety, worker selection

4 complete working example apps (~1,100 lines): todo app, system dashboard, data viewer, worker demo.

When NOT to use

  • Multi-framework TUI overview (Go/Rust/Python/TS) — use tui-design-skill
  • Bubble Tea (Go) — use tui-design-skill
  • Ratatui (Rust) — use tui-design-skill
  • Ink (TypeScript/React) — use tui-design-skill
我的收藏