Current APIs. A deliberate design. Tested code. No filler.
Quick start · Agent support · What changes · How it works · Demo · FAQ · Sponsor
AI assistants write ratatui from memory. They reach for old APIs and wrong crate versions, then ship a UI that looks generated: neon defaults, decorative panels, keys that do nothing.
ratatui-skill provides a practical workflow, version-aware research, a working reference template, and verification guidance. The assistant inspects the project, adapts the process to the task, and reports what it actually checked.
-
Copy the canonical skill directory into a discovery location supported by your agent. From the root of this repository:
Codex, Cursor, Antigravity, and OpenCode:
mkdir -p /path/to/project/.agents/skills rm -rf /path/to/project/.agents/skills/ratatui cp -a skills/ratatui /path/to/project/.agents/skills/ratatui
Claude Code:
mkdir -p /path/to/project/.claude/skills rm -rf /path/to/project/.claude/skills/ratatui cp -a skills/ratatui /path/to/project/.claude/skills/ratatui
See agent compatibility and installation for global installs and native alternatives.
-
Ask for a terminal UI:
Use the ratatui skill. Build a simple TUI in Rust: a todo list. Add items, mark them done, delete them, and save to a file so they're still there next time. -
Watch it inspect the project, choose a proportionate workflow, build, and run relevant checks.
AGENTS.md is a concise fallback for agents that read repository instructions but do not discover skills. It does not install or auto-register the skill. See agent compatibility for the supported discovery paths.
| Without the skill | With it |
|---|---|
| Versions and APIs written from memory | Resolved versions and project constraints checked; release notes reviewed when versions or recent APIs change |
| Design choices are implicit | Layout and interactions follow the requirements and displayed data; document decisions when complexity warrants it |
| Decorative panels, fake data, dead keys | Everything visible works |
| Structure chosen without considering scope | Clear state/rendering boundaries and shared key bindings where they reduce coupling or duplication |
| "Done" with nothing run | Relevant fmt, Clippy and tests; render or terminal integration checks where behavior requires them; honest reporting |
| Silent about what was skipped | A report that names anything it could not check |
Five steps, in order
- Research. Check the newest stable and minimum supported versions alongside versions resolved by the project. Preserve existing constraints; review release notes when changing versions or relying on recently changed APIs. Confirm widget crates match the resolved Ratatui version and compile uncertain APIs.
- Design. For a non-trivial new interface, make the interaction model, layout, keyboard behavior, and relevant empty/error states explicit before implementation. Keep this lightweight for small tasks.
- Build with the simplest architecture that fits. Use the dirview template as a reference when its structure is relevant; preserve existing project conventions.
- Verify. Run relevant formatting, Clippy and test checks. Use TestBackend for rendering behavior and PTY or recording-based tests when real terminal interaction matters. Report anything not checked.
- Report honestly, including anything it could not check.
The rules it enforces
- Everything visible works. No fake data, decorative panels or dead keys.
- When input, footer hints, and help repeat the same bindings, keep them in sync through a shared source of truth.
- Text is measured with
unicode-width, untrusted text is sanitized, only visible rows are drawn. - Choose colors and visual conventions for the product and terminal environment; support monochrome output when required.
- Handle errors deliberately and use compiler-visible Clippy lints where a project wants to prohibit specific patterns.
- Destructive actions confirm. Slow work never blocks the draw loop.
The skill was used to build todo/, a persistent todo list. It is a header and list of tasks: a adds one, Space marks it done, d then y deletes it, and every change is written to a plain text file on disk. The screenshot shows the opt-in Catppuccin Mocha theme.
cd todo
TODO_THEME=catppuccin cargo run --bin todoThe demo uses the terminal palette by default and supports NO_COLOR for monochrome output. Source, keys and the file format are in todo/README.md.
AGENTS.md the process in short form, for agents without skill support
assets/ banner, demo, faq and sponsor images
docs/ version-aware distribution proposal
evals/ task suite, paired-run harness, scoring rubric, human-review records
skills/ratatui/
SKILL.md the process
references/
research-checklist.md finding current versions and APIs; pitfalls found in practice
ux-principles.md layouts, keys, color, responsiveness
slop-tells.md what reads as generated, with before and after
scripts/
crate-versions.sh newest stable version and MSRV via cargo info
lint-slop.sh mechanical slop scanner; exit status gates CI
pty-smoke.py run a TUI in a pseudo-terminal and check it behaves
templates/dirview/ a complete ratatui 0.30 directory browser
todo/ the demo todo app built with the skill
.github/ issue and PR templates, sponsors, CI for both crates
dirview is a working program, not a sketch: list and preview panes, filtering, sorting, hidden files, a generated help overlay, empty and error states, a too-small message, NO_COLOR, and wide-character-safe layout. It has unit tests for state and keys, headless render tests, and passes clippy with warnings denied.
cd skills/ratatui/templates/dirview
cargo run -- .Compatibility · Versions · Slop scan · AI-written?
Does it only work with Claude Code?
No. The skill uses the open Agent Skills directory format.
Codex, Claude Code, Cursor, Antigravity, and OpenCode document compatible
skill discovery paths. Use the install location listed in
docs/agent-compatibility.md. The repository
has not yet been runtime-smoke-tested in every listed client.
Will it always pick the newest ratatui?
It looks the version up every time instead of trusting the docs.
The versions in this repo are what the template was tested with, ratatui 0.30.2 on its minimum supported Rust version, 1.88. They are not a promise about what is newest when you read this. The skill tells the assistant to:
- Run
crate-versions.shfor relevant dependencies. - Preserve project constraints and inspect release notes when changing versions or using recently changed APIs.
- Compile any API it is unsure about before using it.
Why a "slop scan"?
The scanner is deliberately narrow. It is a guardrail, not an AI-slop detector.
It checks a small set of mechanical source conventions. It cannot reliably
judge visual hierarchy, fake data, unnecessary abstractions, or whether a design
fits the product. Those require behavior tests and human review. See
references/slop-tells.md.
Is the code AI-written?
Yes, with AI assistance, and verified in CI.
Every template file is compiled and tested, and the process is written down so you can check the result yourself.
Still stuck? Open an issue or ask in Discussions.
The tells and principles come from public discussions of AI-generated projects and from lazygit's published design principles. references/ marks where a rule is this project's own judgment. The template was built and tested with ratatui 0.30.2 at Rust 1.88. Versions in the docs are examples; the skill tells the assistant to look them up again.
Issues and pull requests are welcome. Good first contributions: a pitfall you hit with a ratatui release, a slop tell the scanner misses, or a second template (an async dashboard is the most requested gap). Run the checks before opening a PR:
cd skills/ratatui/templates/dirview && cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test
cd todo && cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test
python3 skills/ratatui/scripts/pty-smoke.py target/debug/<binary>
skills/ratatui/scripts/lint-slop.sh .If this saved you time, a star helps other people find it.


