rossum-agents: Command for Claude Code

.claude/commands/ink-tui-best-practices.md

ink-tui-best-practices is a command for Claude Code from rossumai/rossum-agents. It costs 59 tokens per session (3,648 once invoked), scanned A, original, MIT.

Guidance for building terminal user interfaces with Ink, a React-based toolkit for command-line screens, using TypeScript and live event streams.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring Ink interfaces, especially terminal chat screens that show streamed responses or tool calls.
Why use it?
It helps avoid layout errors and poor handling of scrolling, streaming output, keyboard focus, performance, and accessibility.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; mentions OpenCode.

This is rossumai/rossum-agents's own configuration. It tells Claude Code how to work on rossum-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rossum-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rossumai/rossum-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rossumai/rossum-agents/master/.claude/commands/ink-tui-best-practices.md
Clone the repo
git clone --depth 1 https://github.com/rossumai/rossum-agents

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 ink-tui-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/commands/rossumai/rossum-agents/ink-tui-best-practices/github.svg)](https://agentmods.dev/commands/rossumai/rossum-agents/ink-tui-best-practices)
Your own site
<a href="https://agentmods.dev/commands/rossumai/rossum-agents/ink-tui-best-practices"><img src="https://agentmods.dev/badge/commands/rossumai/rossum-agents/ink-tui-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ink-tui-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/commands/rossumai/rossum-agents/ink-tui-best-practices"><img src="https://agentmods.dev/badge/commands/rossumai/rossum-agents/ink-tui-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,648 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00059 $0.03648
Opus 5 $0.00030 $0.01824
Sonnet 5 $0.00012 $0.00730
Haiku 4.5 $0.00006 $0.00365

Measured 11d ago against content hash 890570b0eb66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ink-tui-best-practices 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 11d 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.

.claude/commands/ink-tui-best-practices.md · 450 lines

How it starts

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

Ink TUI Best Practices

Comprehensive guide for building high-quality terminal user interfaces with Ink v5, React 18, and TypeScript. Covers layout, streaming, performance, accessibility, and AI chat UI patterns.

When to Apply

Reference these guidelines when:

  • Writing or reviewing Ink/React terminal UI components
  • Implementing SSE streaming or real-time data display
  • Designing keyboard navigation and focus management
  • Optimizing TUI rendering performance
  • Building AI chat interfaces (tool calls, thinking, streaming responses)

1. Ink Fundamentals

Layout Rules

Rule Detail
All text in <Text> Raw strings inside <Box> throw errors
<Box> = flex container Every <Box> is display: flex by default (Yoga layout engine)
<Text> contains only text Never nest <Box> inside <Text>
Default direction flexDirection="row" — use "column" for vertical stacking
Percentage widths <Box width="70%"> works for fluid layouts
No native scrolling overflow="hidden" clips but doesn't scroll — implement virtual windowing manually

Layout Patterns

// Vertical stack with spacing
<Box flexDirection="column" gap={1} padding={1}>
  <Text>Item 1</Text>
  <Text>Item 2</Text>
</Box>

// Horizontal with space distribution
<Box justifyContent="space-between" width="100%">
  <Text>Left</Text>
  <Spacer />
  <Text>Right</Text>
</Box>

// Fixed footer with flexible content
<Box flexDirection="column" height={rows}>
  <Box flexGrow={1} flexDirection="column" overflow="hidden">
    {/* Scrollable content */}
  </Box>
  <Box height={3} borderStyle="single">
    <Text>Status bar</Text>
  </Box>
</Box>

Text Wrapping

<Text wrap="truncate"> prevents long text from breaking layouts. Options: "wrap" (default), "truncate", "truncate-start", "truncate-middle", "truncate-end".


2. Hooks

useInput — Keyboard Handling

useInput((input, key) => {
  if (key.return) handleSubmit();
  if (key.escape) handleCancel();
  if (input === "q") exit();
  if (key.ctrl && input === "d") scrollDown();
}, { isActive: isFocused }); // Gate handler with isActive

Read the full file on GitHub · 450 lines

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. 11d ago First seen · 450 lines · 59 tokens per session scan A 890570b0eb66

Subscribe to this mod's changes

ink-tui-best-practices is a command published in the GitHub repository rossumai/rossum-agents (11 stars, last pushed 4d ago), licensed MIT. It adds 59 tokens to every session and 3,648 once invoked, about $0.0003 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.