textual-tui
Build, refactor, debug, test, and package Python terminal user interfaces with Textual. Use when the user wants a TUI, terminal dashboard, admin console, multi-screen workflow, keyboard-first tool, data explorer, file browser, markdown or log viewer, editor, command palette, browser-served console app, or a migration from curses/Rich-only UI to Textual—even if they never say “Textual”. Covers TCSS and themes, built-in widgets, screens and modes, reactive state, workers, browser delivery APIs, and pytest Pilot or snapshot testing.
What this skill does
Use this skill when the task is fundamentally about **building or changing a Textual app**, not merely printing Rich output or writing a non-interactive CLI. ## Start by classifying the app Pick the closest shape before writing code: 1. **Single-screen shell** One main view with panels, tables, forms, or logs. Prefer containers plus built-in widgets. 2. **Multi-screen workflow** Large context changes, separate flows, or drill-down views. Prefer `Screen` / `ModalScreen`. 3. **Multi-mode admin app** Persistent top-level areas such as “dashboard / jobs / settings / logs”. Prefer named `MODES`, screen stacks, and command palette support. 4. **Data explorer** Records plus details, filters, or side panes. Prefer `DataTable`, details panel, responsive breakpoints, and keyboard navigation. 5. **Document or filesystem tool** Prefer `DirectoryTree`, `MarkdownViewer`, `TextArea`, `Tree`, and delivery APIs for export/download. 6. **Chat / streaming / long-running task UI** Prefer a scrollable transcript or log plus `@work` / workers for background operations. If the user has not chosen an architecture, choose one and proceed. ## Default engineering stance - Prefer **built-in widgets first**. Only hand-roll behaviour when a built-in widget clearly does not fit. - Keep the **`App` thin**. Move screen-specific logic into `Screen` classes and reusable composite widgets. - Prefer **`.tcss` files** over inline `CSS` once styling grows beyond a toy example. - Use **IDs and semantic classes** deliberately so styling and Pilot tests stay stable. - Design for **narrow terminals first**, then add split panes and breakpoint-driven layouts. - Leave behind **tests** whenever behaviour changes. ## Choose the right Textual primitive - Use **`Screen`** when navigation changes the user’s working context. - Use **`ModalScreen`** for short interruptions: confirmations, pickers, destructive actions. - Use **`ContentSwitcher`** for wizard steps or one-screen subflows. - Use **named `MODES`** when the app has durable top-level areas with separate navigation stacks. - Use **command palette providers** when there are many actions, bindings, or discoverability matters. - Use **workers** for network, subprocess, parsing, search, sleeps, or anything that may block input. See: - [Architecture decision tree](references/architecture-decision-tree.md) - [Screens, modes, and command palette](references/screens-modes-command-palette.md) ## Widget-first selection rules Before inventing custom widgets, check [the widget atlas](references/widget-selection-atlas.md). Common defaults: - `DataTable` for record-heavy views - `DirectoryTree` for filesystem navigation - `MarkdownViewer` for rich document views - `TextArea` for editing - `TabbedContent` for grouped settings or alternate panes - `Log` / `RichLog` for live output - `SelectionList`, `OptionList`, `ListView`, `Tree`, `Select`, `Switch`, `Input`, `Button` for most interaction needs ## Reactivity and workers Use the playbook in [reactivity and workers](references/reactivity-and-workers.md). Core rules: - Put fast derived state in `compute_*`, but keep it cheap and side-effect free. - Use `watch_*` for UI reactions, not blocking work. - Use `var` when you want state without automatic refresh machinery. - Use `set_reactive` before mount when initial state changes should not trip watchers early. - Move blocking work into `@work` or `run_worker(...)`. - Use `exclusive=True` for stale-search cancellation and similar “latest request wins” flows. - For thread workers, update the UI via messages or `call_from_thread`. ## Browser, dev loop, and delivery Textual may run in a terminal or be served to a browser. Build with both in mind when relevant. - Use `textual run --dev` while iterating. - Use `textual console` and devtools when behaviour is unclear. - Use `textual serve` when browser parity matters. - Prefer `deliver_text`, `deliver_binary`, or `deliver_screenshot` for browser-friendly exports and downloads. - Use `open_url` when handing off to the user’s browser is appropriate. See: - [Browser and delivery guide](references/browser-and-delivery.md) - [Packaging and CI](references/packaging-and-ci.md) ## Testing is part of the feature Default output after any non-trivial change: 1. one smoke test with `run_test()` 2. one behaviour test for the changed flow 3. one narrow-terminal or alternate-size test when layout matters 4. one snapshot test when the view structure matters visually See [testing matrix](references/testing-matrix.md). ## When working on an existing project Start with the scripts, then refine by hand: 1. `python scripts/inspect_textual_project.py <project>` 2. `python scripts/audit_textual_project.py <project>` 3. Generate scaffolds or tests only after you understand the existing structure. Use the audit to catch: - oversized `App` classes - blocking handlers - missing breakpoints - missed built-in widget opportunities - missing command palette or delivery APIs - missing Pilot tests ## Bundled scripts - `scripts/scaffold_textual_app.py` Generate starter apps, TCSS, tests, optional `pyproject.toml`, and CI workflow. - `scripts/inspect_textual_project.py` Inventory app classes, screens, widgets, bindings, IDs, workers, and styling. - `scripts/audit_textual_project.py` Heuristic architecture/performance/test audit for an existing Textual project. - `scripts/generate_pilot_tests.py` Emit starter smoke and behaviour tests for an existing app. - `scripts/dump_dom_and_bindings.py` If Textual is installed, launch an app under `run_test()` and dump DOM and active bindings. - `scripts/emit_textual_pyproject.py` Generate a packageable Hatch-based `pyproject.toml`. - `scripts/emit_github_actions_ci.py` Generate a GitHub Actions workflow for Textual tests. - `scripts/build_upstream_pattern_atlas.py` Summarise a local Textual repo snapshot into `references/repo-map.md` and `references/upstream-pattern-atlas.md`. - `scripts/self_check.py` Compile scripts and scaffold all bundled templates as a package validation step. ## Bundled starter templates Available scaffolds: - `dashboard` - `form` - `chat` - `data-explorer` - `file-browser` - `settings` - `wizard` - `log-monitor` - `editor` - `admin-modes` - `download-demo` List them with: ```bash python scripts/scaffold_textual_app.py --list-templates ``` Generate one with: ```bash python scripts/scaffold_textual_app.py \ --template data-explorer \ --module my_app \ --class-name MyApp \ --app-title "My App" \ --output-dir . ``` ## Output checklist Before you finish, aim to leave behind: - a clear app structure - stable IDs/classes for styling and tests - TCSS separated from Python unless the app is tiny - background work off the main event path - keyboard-discoverable actions - responsive layout decisions - at least a smoke test and one behaviour test - notes on how to run the app in dev mode ## Read next as needed - [Architecture decision tree](references/architecture-decision-tree.md) - [Widget selection atlas](references/widget-selection-atlas.md) - [Reactivity and workers](references/reactivity-and-workers.md) - [Screens, modes, and command palette](references/screens-modes-command-palette.md) - [Browser and delivery](references/browser-and-delivery.md) - [Testing matrix](references/testing-matrix.md) - [Anti-patterns](references/anti-patterns.md) - [Packaging and CI](references/packaging-and-ci.md) - [Repository map](references/repo-map.md) - [Upstream pattern atlas](references/upstream-pattern-atlas.md)
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.