Agent skill

Tui Design

by caarlos0 in caarlos0/dotfiles

Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable.

MITAuto-check passedFrontend & Design

Install Tui Design

skills CLI
$ npx skills add caarlos0/dotfiles --skill tui-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install caarlos0/dotfiles tui-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/caarlos0/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tui-design .claude/skills/tui-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tui-design
GitHub stars
220
Token cost
~3k tokens
SKILL.md length
1,753 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable.

  • Reviewing a TUI
  • SKILL.md covers Decide if a TUI is correct, Keep the two interfaces separate, Lay out for a character grid and Handle text as the terminal…, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • A full-screen terminal app

What it does

Tui Design is an agent skill from caarlos0/dotfiles. Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable. Use when building or reviewing a TUI, a full-screen terminal app, or an interactive command-line tool.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. The licence is MIT.

When your agent uses it

  • Reviewing a TUI
  • A full-screen terminal app
  • An interactive command-line tool

Example prompts

  • “/tui-design”

What it can do on your machine

Read from SKILL.md and the folder at commit 892360f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tui Design loads about 3k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 1,753 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from caarlos0/dotfiles at commit 892360f, republished under its MIT licence (© caarlos0). 1,753 words, ~2,993 tokens.

Download SKILL.mdSave it as .claude/skills/tui-design/SKILL.md (or your agent's skills folder).
name
tui-design
description
Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable. Use when building or reviewing a TUI, a full-screen terminal app, or an interactive command-line tool.
user_invocable
true

TUI Design

Design the command-line interface first. Add a full-screen TUI only when the task needs persistent context, fast navigation, selection, or live updates. A TUI owns the screen, the input, the scrollback, and the terminal state; do not take that cost without a reason.

Decide if a TUI is correct

  • Use a plain command when the operation is one-shot, batchable, or scripted.

  • Use the user's $PAGER when the task is reading or searching long output. Page only when stdout is a terminal, and provide --no-pager.

  • Use a TUI when users repeatedly navigate, compare, filter, select, or watch changing data. Process monitors, resource browsers, and Git interfaces are good examples.

  • Do not build a TUI only to get color or animation. Styled output, a prompt, or a single selector is usually enough.

  • Never make the TUI the only way to do an important operation. Ship equivalent non-interactive subcommands and structured output:

    bash
    app                  # optional interactive interface
    app list --json
    app delete ID --yes
  • Share the domain logic below both interfaces. The TUI is an adapter.

Keep the two interfaces separate

  • Write results to stdout and write progress, warnings, and errors to stderr.
  • Test each stream for a terminal independently. stdout can be a pipe while stderr is still a terminal.
  • When output is not a terminal, change presentation only, never meaning. Remove color, cursor motion, progress animation, and the alternate screen.
  • Provide --json for structured data and one JSON document per line for streaming events. Treat those schemas as a public interface.
  • Prompt only when stdin is a terminal. Provide a flag for every prompt so a script can supply the answer. Never block a pipeline on input.
  • Support -q/--quiet and --verbose, with the same meaning everywhere.

Lay out for a character grid

  • Make 80x24 the minimum target. Essential navigation, current state, primary actions, and errors must stay usable there.
  • Recompute the layout from the current size on every resize. Handle SIGWINCH, then query the real dimensions; do not cache the launch size.
  • Use explicit breakpoints. Drop decoration and secondary metadata before you hide primary content. Below the minimum, print a plain "terminal too small".
  • Clamp sizes before subtracting. Test 1x1, 20x5, and zero-size reports.
  • Give headers, status bars, and key hints fixed heights; give the main view the rest; set minimum sizes on interactive panes.
  • Wrap prose. Truncate scan-oriented rows with an ellipsis and offer a detail view. An ellipsis signals hidden content; silent clipping does not.
  • Use the alternate screen for sustained applications, and inline rendering for command-shaped work that should leave output in scrollback.
  • Spend borders carefully: two bordered panes cost at least four columns at
    1. Prefer whitespace, alignment, and one shared divider.

Handle text as the terminal sees it

  • Measure rendered cells, not bytes, code points, or string length. CJK is usually two cells, combining marks are zero, and one emoji may be many code points.
  • Cut and edit at grapheme-cluster boundaries, not code points.
  • Do not treat East Asian Width as a complete width algorithm; ambiguous characters vary by terminal, locale, and font.
  • Keep emoji out of borders, fixed columns, progress tracks, and cursors. Reported widths disagree across terminals and multiplexers.
  • Treat Nerd Font and Powerline glyphs as optional. Keep an ASCII fallback and never let an unlabeled icon be the only meaning.
  • Normalize tabs to a fixed width before measuring.

Use color as an enhancement

  • Design a readable monochrome hierarchy first, then add semantic color.
  • Support the ladder: no color, 16 colors, 256 colors, true color. Detect the capability; do not assume true color, and remember COLORTERM is lost through ssh and sudo.
  • Define roles such as muted, surface, selected, success, warning, and error. Map roles through themes; do not scatter literal colors in the code.
  • Detect the terminal background before you choose fixed colors, and keep an unknown state for terminals that do not answer.
  • Never encode meaning in color alone. Add a label, symbol, border, or cursor.
  • Honor NO_COLOR when it is present and not empty. An explicit flag or the user config may still override it.
  • Target 4.5:1 contrast for ordinary text. You do not control the user's font size, theme, or rendering.

Bind keys that every terminal can send

  • Support arrows and hjkl. Show arrows in the footer and the vim aliases in the full help.
  • Make Ctrl+C a global, highest-priority exit that no focused widget can shadow. It must restore the terminal before it exits.
  • Bind q to quit at the root, ? to full help, / to filter, : to a command palette, Enter to activate, Tab/Shift+Tab to move focus.
  • Give Esc one consistent ladder: close a menu, cancel an edit or filter, close the overlay, go back one level. At the root it does nothing.
  • Leave Ctrl+S, Ctrl+Q, Ctrl+D, and Ctrl+Z alone. They belong to the terminal and the shell.
  • Do not require Ctrl+Shift, Ctrl+Enter, or a Tab and Ctrl+I distinction. Legacy terminals cannot encode them. Use the Kitty keyboard protocol only for optional accelerators.
  • Keep mouse support off by default unless direct manipulation is central. Mouse reporting breaks ordinary text selection; document the Shift or Option override, and keep full keyboard equivalence.

Make the interface discoverable

  • Keep a one-line footer with three to six actions for the current focus, for example up/down move Enter open / filter ? help q quit.
  • Derive the footer from the active keymap so it cannot drift from reality.
  • ? opens a full help overlay grouped by global, navigation, current pane, actions, and search.
  • List aliases together, and never advertise a key that does nothing. Dim disabled actions and give the reason.
  • Show the active sort, filter, mode, and match count. Do not overload plain typing silently.
  • Treat empty states as content. Distinguish "nothing exists", "no match", "loading", "failed", and "no access", and give the next action: No matches for "prod". Press Esc to clear the filter.

Report state and errors honestly

  • Print something within 100ms. Silence during slow work looks like a hang.
  • Use a spinner only for unknown durations; switch to counts or a progress measure when totals are known. Always label what is happening.
  • Stop animation on success, failure, cancellation, or non-interactive output, and keep the frame rate low enough for ssh and slow terminals.
  • Show loading inside the affected pane and keep the surrounding context.
  • Every error answers three questions: what failed, why, and what to do next. Rewrite low-level errors into domain language. Put the action last.
  • Group repeated failures under one explanation instead of one paragraph each.
  • Keep recoverable errors inside the TUI, preserve the user's input and selection, and offer the retry key. Restore the terminal before a fatal error prints.
  • Confirm irreversible, broad, or externally visible actions, and name the target: Delete 12 pods in production? Default the focus to cancel.
  • Do not confirm actions with reliable undo. Offer undo instead, and only advertise it when recovery is guaranteed.
Show full SKILL.md (624 more words)Show less

Structure the application

  • Keep one source of truth for state, and one serialized path for every visible state transition.
  • Make the update step a deterministic transition: no clock, no filesystem, no network, no globals inside it.
  • Turn every occurrence into a typed event: keys, resize, ticks, completion, failure, cancellation.
  • Return descriptions of effects instead of performing them in the update step. Keep rendering pure and cheap.
  • Keep the event loop free. Anything slower than a few milliseconds is worker work that sends its result back as an event.
  • Cancel stale work and also reject stale results with a generation counter; an old response must never overwrite a newer one.
  • Tie worker lifetime to the screen or widget that started it.
  • Keep the domain packages free of the TUI framework, of styling, and of terminal APIs, so the same code serves --json, tests, and scripts.
  • Reuse existing primitives for lists, tables, viewports, inputs, and help before writing your own; they already solved Unicode, scrolling, and paste.
  • Never log to the stream the TUI owns. Log to a file and tail -f it from a second terminal. Debug from a second process.

Own the terminal state

  • Centralize acquisition and restoration. Track raw mode, alternate screen, hidden cursor, mouse capture, focus reporting, and bracketed paste, and undo them in reverse order.
  • Restore on normal exit, on error, on panic, on SIGINT, and on SIGTERM. Make cleanup idempotent and best effort.
  • Treat pasted text as data, not as keybindings, and bound its size.
  • Accept that SIGKILL cannot be handled. Document reset or stty sane.
  • Render on state change, not in a free loop. Build the next frame, diff it, and write only the changed cells. Do not clear the whole screen every frame.
  • Virtualize long lists, key the selection by item identity rather than row position, and bound streaming queues so producers apply backpressure.

Configure with a clear precedence

  • Order: flags, environment variables, project config, user config, system config, built-in defaults. Provide a command that shows effective values and their source.
  • Match the mechanism to the lifetime: flags vary per run, environment varies per machine, project files are shared, user config is personal.
  • Follow XDG: XDG_CONFIG_HOME, XDG_STATE_HOME, XDG_DATA_HOME, XDG_CACHE_HOME, XDG_RUNTIME_DIR.
  • Ship a complete default keymap and theme. High configurability without a good baseline is onboarding debt. Make reset easy.
  • Map keys to semantic actions such as item.open, not to functions, and detect conflicts.

Design for screen readers

  • Assume a screen reader sees a text buffer, not your widgets. Borders and coordinates carry no meaning to it.
  • Provide a first-class linear mode: --plain, --no-interactive, or an accessible prompt mode that echoes context and asks one question at a time.
  • Do not assume a framework is accessible because it is popular. Verify with NVDA, JAWS, and VoiceOver separately; snapshot tests prove nothing here.
  • Keep a real cursor where the user's attention is.
  • There is no portable accessibility environment variable. NO_COLOR is the only established convention; anything else must be documented and paired with a flag.

Verify it

  • Test state transitions without a terminal: send an event, assert the new state and the requested effect.
  • Snapshot the rendered buffer at fixed sizes. Cover narrow, wide, empty, Unicode, selected, error, and loading states.
  • Golden-test the plain contract with redirected streams, TERM=dumb, and NO_COLOR=1. Assert that no escape sequence, prompt, or timestamp appears.
  • Add pseudo-terminal tests for lifecycle: raw mode, resize, paste, Ctrl+C, SIGTERM, and panic. After each failure path, assert the terminal was restored.
  • Exercise the real thing through ssh and tmux, and on more than one emulator.
  • Use recorded tapes for documentation, not as the regression gate.
  • writing-tests for deterministic tests, including the TUI cases above.
  • code-review when reviewing someone else's terminal interface.
  • go-conventions when the implementation is Go.

© caarlos0, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/tui-design of caarlos0/dotfiles.

Open the folder on GitHubat commit 892360f

Compare with similar skills

Tui Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tui Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tui Design this skillcaarlos0/dotfiles220—~3kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
React Doctormakeplane/plane61k12 repos~657Automated safety check: PassAGPL-3.0
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Web Interface Guidelines Reviewervercel-labs/openreview1.7k97 repos~308Automated safety check: PassNone

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    61k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Web Interface Guidelines Reviewer

    vercel-labs/openreview

    Official

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my…

    1.7k GitHub starsUsed in 97 repos~308 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from caarlos0/dotfiles

All 20 skills in this repo
  • CLI Design

    caarlos0/dotfiles

    Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility.

    220 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Dependabot Merge

    caarlos0/dotfiles

    Review and merge open dependency pull requests from Dependabot, Renovate and similar bots across the goreleaser organization and the caarlos0 user.

    220 GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Gh CLI

    caarlos0/dotfiles

    Use GitHub CLI efficiently for pull requests, CI checks, workflow runs, logs, and merge status.

    220 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Dashboard

    caarlos0/dotfiles

    Design and review dashboards that are informative, honest, accessible, and visually polished, independent of any tool.

    220 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Gh Doc Author

    caarlos0/dotfiles

    Author and revise clear GitHub internal documentation, including design docs, proposals, decision records, runbooks, status updates, and handoffs.

    220 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Go Performance

    caarlos0/dotfiles

    Profile and optimize Go CPU, allocations, GC, concurrency, and I/O with benchmarks and pprof.

    220 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Questions about Tui Design

What does Tui Design do?

Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable. Tui Design is an agent skill from caarlos0/dotfiles. Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable.

When should I use Tui Design?

Tui Design fits situations like: reviewing a TUI; A full-screen terminal app; an interactive command-line tool.

How do I install Tui Design in Claude Code?

Run `npx skills add caarlos0/dotfiles --skill tui-design -a claude-code`. Or copy the skill folder (skills/tui-design in caarlos0/dotfiles) into .claude/skills/tui-design in your project. Claude Code loads it when a task matches its description.

How do I install Tui Design in Codex?

Run `npx skills add caarlos0/dotfiles --skill tui-design -a codex`. Or copy the skill folder (skills/tui-design in caarlos0/dotfiles) into .agents/skills/tui-design in your project. Codex loads it when a task matches its description.

Can I use Tui Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add caarlos0/dotfiles --skill tui-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tui-design, .gemini/skills/tui-design, .github/skills/tui-design and .opencode/skills/tui-design in your project.

What does Tui Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Tui Design is instructions for the agent only.

Does Tui Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tui Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tui Design use?

Tui Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tui Design use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tui Design?

Skills that share tags, products or a category with Tui Design: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 61k stars), Impeccable (bestofjs/bestofjs, 3.1k stars) and Figma Design System Builder (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tui Design?

caarlos0 (a GitHub user) maintains it in caarlos0/dotfiles, which has 220 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 9, 2026.

Source: caarlos0/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.