ratatui-patterns

ratatui-patterns is a skill for Claude Code from uwuclxdy/agenticat. It costs 27 tokens per session (953 once invoked), scanned A, original, MIT.

A reference guide for building Rust terminal user interfaces with ratatui and crossterm. It covers current library APIs, rendering, layout, lifecycle, testing, and known limits.

In plain words
What is it for?
Implementing and testing ratatui interfaces, checking available APIs, choosing built-in features, and writing render tests with TestBackend.
Why use it?
It reduces mistakes from using outdated library knowledge or rewriting features the library already provides.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Implementing and testing ratatui interfaces, checking available APIs, choosing built-in features, and writing render tests with TestBackend.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uwuclxdy/agenticat/ratatui-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add uwuclxdy/agenticat --skill ratatui-patterns
Clone the repo
git clone --depth 1 https://github.com/uwuclxdy/agenticat

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ratatui-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/uwuclxdy/agenticat/ratatui-patterns.svg)](https://agentmods.dev/skills/uwuclxdy/agenticat/ratatui-patterns)
Your own site
<a href="https://agentmods.dev/skills/uwuclxdy/agenticat/ratatui-patterns"><img src="https://agentmods.dev/badge/skills/uwuclxdy/agenticat/ratatui-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00953
Opus 5 $0.00014 $0.00477
Sonnet 5 $0.00005 $0.00191
Haiku 4.5 $0.00003 $0.00095

Measured 7d ago against content hash 1254a5ba5d87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ratatui-patterns scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- version check: `curl -s -H 'User-Agent: ratatui-version-check' https://crates.io/api/v1/crates/ratatui` (a bare curl without User-Agent gets policy-blocked)
skills/ratatui-patterns/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ratatui Patterns

Modern-ratatui knowledge pack. Current stable: ratatui 0.30.2 (2026-06). Model training data predates 0.29. The biggest failure mode is reimplementing by hand what the library now provides; the second is asserting API shapes from memory. Both have the same fix: work from the bundled references, not from memory.

Hard Rules

  1. Before writing any TUI render/layout/lifecycle code, read references/modernization-checklist.md. If the thing being built appears in it, use the built-in.
  2. Before claiming an API exists or writing a signature, verify it in references/api-reference.md (generated from ratatui source, grep-friendly). If it is not there and not in references/limitations.md, pull live docs (below) before hand-rolling.
  3. Custom render code is allowed only for needs listed in references/limitations.md (the verified beyond-API catalog). Anything else custom is a defect.
  4. Render logic ships with TestBackend tests per references/testing.md.
  5. Depend only on the ratatui umbrella crate, never on ratatui-core/-widgets directly. If default-features = false, re-add layout-cache.
  6. Mouse events are opt-in. ratatui::init()/run() do not enable mouse capture; that needs EnableMouseCapture/DisableMouseCapture around the loop (references/api-reference.md §14).
  7. The event loop can go async (crossterm's event-stream feature + EventStream for tokio::select!); Terminal::draw stays sync regardless (references/api-reference.md §14).

Files

file when to read
references/modernization-checklist.md always, first: hand-rolled → built-in map + hunt greps
references/api-reference.md exact signatures, feature flags, full widget/API surface, events (mouse capture, sync vs async loop, kitty key flags)
references/limitations.md before writing custom render code; design-system conformance limits
references/testing.md writing or reviewing TUI tests
references/patterns.md composition idioms, corrected cookbook, widget-choice guidance
references/audit-prompt.md fanning out per-repo modernization audits

Read the full file on GitHub · 51 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 51 lines · 27 tokens per session scan A 1254a5ba5d87

Subscribe to this mod's changes

ratatui-patterns is a skill published in the GitHub repository uwuclxdy/agenticat (5 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 953 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

azure-storage-blob-rust

Azure Blob Storage library for Rust. Upload, download, and manage blobs and containers. Triggers: "blob storage rust", "BlobClient rust", "upload blob rust", "download blob rust", "storage container rust", "BlobServiceClient rust".

microsoft/skills · 57 tokens

azure-keyvault-certificates-rust

Azure Key Vault Certificates library for Rust. Create, manage, and use X.509 certificates including self-signed and CA-issued. Triggers: "keyvault certificates rust", "CertificateClient rust", "create certificate rust", "self-signed certificate rust", "X.509 rust".

microsoft/skills · 65 tokens

azure-keyvault-keys-rust

Azure Key Vault Keys library for Rust. Create, manage, and use cryptographic keys including RSA, EC, and HSM-protected keys. Triggers: "keyvault keys rust", "KeyClient rust", "create key rust", "encrypt rust", "wrap key rust", "sign rust".

microsoft/skills · 68 tokens

azure-cosmos-rust

Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data. Triggers: "cosmos db rust", "CosmosClient rust", "document crud rust", "NoSQL rust", "partition key rust".

microsoft/skills · 56 tokens

azure-eventhub-rust

Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".

microsoft/skills · 58 tokens

azure-identity-rust

Azure Identity library for Rust. Microsoft Entra ID authentication for all Azure SDK clients. Triggers: "azure identity rust", "DeveloperToolsCredential", "authentication rust", "managed identity rust", "credential rust", "Entra ID rust".

microsoft/skills · 54 tokens