tui-render-debug

tui-render-debug is a skill for Claude Code, Codex from dimetron/pi-go. It costs 33 tokens per session (667 once invoked), scanned A, original, MIT.

A diagnostic guide for broken terminal user interfaces in pi-go, including misplaced panels, stale rows, cursor movement errors, and terminal-specific display problems. A TUI is a text-based interface that runs inside a terminal.

In plain words
What is it for?
It is for investigating and repairing Bubble Tea TUI rendering corruption, especially across terminal types, window resizing, and incremental redraws.
Why use it?
It helps distinguish rendering-state errors from leaked output or terminal incompatibilities, so the underlying cause can be fixed instead of merely redrawing the screen.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for investigating and repairing Bubble Tea TUI rendering corruption, especially across terminal types, window resizing, and incremental redraws.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dimetron/pi-go/tui-render-debug
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 dimetron/pi-go --skill tui-render-debug
Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go

Made for: Claude Code, Codex.

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 tui-render-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/tui-render-debug/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/tui-render-debug)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/tui-render-debug"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/tui-render-debug/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 tui-render-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/tui-render-debug"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/tui-render-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 667 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.00033 $0.00667
Opus 5.5 $0.00013 $0.00267
Sonnet 5.5 $0.00007 $0.00133
Haiku 4.5 $0.00003 $0.00067

Measured 28d ago against content hash 56e1a1dfe1f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tui-render-debug 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 28d 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.

.pi-go/skills/tui-render-debug/SKILL.md · 70 lines

How it starts

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

TUI Render Debugging

Use this skill when pi-go's Bubble Tea interface is broken in a terminal: text appears in the wrong row or column, the sidebar moves, old frames remain after a resize, or a redraw repairs the display.

Establish the symptom

Capture the exact terminal, TERM, COLORTERM, TERMINAL_EMULATOR, terminal size, and whether a full redraw or switching terminal modes repairs the frame. Compare the broken frame with the next clean frame. A clean redraw after a bad incremental frame points to renderer cursor state, not necessarily to bad View() geometry.

For JetBrains IDE terminals, record TERMINAL_EMULATOR=JetBrains-JediTerm. JediTerm can report TERM=xterm-256color while mishandling cursor-backward-tab (CSI Z, CBT), which makes Bubble Tea's differential renderer believe the cursor is in a different column than the emulator.

Separate output leaks from renderer drift

The interactive TUI owns the terminal. Search the active path for direct output:

rg -n 'fmt\.Print|log\.Print|os\.(Stdout|Stderr)|slog\.' internal cmd

Routine diagnostics must use the session logger. User-facing notices must use the TUI message or notice channel. A subprocess's stdout and stderr must be captured and surfaced as a tool result. Direct writes can move the cursor, but the absence of leaked stderr does not rule out a renderer incompatibility.

Build a red-capable repro

Use a PTY with the affected environment and capture stdout and stderr separately. Count and inspect control sequences in stdout; stderr should contain only diagnostics expected outside the frame.

For renderer-level tests, create an ultraviolet.TerminalRenderer with the affected environment, move from a later column to an earlier column, and assert that unsupported CBT is not emitted. Replay the captured bytes through a JediTerm-compatible emulator when available. Also verify ordinary xterm and tmux/screen environments remain unchanged.

Fix decisions

Keep frame geometry tests independent: every rendered row must match the terminal width, the rail must stay in one display column, and no ANSI escape may leak into visible content. Do not solve a terminal capability bug by changing layout constants.

Read the full file on GitHub · 70 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. 28d ago First seen · 70 lines · 33 tokens per session scan A 56e1a1dfe1f9

Subscribe to this mod's changes

tui-render-debug is a skill published in the GitHub repository dimetron/pi-go (211 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 667 once invoked, about $0.0001 per session on Opus 5.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-09-19.

Related

Other skills, from other repositories

test-fix

Diagnose and minimally fix a failing test, then re-run.

patriceckhart/zot · 17 tokens

find-traces

Analyze OpenTelemetry distributed traces from Axiom. Use when investigating a trace ID, finding traces by criteria (errors, latency, service), or debugging distributed system issues.

axiomhq/cli · 37 tokens

troubleshoot-terva

Diagnose terva itself. Symptoms include an extension that will not load, a connector or bot that is down, missing tools, or MCP trouble. A bloated context or session/resume confusion also qualifies. Use when terva misbehaves, or when something that should be available is absent. Also use when the user asks why terva…

terva-sh/terva · 83 tokens

golang-lint

Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code…

alexastrum/skl · 100 tokens

golang-troubleshooting

Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production…

alexastrum/skl · 130 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

alexastrum/skl · 74 tokens