agentleFS
mo-cmykmo-cmyk/mazarbul/.claude/skills/tui-design-lab/SKILL.md

tui-design-lab

Skill2 starsChanged 35 days agoApache-2.0View on GitHub

Generate multiple Bubble Tea screen variants for side-by-side comparison. USE WHEN exploring multiple TUI design directions for a Mazarbul command, redesigning an existing screen, or when user says 'show me some options'. Conducts a brief design interview, produces N variants under .claude-design/tui/, collects feedback, finalizes one. NOT FOR single-direction iterative refinement.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All temporary files MUST be deleted when the process ends:

    line 12
  2. Very specific:

    Never leave .claude-design/tui/ behind.

    line 16
  3. Very specific:

    Read agent-docs/tui-design.md for the design system.

    line 20
  4. Very specific:

    Read internal/tui/style/themes/defender.go for the default theme.

    line 21
  5. Distinctive:

    Use the AskUserQuestion tool.

    line 27
  6. Distinctive:

    Q3: Pain points: If redesigning, what feels wrong about the current screen?

    line 33
  7. Distinctive:

    Q7: Number of variants: Default 4, max 6.

    line 41
  8. Very specific:

    Create .claude-design/tui/ with one Go file per variant:

    line 45
  9. Distinctive:

    Wait for the user. Do not start a process that blocks.

    line 91
  10. Distinctive:

    If the user wants a hybrid:

    line 95
  11. Very specific:

    Create a new variant under .claude-design/tui/variant-final/ combining the parts called out.

    line 96
  12. Very specific:

    Update lab.go to show the synthesized variant alongside the closest original.

    line 97
  13. Distinctive:

    When the user confirms:

    line 102
  14. Distinctive:

    If the user says "cancel" / "abort" / "stop" / "nevermind":

    line 118
  15. Very specific:

    Snapshot every variant: before deleting, save them as references in internal/tui/<screen>/testdata/ so the chosen variant carries forward.

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TUI Design Lab

Mazarbul's TUI variant explorer. Run this skill when a TUI screen needs more than one direction tried before committing.

CRITICAL: Cleanup Behavior

All temporary files MUST be deleted when the process ends:

  • User confirms a final variant -> cleanup, then write the implementation plan.
  • User aborts -> cleanup immediately, no plan written.

Never leave .claude-design/tui/ behind.

Phase 0: Detect context

  • Read agent-docs/tui-design.md for the design system.
  • Read internal/tui/style/themes/defender.go for the default theme.
  • Identify the target command (e.g. maz init, maz review, maz install) and the file path under internal/tui/<screen>/ (or proposed path for a new screen).
  • Confirm the user is in TTY mode; the variants are only meaningful when rendered live.

Phase 1: Brief interview

Use the AskUserQuestion tool. Keep it tight; this is exploration, not a requirements doc.

Q1: Target. Which command's TUI are we designing? Existing or new screen?

Q2: Primary task. What is the user accomplishing? One sentence.

Q3: Pain points. If redesigning, what feels wrong about the current screen? (Multi-select: too dense, too sparse, hard to scan, slow to interact, unclear hierarchy, missing affordance.)

Q4: Inspiration. Which TUIs feel right for this surface? (Multi-select: Claude Code, gh dash, lazygit, k9s, gitui, charm/glow, charm/gum.)

Q5: Density. Compact, comfortable, or spacious?

Q6: Animation. Static, gentle (default), or theatrical?

Q7: Number of variants. Default 4, max 6.

Phase 2: Generate variants

Create .claude-design/tui/ with one Go file per variant:

.claude-design/tui/
  variant-a/
    model.go            # Bubble Tea model
    view.go             # View function
    rationale.md        # Why this variant exists
  variant-b/
    ...
  variant-c/
    ...
  variant-d/
    ...
  brief.md              # The interview output
  lab.go                # Side-by-side renderer

Each variant must explore a different axis:

  • Variant A: Layout , different spatial structure (panel vs split vs stacked).
  • Variant B: Density , push one direction (more compact or more spacious than the brief asked).
  • Variant C: Interaction model , different keybindings or different primary action (e.g. select-and-confirm vs auto-act).
  • Variant D: Expressive , push the brand direction (theme colors, animations, glyphs) further.
  • Variant E (optional): Minimal , strip everything non-essential.
  • Variant F (optional): Power-user , keyboard-only, dense, expert affordances.

Each variant uses:

  • internal/tui/style.Theme for all colors. Never raw hex.
  • bubbles components first. Custom only if no component fits.
  • huh for any input collection.
  • One Init -> Update -> View per variant. No cross-variant state sharing.

lab.go renders all variants in a grid (or sequentially with tab to switch) so the user can compare without leaving the terminal.

Phase 3: Present and collect feedback

Output:

Design Lab created at .claude-design/tui/
Run: go run ./.claude-design/tui/lab.go
Tab through variants, then return here with:
  - Which variant wins (A-F)
  - What to tweak

Wait for the user. Do not start a process that blocks.

Phase 4: Synthesize (if needed)

If the user wants a hybrid:

  • Create a new variant under .claude-design/tui/variant-final/ combining the parts called out.
  • Update lab.go to show the synthesized variant alongside the closest original.
  • Loop until the user picks one.

Phase 5: Finalize

When the user confirms:

  1. Write the implementation plan to .claude/plans/NNN-tui-<screen>.md:
    • Target file path (internal/tui/<screen>/).
    • Components used (from bubbles, huh).
    • Theme accessors touched.
    • Snapshot test plan (teatest).
    • Animation budget.
    • Open questions.
  2. Delete .claude-design/tui/ entirely.
  3. Hand off to @tui-developer to implement.

Abort

If the user says "cancel" / "abort" / "stop" / "nevermind":

  1. Confirm.
  2. Delete .claude-design/tui/ entirely.
  3. Acknowledge and stand by.

Gotchas

  • Variants must be meaningfully distinct. Color-swap variations don't count.
  • Lab renderer must work without external dependencies beyond what's already in go.mod.
  • Snapshot every variant before deleting, save them as references in internal/tui/<screen>/testdata/ so the chosen variant carries forward.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.