Designing TUIs
БесплатноБез исполняемых скриптовНе проверенDesign, replicate, or iterate terminal user interfaces from screenshots, descriptions, layout sketches, or existing .tui files. Generate framework code…
от albert-lv805 установок в других каталогахОб этом скилле
Designing TUIs
Use this skill to turn conversation, screenshots, or existing .tui files into practical terminal UI designs and runnable framework code. Two routes are available depending on the use case.
Trigger for welcome screens, dashboards, wizards, CLI launch screens, tool panels, lazygit/k9s/btop-style layouts, pane descriptions, or terminal UI visuals even when the user does not say “TUI”.
Architecture: Dual-Route Design
Default route: Screenshot/Description → 3-Phase Decomposition → Framework Code → Preview/Compare/Iterate
Advanced route: Screenshot/Description → 3-Phase Decomposition → .tui Schema → Schema→Code Converter → Framework Code
Default Route (Screenshot → Code)
Preferred for most tasks. TUI's simplicity (no Z-axis overlap, ~20 component types, strict orthogonal grid layout) means the intermediate schema layer has low marginal benefit. Direct code generation is faster with no precision loss.
Advanced Route (Screenshot → Schema → Code)
Use when:
- Multi-framework output: one
.tuiSchema generates BubbleTea (Go) + Ink (JS) + Textual (Python) + Ratatui (Rust) simultaneously - Design asset persistence: team needs versioned, editable TUI design files
- Cross-role collaboration: designers produce
.tuifiles, developers consume code - Batch generation: CI/CD generates multi-platform code from
.tuisource
Operating Modes
Identify the mode before acting:
- Screenshot replication: apply the 3-phase decomposition protocol (see below) before generating code or schema.
- Text-to-layout: restate the intended structure, primary interaction, and target terminal size, then apply 3-phase protocol.
- Existing
.tuiedit: inspect the current tree and patch only the requested nodes. - Code export (default route): generate framework code directly after 3-phase decomposition and user approval.
- Schema export (advanced route): generate
.tuifile, then convert to framework code using schema-to-code mapping.
3-Phase Decomposition Protocol
Both routes share Phases 1-2. Phase 3 diverges by route.
Phase 1 — Grounding
Goal: Identify top-level structural regions and establish the global skeleton.
- Scan screenshot boundaries — determine if a global border wraps the entire terminal
- Identify top-level partitions:
- Horizontal separators → top/bottom regions (header / main / footer / status-bar)
- Vertical separators → left/right regions (sidebar / main-content / detail-panel)
- Record for each region:
- Border style (single / double / rounded / none / ASCII art)
- Size proportion (as character row/col counts) — e.g., sidebar 30%, main 70%
- Background color differences and separator line positions
Output: Top-level region list (typically 2-5 regions) with direction and proportion annotations.
Phase 2 — Planning
Goal: Recursively analyze each top-level region, build a hierarchical layout tree, and lock proportions.
- For each top-level region, determine internal layout direction (row / column / grid)
- Quantify child element proportions (see Proportion Mechanism below) — use percentages, not absolute column counts
- Determine if each child is a container or atomic component (refer to
references/layout-inference-rules.md) - Record spacing: padding / gap
- Annotate responsive constraints: min sizes for each proportional region, degradation strategy for narrow terminals
Output:
- Hierarchical layout tree (indented outline format)
- Responsive proportion annotations (e.g., "sidebar 30% min 20col / main fill min 40col")
Phase 3 — Generation (Route Divergence)
Default route (→ Code):
- Generate target framework code (BubbleTea / Ink / Textual) directly
- Map proportions to framework-native layout mechanisms (flex ratio / percentage width)
- Must implement responsive behavior: listen to terminal resize, use proportions not hardcoded sizes, set min size fallbacks
Advanced route (→ Schema → Code):
- Generate
.tuifile with{ version: "1", meta, tree }structure - Use percentages + min constraints for responsive intent
- Convert to framework code using
references/schema-to-code-mapping.md
Proportion Mechanism
Extraction (Phase 2)
TUI proportions are precisely quantifiable via character counting (no sub-pixel ambiguity):
- Horizontal: count columns per region
- Vertical: count rows per region
- Express as: fixed (N rows/cols), percentage (30%), or fill (remaining space)
Proportion Categories
| Type | When to Use | Example |
|---|---|---|
| Fixed | Semantically fixed areas | status bar (1-2 rows), divider (1 col), title (1 row) |
| Percentage | Proportional areas | sidebar 30%, main 70% |
| Fill | Takes all remaining space | main content area |
Responsive Layout Rules
- Prefer percentages and fill over hardcoded absolute column counts
- Set minimum sizes for proportional areas (prevent content crushing)
- **Narrow termi
Установить Designing TUIs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Designing TUIs?
Design, replicate, or iterate terminal user interfaces from screenshots, descriptions, layout sketches, or existing .tui files. Generate framework code (BubbleTea/Ink/Textual/Ratatui) directly or via .tui Schema intermediate representation.
Как установить скилл Designing TUIs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Designing TUIs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic