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.
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 12-principles-of-animationSkill
- aip-namingSkill
- architectSkill
- babysit-abortSkill
- babysit-prSkill
- babysit-tickSkill
- baseline-uiSkill
- commit-pushSkill
- complex-refactorSkill
- critiqueSkill
- deadSkill
- devstackSkill
- go-backendSkill
- goSkill
- go-strictSkill
- greptileSkill
- impl-checkSkill
- inspect-dbSkill
- inspect-deploySkill
- inspect-runtimeSkill
- interaction-designSkill
- issue-planSkill
- lessonsSkill
- mergeSkill
- new-resourceSkill
- plan-featureSkill
- preflightSkill
- pr-reviewSkill
- review-fixSkill
- reviewSkill
- shipSkill
- simplifySkill
- task-execution-protocolSkill
- teamSkill
- tui-component-browserSkill
- tui-designSkill
- verifySkill
- wrap-upSkill
- write-docsSkill
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
- Distinctive: line 12
All temporary files MUST be deleted when the process ends:
- Very specific: line 16
Never leave .claude-design/tui/ behind.
- Very specific: line 20
Read agent-docs/tui-design.md for the design system.
- Very specific: line 21
Read internal/tui/style/themes/defender.go for the default theme.
- Distinctive: line 27
Use the AskUserQuestion tool.
- Distinctive: line 33
Q3: Pain points: If redesigning, what feels wrong about the current screen?
- Distinctive: line 41
Q7: Number of variants: Default 4, max 6.
- Very specific: line 45
Create .claude-design/tui/ with one Go file per variant:
- Distinctive: line 91
Wait for the user. Do not start a process that blocks.
- Distinctive: line 95
If the user wants a hybrid:
- Very specific: line 96
Create a new variant under .claude-design/tui/variant-final/ combining the parts called out.
- Very specific: line 97
Update lab.go to show the synthesized variant alongside the closest original.
- Distinctive: line 102
When the user confirms:
- Distinctive: line 118
If the user says "cancel" / "abort" / "stop" / "nevermind":
- Very specific: line 127
Snapshot every variant: before deleting, save them as references in internal/tui/<screen>/testdata/ so the chosen variant carries forward.
≈ “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.
Files
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.mdfor the design system. - Read
internal/tui/style/themes/defender.gofor the default theme. - Identify the target command (e.g.
maz init,maz review,maz install) and the file path underinternal/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 rendererEach 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.Themefor all colors. Never raw hex.bubblescomponents first. Custom only if no component fits.huhfor any input collection.- One
Init -> Update -> Viewper 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 tweakWait 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.goto show the synthesized variant alongside the closest original. - Loop until the user picks one.
Phase 5: Finalize
When the user confirms:
- 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.
- Target file path (
- Delete
.claude-design/tui/entirely. - Hand off to
@tui-developerto implement.
Abort
If the user says "cancel" / "abort" / "stop" / "nevermind":
- Confirm.
- Delete
.claude-design/tui/entirely. - 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.
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
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.

