Skip to content
Agentmart
Submit a tool

pi-tui-design

Create distinctive, crafted TUI components for pi using @earendil-works/pi-tui and @earendil-works/pi-coding-agent.

Skill by mrclrchtr

IndexedMIT★ 103
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mrclrchtr-pi-tui-design

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Create distinctive, crafted TUI components for pi using @earendil-works/pi-tui and @earendil-works/pi-coding-agent. Use when building interactive terminal UIs — custom components, overlays, dialogs, dashboards, widgets, data visualizations, animated elements, game-like interfaces, or any visual TUI work inside pi extensions or custom tools. Triggers on: 'build a TUI component', 'make a dashboard', 'create an overlay', 'interactive widget', 'terminal UI', 'custom component', 'pi-tui', or any request to create visual, interactive terminal interfaces. Also use when beautifying or redesigning existing TUI components.

Use cases: design, frontend, data, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pi-tui-design

What's inside

Skill name
pi-tui-design
Description
Create distinctive, crafted TUI components for pi using @earendil-works/pi-tui and @earendil-works/pi-coding-agent. Use when building interactive terminal UIs — custom components, overlays, dialogs, dashboards, widgets, data visualizations, animated elements, game-like interfaces, or any visual TUI work inside pi extensions or custom tools. Triggers on: 'build a TUI component', 'make a dashboard', 'create an overlay', 'interactive widget', 'terminal UI', 'custom component', 'pi-tui', or any request to create visual, interactive terminal interfaces. Also use when beautifying or redesigning existing TUI components.
License
MIT
Metadata
internal: true
Instructions
218 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • examples.md · references/

SKILL.md (first lines)

# TUI Design for Pi

Build terminal interfaces that feel *crafted*, not generated.

## Reference Sources — Read These First

```bash
PI=$(npm root -g)/@earendil-works/pi-coding-agent

# Full TUI API (component interfaces, key identifiers, rendering rules)
cat "$PI/docs/tui.md"

# Copy-paste implementations for every pattern
# (load this file when you need working code to start from)
```

Read [references/examples.md](references/examples.md) for copy-paste implementations of:
Selection Dialog · Status+Widget · Loader with Cancel · Settings Toggles · Custom Tool Rendering · Custom Footer · Vim Modal Editor

```bash
# Real-world source references (ground truth):
cat "$PI/examples/extensions/preset.ts"           # SelectList + DynamicBorder
cat "$PI/examples/extensions/todo.ts"             # renderCall / renderResult
cat "$PI/examples/extensions/plan-mode/index.ts"  # setStatus + setWidget
cat "$PI/examples/extensions/custom-footer.ts"    # setFooter reactive
cat "$PI/examples/extensions/modal-editor.ts"     # CustomEditor vim-mode
cat "$PI/examples/extensions/snake.ts"            # full game loop
cat "$PI/examples/extensions/space-invaders.ts"   # wantsKeyRelease (Kitty)
cat "$PI/examples/extensions/overlay-qa-tests.ts" # all 9 anchors + animation
```

---

## Design Thinking

Before coding, commit to a direction:

- **Tone**: Minimal and precise? Dense and information-rich? Playful? Industrial? The terminal has its own aesthetic vocabulary — box-drawing elegance, braille-pattern density, block-element weight, symbol clarity.
- **Scope**: Full-screen takeover? Floating overlay? Persistent widget? Status line? Tool rendering? Match the delivery surface to the interaction weight.
- **Differentiation**: What detail makes this feel intentional? A progress bar with braille resolution. Aligned columns with accent headers. A dialog with breathing room.

## Terminal Aesthetic Vocabulary

| Category | Characters | Use |
|----------|-----------|-----|
| Box-drawing (light) | `─│┌┐└┘├┤┬┴┼` | Standard borders, tables |
| Box-drawing (rounded) | `╭╮╰╯` | Softer, modern feel |
| Box-drawing (heavy) | `━┃┏┓┗┛┣┫┳┻╋` | Emphasis, headers |
| Box-drawing (double) | `═║╔╗╚╝╠╣╦╩╬` | Formal, structured |
| Block elements | `█▓▒░▀▄▌▐` | Progress bars, density, fill |
| Braille | `⠀–⣿` | Sparklines, high-res patterns, spinners |
| Symbols | `◆●○◉✓✗▸▶★` | Status, bullets, selections |

**Weight hierarchy**: `█` → `▓` → `▒` → `░` → ` `. Use for density gradients, not just fill.

**Aspect ratio**: Terminal cells are ~2:1 tall. `██` reads as roughly square — account for this in spatial layouts (`snake.ts` uses `cellWidth = 2`).

## Color Discipline

**Always use theme tokens.** Hardcoded ANSI escapes break on theme change.

```typescript
// ✗ breaks on theme change
`\x1b[31m${text}\x1b[0m`

// ✓ adapts to dark/light/custom
theme.fg("accent", theme.bold("Title"))
theme.fg("success", "✓ OK")
theme.fg("muted",   "secondary info")
```

**Foreground hierarchy** (`theme.fg(color, text)`):
`accent` → primary attention · `text` → body · `muted` → secondary · `dim` → tertiary
`success` / `error` / `warning` → semantic · `border` / `borderAccent` / `borderMuted` → structural
`toolTitle` / `toolOutput` → tool contexts

**Background** (`theme.bg(color, text)`):
`selectedBg` · `toolPendingBg` · `toolSuccessBg` · `toolErrorBg` · `userMessageBg` · `customMessageBg`

**Rule**: one accent dominates. Overusing color flattens the hierarchy — a wall of green is worse than no color.

## Spatial Composition

- Every line from `render()` must not exceed the `width` parameter — use `truncateToWidth()`
- `paddingX=1` is the baseline; headers may use `paddingX=2`
- `Spacer(1)` between sections beats a separator line — let content breathe
- Compose: `Container → Box → children`. Don't flatten into one render function
- Use `visibleWidth()` for ANSI-aware column math, not `str.length`

## Animation

Timer-based via `setInterval` + `tui.requestRender()`. Braille spinner:

```typescript
const frames = ["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];
this.interval = setInterval(() => {
  this.frame = (this.frame + 1) % frames.length;
  this.invalidate();
  tui.requestRender();
}, 80);
```

**Mandatory**: clear intervals in `dispose()`. Leaked timers render after component removal.

## Keyboard Conventions

Standard keys users expect: `↑↓`/`j/k` navigate · `Enter` confirm · `Escape` cancel · `Tab` next field.

Always show hints: `theme.fg("dim", "↑↓ navigate • enter select • esc cancel")`

Use `matchesKey(data, Key.up)` — handles terminal escape sequence differences. See `tui.md` for all `Key.*` identifiers.

## Component Contract

```typescript
interface Component {
  render(width: number): string[];  // each line must not exceed width
  handleInput?(data: string): void;
  wantsKeyRelease?: boolean;        // Kitty key-release events (space-invaders.ts)

From mrclrchtr/supi, MIT.

More from mrclrchtr/supi

Signals

Stars
103
Forks
7
Open issues
14
Last commit (this folder)
Sep 3, 2026 (1 month ago)
Last release
Oct 22, 2026 (5 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mrclrchtr

Cite this page

pi-tui-design skill. Agent Mart. https://agentmart.dev/skills/mrclrchtr-pi-tui-design (last updated 2026-10-24)