agentleFS
programmersd21programmersd21/ratatui-skill/skills/ratatui/SKILL.md

ratatui

Skill19 starsChanged 7 days agoMITView on GitHub

Build, modify, debug, or review Rust terminal user interfaces built with Ratatui. Do not use for non-Rust tasks or command-line applications without a terminal UI.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. FlorianBruniaux/ccboard★ 106same name
    2. ZhangHanDong/ratatui-skills★ 4same name
    3. a-poor/skills★ 0same name
    4. Odonno/doc2skill★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 16 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Focused widget or layout change: follow existing state and rendering patterns.

    line 16
  2. Distinctive:

    Do not copy the starter template into an existing application.

    line 19
  3. Very specific:

    Read the relevant Cargo.toml, Cargo.lock, workspace configuration, and nearby source.

    line 23
  4. Distinctive:

    Check release notes when changing versions or relying on recently changed APIs.

    line 27
  5. Distinctive:

    Treat its output as a starting point, not a substitute for compatibility checks.

    line 38
  6. Distinctive:

    Prefer the simplest design that makes behavior understandable and testable.

    line 42
  7. Distinctive:

    Keep application state and state transitions independent of terminal rendering.

    line 46
  8. Distinctive:

    Keep rendering focused on drawing from state.

    line 47
  9. Distinctive:

    Keep I/O and long-running work out of the draw path.

    line 50
  10. Distinctive:

    Use modules that reflect real responsibilities.

    line 51
  11. Distinctive:

    Do not impose these patterns on a tiny program when they add more complexity than value.

    line 53
  12. Very specific:

    Rendering: use Ratatui's TestBackend for layout, clipping, styles, and important visible states.

    line 86
  13. Distinctive:

    Terminal integration: use a PTY, VHS, Betamax, or equivalent when lifecycle, keyboard input, terminal restoration, or resizing is part of …

    line 87
  14. Distinctive:

    Do not snapshot every frame by default.

    line 90
  15. Distinctive:

    Run checks appropriate to the workspace and affected packages:

    line 94
  16. Very specific:

    Use --manifest-path or package selection for workspaces and scoped changes.

    line 103
  17. Distinctive:

    Use its app-specific options as needed.

    line 112
  18. Distinctive:

    Never report unrun checks as passing.

    line 125
  19. Distinctive:

    Read only what the task needs:

    line 129

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ratatui

Build terminal interfaces that are correct, usable, and appropriate to the project. This skill is a workflow and a set of technical references, not a universal architecture or visual style guide.

Choose the workflow

Inspect the repository and identify the task first.

  • New application: understand requirements, choose the smallest suitable structure, implement, and verify.
  • Existing application: inspect relevant modules, conventions, dependencies, and tests. Preserve established design and make the smallest change that solves the task.
  • Focused widget or layout change: follow existing state and rendering patterns. Do not introduce application-wide architecture for a local change.
  • Debugging or review: reproduce the behavior, inspect the relevant code and dependency versions, then verify the proposed fix.

Do not copy the starter template into an existing application.

1. Inspect and research

  1. Read the relevant Cargo.toml, Cargo.lock, workspace configuration, and nearby source.
  2. Identify the Ratatui and terminal-backend versions actually used.
  3. Preserve dependency constraints unless an upgrade is requested or required.
  4. Consult documentation and source matching those versions. The latest release is not automatically compatible.
  5. Check release notes when changing versions or relying on recently changed APIs.
  6. Compile a minimal example when an API remains uncertain.

The bundled helper compares registry releases with versions resolved by a project:

SKILL_DIR="/path/to/installed/ratatui"
$SKILL_DIR/scripts/crate-versions.sh ratatui crossterm unicode-width
$SKILL_DIR/scripts/crate-versions.sh --manifest path/to/Cargo.toml ratatui crossterm

Treat its output as a starting point, not a substitute for compatibility checks.

2. Choose an architecture that fits

Prefer the simplest design that makes behavior understandable and testable.

Often useful, but not mandatory:

  • Keep application state and state transitions independent of terminal rendering.
  • Keep rendering focused on drawing from state.
  • Separate event translation from application actions when that reduces coupling.
  • Centralize key bindings when input, help, and footer hints share them.
  • Keep I/O and long-running work out of the draw path.
  • Use modules that reflect real responsibilities.

Do not impose these patterns on a tiny program when they add more complexity than value. Do not restructure an existing project to match the template.

Starter template

templates/dirview/ is a working example, not a required foundation. Use it when its navigation, state, event, and rendering structure fits. Otherwise borrow only relevant ideas or start smaller. Read its code before copying anything.

3. Build for the actual interface

Derive layout, interaction, and visual choices from the requirements and data being displayed.

Consider where relevant:

  • Clear hierarchy and useful information density.
  • Discoverable keyboard behavior.
  • Terminal resizing and small dimensions.
  • Empty, loading, success, and error states.
  • Long text, Unicode width, and untrusted terminal text.
  • Focus and selection visibility.
  • Color and monochrome terminals, including NO_COLOR.
  • Cancellation and recovery from failures.
  • Large datasets and bounded or incremental work.

These are design considerations, not a mandate to include every state or feature. Avoid decoration that does not help users understand or operate the interface. Do not present fake data as real functionality.

4. Keep the UI responsive

Rendering should not perform avoidable blocking work. For expensive operations, choose an approach appropriate to the workload: precompute, cache, paginate, bound, move work off the draw path, or show progress. Do not add asynchronous machinery to trivial operations without a demonstrated need.

Measure before making performance claims.

5. Test behavior at the right level

  1. State and logic: unit-test transitions, filtering, sorting, selection, and errors without a terminal.
  2. Rendering: use Ratatui's TestBackend for layout, clipping, styles, and important visible states. Test representative sizes where responsiveness matters.
  3. Terminal integration: use a PTY, VHS, Betamax, or equivalent when lifecycle, keyboard input, terminal restoration, or resizing is part of the behavior.
  4. Manual review: inspect hierarchy, readability, and awkward edge cases.

Do not snapshot every frame by default. Prefer assertions about meaningful behavior and visible state. A process-start smoke test alone does not establish that an interactive application works.

6. Verify the change

Run checks appropriate to the workspace and affected packages:

cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo build

Use --manifest-path or package selection for workspaces and scoped changes. Do not claim a check passed if it was not run.

The bundled PTY helper is available when a real terminal smoke test is useful:

SKILL_DIR="/path/to/installed/ratatui"
$SKILL_DIR/scripts/pty-smoke.py PATH/TO/BINARY

Use its app-specific options as needed. The style scanner is heuristic, not a correctness analyzer:

SKILL_DIR="/path/to/installed/ratatui"
$SKILL_DIR/scripts/lint-slop.sh PROJECT_DIR

Compiler-visible lints belong in Clippy. Human review is still needed for architecture, error handling, and visual quality.

7. Report honestly

Summarize what changed, important dependency/API decisions, checks actually run, relevant behavior verified, and anything not tested or uncertain.

Never report unrun checks as passing.

References

Read only what the task needs:

  • references/research-checklist.md: version and API research.
  • references/ux-principles.md: interface design and terminal usability.
  • references/slop-tells.md: visual and textual patterns worth reviewing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.