Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Designing TUIs

БесплатноБез исполняемых скриптовНе проверен

Design, replicate, or iterate terminal user interfaces from screenshots, descriptions, layout sketches, or existing .tui files. Generate framework code…

albert-lvот 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 .tui Schema 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 .tui files, developers consume code
  • Batch generation: CI/CD generates multi-platform code from .tui source

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 .tui edit: 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 .tui file, 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.

  1. Scan screenshot boundaries — determine if a global border wraps the entire terminal
  2. Identify top-level partitions:
    • Horizontal separators → top/bottom regions (header / main / footer / status-bar)
    • Vertical separators → left/right regions (sidebar / main-content / detail-panel)
  3. 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.

  1. For each top-level region, determine internal layout direction (row / column / grid)
  2. Quantify child element proportions (see Proportion Mechanism below) — use percentages, not absolute column counts
  3. Determine if each child is a container or atomic component (refer to references/layout-inference-rules.md)
  4. Record spacing: padding / gap
  5. 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 .tui file 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
Полный SKILL.md на ClawHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить Designing TUIs с