add-screen
/add-screen
Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
- Author
- steamfield ↗
- Repository
- stacks ↗
- Licence
- Apache-2.0
- Last repository change
- 08.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
Original author description
Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
How it works
SKILL.md has no level-two headings · 12 lines, 210 words
SKILL.md preview
---
name: add-screen
description: Add a screen, overlay or mode to this Ratatui app with its actions, keys, drawing, snapshot and tests. Use when the user asks for a new view, page, panel, popup or mode in the terminal UI.
---
# Add a screen
The detail screen is the one to copy: `Mode::Detail` in `src/app.rs`, its rows in `keys::BINDINGS`, `detail` in `src/ui.rs`, and the `detail` snapshot.
1. **State.** Add a variant to `Mode` in `src/app.rs`, any state the screen needs to `App`, and the `Action` variants that enter and leave it. Handle them in `App::update`'s `match (self.mode, action)`. Data the screen shows is loaded before the UI starts, never in `update`.
2. **Keys.** Add rows to `BINDINGS` in `src/keys.rs` for the new mode: a way back (`Action::Back`), `?` for help and `q` to quit if the mode allows them. `no_key_is_bound_twice_in_one_mode` catches a clash.
3. **Draw.** Add a `<name>(frame, area, app)` function in `src/ui.rs`, called from `draw`'s `match app.screen()`. It reads only `&App` and takes styles from `Theme`. The footer and help overlay pick up the new rows on their own.
4. **Test.** In `app.rs`, a test that sends the actions in and out of the mode. In `ui.rs`, a `#[test]` calling `assert_frame("<name>", &[...actions...], SIZE)`.
5. Run `cargo test ui::` (the new snapshot fails and writes `src/snapshots/<name>.snap.new`), then `make snapshots`, and read the new `.snap` file with the user. Then `make lint test`.
6. If the screen shows data that printed output lacks, extend `output.rs` and add a case to `tests/binary.rs`.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · steamfield/stacks | 86 | Apache-2.0 |
| steamfield/stacks | 86 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version f65e9931bf0c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100ratatui-ruby
This skill should be used when the user asks to "create a TUI", "terminal interface", "terminal UI", "ratatui", "ratatui-ruby", "inline viewport", "full-screen terminal app", "terminal widgets", "tui.draw", "tui.poll_event", or mentions RatatuiRuby.run, managed loop, terminal… - 100tui-screen
Create TUI screens, components, and views for the agents-in-a-box terminal UI. Use when building new ratatui components, adding panels, creating list views, or styling any terminal interface element. Provides color palette, component patterns, and quality checklist. - 100ratatui-themes
Use when building or styling a Rust terminal UI (TUI) application with ratatui and you need to apply a consistent color theme, switch between themes at runtime, or use semantic status colors (error, warning, success). Trigger terms: ratatui theme, TUI color scheme, Dracula… - 96tui-tests
Use when adding or modifying tests for one of GitButler's Ratatui TUIs - 86add-page
Add a page to this Nuxt app together with the server route it reads or writes, its zod schema and tests. Use when asked for a new page, screen, view, form or API route backed by server data. - 86add-page
Add a page to this React SPA that reads from the external API, with its route, query, fake-API handler and tests. Use when asked for a new screen, route or view backed by an API endpoint.