Framework Ecosystem Recipes
Use this skill when the user names a specific terminal UI framework or needs practical ecosystem guidance. Fetch current official docs when exact API syntax or version-specific behavior matters.
Rust recipes
Ratatui + Crossterm is the modern default for Rust full-screen TUIs. Structure apps around explicit state, event handling, and rendering functions. Use Crossterm for cross-platform terminal setup and events. Snapshot widgets at fixed sizes and integration-test the event loop through a PTY.
Guidelines:
- Keep terminal setup/cleanup in one guard.
- Render from immutable state where possible.
- Use constraints and layout primitives instead of absolute coordinates.
- Treat panics as terminal-cleanup events.
Python recipes
Textual fits substantial apps with widgets, CSS-like styling, workers, and test automation. Rich fits rich output, progress, markdown, tables, panels, and logging. prompt_toolkit fits shells, REPLs, completions, multiline editing, and custom key bindings. curses/ncurses fits classic dependency-light TUIs with careful cleanup.
Guidelines:
- For curses, use wrapper/finally cleanup and remember coordinates are y,x.
- For Textual, separate app state from workers and test with framework-supported pilots.
- For Rich, avoid full-screen complexity when rich scrollback output solves the problem.
Go recipes
Bubble Tea uses Elm-style Model, Update, and View. Pair with Bubbles for common controls and Lip Gloss for styles/layout. tview gives widget-rich apps over tcell. Use tcell directly for lower-level cell control.
Guidelines:
- Keep update logic pure where possible.
- Send long work through commands/goroutines that return messages.
- Test
Update and View separately before PTY tests.
Node and TypeScript recipes
Ink is best for React-style terminal components, hooks, and component testing. Blessed fits DOM-like widget trees and manual screen lifecycle. Prompt libraries are often better than full-screen apps for short questionnaires.
Guidelines:
- Verify resize, mouse, and Windows behavior for the exact library version.
- Keep side effects out of render functions.
- Use PTY integration tests for flows that depend on terminal behavior.
.NET recipes
Terminal.Gui fits full-screen applications with views, keyboard navigation, mouse, themes, and layout. Spectre.Console fits rich CLI output, prompts, progress, status, trees, tables, and command app composition.
Guidelines:
- Choose Spectre.Console before Terminal.Gui when the UI can remain line-oriented.
- Abstract console I/O for tests.
- Provide non-interactive command equivalents for automation.
C/C++, Zig, and Swift recipes
ncurses remains the classic portable C TUI layer. notcurses is useful for modern visuals, rich cells, images where supported, and high-performance terminal graphics with fallbacks. FTXUI offers composable C++ components and layout. zig-vaxis is a modern Zig TUI toolkit with Unicode-aware terminal handling. SwiftTUI and related Swift terminal libraries fit Swift-native CLIs, but verify platform and terminal coverage carefully.
Guidelines:
- Low-level frameworks demand explicit cleanup, Unicode measurement, and capability fallback tests.
- Prefer maintained libraries with documented Windows, tmux, and Unicode behavior.
- Avoid image/graphics features as hard requirements unless the deployment terminal is controlled.
Reference files
references/rust-python-go.md - Practical patterns for Ratatui, Textual/Rich/prompt_toolkit/curses, Bubble Tea/tview/tcell.
references/node-dotnet-and-selection.md - Ink, Blessed, Terminal.Gui, Spectre.Console, migration, and selection gotchas.
references/low-level-and-emerging.md - C/C++ ncurses/notcurses/FTXUI, Zig vaxis, SwiftTUI, and emerging toolkit cautions.
1---
2name: framework-recipes
3description: |
4 This skill should be used when the user asks for implementation recipes, examples, migration guidance, troubleshooting, or best practices for specific TUI frameworks and libraries: Rust Ratatui/Crossterm/Termion/Cursive, Python Textual/Rich/prompt_toolkit/curses/Urwid/asciimatics, Go Bubble Tea/Lip Gloss/Bubbles/tview/tcell/termui/gocui, Node Ink/Blessed/Inquirer/Prompts, .NET Terminal.Gui/Spectre.Console, C/C++ ncurses/notcurses/FTXUI, Zig vaxis, and SwiftTUI. PROACTIVELY activate for: framework-specific app structure, cleanup, testing, widgets, migration, library comparison, framework troubleshooting, API gotchas, and porting between TUI frameworks. Provides: framework defaults, gotchas, testing hooks, and selection recipes.
5metadata:
6 source: https://skillmd.com/skills/josiahsiegel/framework-recipes
7---
8
9# Framework Ecosystem Recipes
10
11Use this skill when the user names a specific terminal UI framework or needs practical ecosystem guidance. Fetch current official docs when exact API syntax or version-specific behavior matters.
12
13## Rust recipes
14
15**Ratatui + Crossterm** is the modern default for Rust full-screen TUIs. Structure apps around explicit state, event handling, and rendering functions. Use Crossterm for cross-platform terminal setup and events. Snapshot widgets at fixed sizes and integration-test the event loop through a PTY.
16
17Guidelines:
18
19- Keep terminal setup/cleanup in one guard.
20- Render from immutable state where possible.
21- Use constraints and layout primitives instead of absolute coordinates.
22- Treat panics as terminal-cleanup events.
23
24## Python recipes
25
26**Textual** fits substantial apps with widgets, CSS-like styling, workers, and test automation. **Rich** fits rich output, progress, markdown, tables, panels, and logging. **prompt_toolkit** fits shells, REPLs, completions, multiline editing, and custom key bindings. **curses/ncurses** fits classic dependency-light TUIs with careful cleanup.
27
28Guidelines:
29
30- For curses, use wrapper/finally cleanup and remember coordinates are y,x.
31- For Textual, separate app state from workers and test with framework-supported pilots.
32- For Rich, avoid full-screen complexity when rich scrollback output solves the problem.
33
34## Go recipes
35
36**Bubble Tea** uses Elm-style `Model`, `Update`, and `View`. Pair with Bubbles for common controls and Lip Gloss for styles/layout. **tview** gives widget-rich apps over **tcell**. Use **tcell** directly for lower-level cell control.
37
38Guidelines:
39
40- Keep update logic pure where possible.
41- Send long work through commands/goroutines that return messages.
42- Test `Update` and `View` separately before PTY tests.
43
44## Node and TypeScript recipes
45
46**Ink** is best for React-style terminal components, hooks, and component testing. **Blessed** fits DOM-like widget trees and manual screen lifecycle. Prompt libraries are often better than full-screen apps for short questionnaires.
47
48Guidelines:
49
50- Verify resize, mouse, and Windows behavior for the exact library version.
51- Keep side effects out of render functions.
52- Use PTY integration tests for flows that depend on terminal behavior.
53
54## .NET recipes
55
56**Terminal.Gui** fits full-screen applications with views, keyboard navigation, mouse, themes, and layout. **Spectre.Console** fits rich CLI output, prompts, progress, status, trees, tables, and command app composition.
57
58Guidelines:
59
60- Choose Spectre.Console before Terminal.Gui when the UI can remain line-oriented.
61- Abstract console I/O for tests.
62- Provide non-interactive command equivalents for automation.
63
64## C/C++, Zig, and Swift recipes
65
66**ncurses** remains the classic portable C TUI layer. **notcurses** is useful for modern visuals, rich cells, images where supported, and high-performance terminal graphics with fallbacks. **FTXUI** offers composable C++ components and layout. **zig-vaxis** is a modern Zig TUI toolkit with Unicode-aware terminal handling. **SwiftTUI** and related Swift terminal libraries fit Swift-native CLIs, but verify platform and terminal coverage carefully.
67
68Guidelines:
69
70- Low-level frameworks demand explicit cleanup, Unicode measurement, and capability fallback tests.
71- Prefer maintained libraries with documented Windows, tmux, and Unicode behavior.
72- Avoid image/graphics features as hard requirements unless the deployment terminal is controlled.
73
74## Reference files
75
76- `references/rust-python-go.md` - Practical patterns for Ratatui, Textual/Rich/prompt_toolkit/curses, Bubble Tea/tview/tcell.
77- `references/node-dotnet-and-selection.md` - Ink, Blessed, Terminal.Gui, Spectre.Console, migration, and selection gotchas.
78- `references/low-level-and-emerging.md` - C/C++ ncurses/notcurses/FTXUI, Zig vaxis, SwiftTUI, and emerging toolkit cautions.