ratatui-ruby

ratatui-ruby is a skill for Claude Code from hoblin/claude-ruby-marketplace. It costs 119 tokens per session (2,204 once invoked), scanned A, original, MIT.

A Ruby toolkit for building terminal user interfaces: text-based apps that run inside a command-line window. It provides layouts, widgets, keyboard and mouse input, and screen rendering.

In plain words
What is it for?
Use it to create full-screen or inline terminal apps in Ruby, such as dashboards, menus, tables, and interactive command-line tools, with tests for their behavior.
Why use it?
It gives terminal apps a consistent way to draw screens and respond to input, so you do not have to build those parts from scratch.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ratatui-ruby plugin — 1 skill shipped together

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.

agentmods
npx agentmods add skills/hoblin/claude-ruby-marketplace/ratatui-ruby
Any agent
npx skills add hoblin/claude-ruby-marketplace --skill ratatui-ruby
Clone the repo
git clone --depth 1 https://github.com/hoblin/claude-ruby-marketplace

Made for: Claude Code.

Or install ratatui-ruby, the plugin that ships this one along with the rest of its 1 skill.

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-ruby

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/ratatui-ruby.svg)](https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/ratatui-ruby)
Your own site
<a href="https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/ratatui-ruby"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/ratatui-ruby.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,204 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00119 $0.02204
Opus 5 $0.00060 $0.01102
Sonnet 5 $0.00024 $0.00441
Haiku 4.5 $0.00012 $0.00220

Measured 6d ago against content hash 5e69682563ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ratatui-ruby scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ratatui-ruby/skills/ratatui-ruby/SKILL.md · 324 lines

How it starts

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

RatatuiRuby

This skill provides guidance for building terminal user interfaces with RatatuiRuby, a Ruby gem wrapping Rust's Ratatui library. Use for TUI development, terminal widgets, layout systems, event handling, and testing terminal applications.

Quick Reference

Minimal Application

require "ratatui_ruby"

RatatuiRuby.run do |tui|
  loop do
    tui.draw do |frame|
      widget = tui.paragraph(text: "Hello, TUI!", block: tui.block(title: "App"))
      frame.render_widget(widget, frame.area)
    end

    case tui.poll_event
    in {type: :key, code: "q"}
      break
    in {type: :key, code: "c", modifiers: ["ctrl"]}
      break
    else
      # Continue
    end
  end
end

Key Concepts

Concept Purpose
RatatuiRuby.run Managed loop handling terminal setup/teardown
tui.draw Render widgets each frame
tui.poll_event Capture keyboard/mouse input
frame.area Available rendering area (Rect)
frame.render_widget Render stateless widgets
frame.render_stateful_widget Render widgets with state (List, Table)

Two Operating Modes

Mode Use Case Setup
Full-Screen Complete TUI applications RatatuiRuby.run { } (default)
Inline Viewport Rich CLI moments (spinners, progress) RatatuiRuby.run(viewport: :inline, height: 5) { }

Full-Screen: Takes over terminal, alternate screen, restored on exit.

Inline Viewport: Preserves scrollback, fixed-height widget area, output remains visible after exit.

Core Pattern

The managed loop pattern handles terminal lifecycle:

RatatuiRuby.run do |tui|
  loop do
    # 1. Draw UI
    tui.draw do |frame|
      # Render widgets
    end

    # 2. Handle events
    case tui.poll_event
    in {type: :key, code: "q"}
      break
    end
  end
end

Common Widgets

Widget Factory Purpose
Paragraph tui.paragraph(text:) Text display
Block tui.block(title:, borders:) Borders, titles, padding
List tui.list(items:) Selectable item list
Table tui.table(rows:, widths:) Tabular data
Gauge tui.gauge(ratio:) Progress indication
Tabs tui.tabs(titles:) Tab navigation
Chart tui.chart(datasets:) Data visualization
Canvas tui.canvas { } Custom drawing
Scrollbar tui.scrollbar Scroll indication

Read the full file on GitHub · 324 lines

Files

What ships with it

7 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. 6d ago First seen · 324 lines · 119 tokens per session scan A 5e69682563ed

Subscribe to this mod's changes

ratatui-ruby is a skill published in the GitHub repository hoblin/claude-ruby-marketplace (37 stars, last pushed yesterday), licensed MIT. It adds 119 tokens to every session and 2,204 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.