Reference for building consistent TUI views using Bubble Tea design patterns.
Install
mkdir -p .claude/skills/bubbletea-designer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10508" && unzip -o skill.zip -d .claude/skills/bubbletea-designer && rm skill.zipInstalls to .claude/skills/bubbletea-designer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Reference guide for Bubble Tea TUI design patterns, component selection, and architecture. Adapted for gcon's project-specific abstractions (custom View interface, CreateViewBase, TableClickDelegate, forms framework). Use when designing new views, planning component architecture, or needing design guidance for TUI development.Key capabilities
- →Design TUI views
- →Select TUI components
- →Plan message flow
- →Structure CLI apps
How it works
Provides design patterns and component guidance for building TUI applications with Bubble Tea.
Inputs & outputs
When to use bubbletea-designer
- →Design TUI view
- →Structure CLI app
- →Choose TUI component
About this skill
Bubble Tea TUI Designer (gcon Reference)
Design reference for building Bubble Tea terminal user interfaces in gcon. Provides component selection guidance, architecture patterns, and implementation examples adapted to gcon's project-specific abstractions.
When to Use This Skill
Use this reference when you need help designing, planning, or structuring new views in gcon:
Design & Planning
- Design a new view for a GCP resource
- Choose the right base type (TableClickDelegate, CreateViewBase, or manual)
- Select appropriate components from gcon's component library
- Plan message flow between views and the App router
- Understand architecture patterns used across the codebase
Typical Questions
- "How should I structure a new list view for GKE clusters?"
- "What base type should I use for a resource creation form?"
- "How do I add a detail view with tabs?"
- "Which components do I need for an action with confirmation?"
- "How does the three-phase message flow work?"
View Types in gcon
| Type | Base Type | Examples |
|---|---|---|
| Resource list | TableClickDelegate | instances, disks, buckets, SQL instances, service accounts |
| Resource details | — (manual) | instance_details, network_details, sql_instance_details |
| Resource creation | CreateViewBase | snapshot_create, disk_create, image_create, service_account_create |
| Resource editor | — (manual, complex) | bucket_create (diff preview), instance_editor (labels) |
| Policy/read-only | — (manual) | iam_policy, custom_role_details |
Reference Documents
references/design-patterns.md
Core architecture patterns adapted for gcon:
- View Interface — gcon's simplified
tea.Modelalternative - App as Central Router — centralized message dispatch and navigation
- List View with TableClickDelegate — resource list pattern
- Creation View with CreateViewBase — form → submit → async lifecycle
- Three-Phase Message Flow — Selection → Request → Result
- Master-Detail with Tabs — tabbed resource detail views
- Form Flow — gcon's forms framework with sections, validators, field types
- Navigation — view stack, sidebar, command palette
- Error Handling — inline vs full error display, SetError() propagation
- TextInputFocusable — preventing 'q' quit during text input
references/architecture-best-practices.md
Best practices covering:
- gcon-specific helpers (NewGCPSpinner, renderLoading, RenderError, etc.)
- Base types to embed (CreateViewBase, TableClickDelegate)
- Model design, Update/View patterns
- Performance (caching, debouncing, async)
- Error handling and recovery
- Testing with testify and table-driven tests
- Code organization and file structure
- Common pitfalls and how to avoid them
references/bubbletea-components-guide.md
Quick reference for 14 Bubble Tea ecosystem components:
- Input: textinput, textarea, filepicker
- Display: viewport, table, list, paginator
- Feedback: spinner, progress, timer, stopwatch
- Navigation: tabs, help
- Layout: lipgloss
Plus component initialization patterns, message handling, and best practices.
references/example-designs.md
5 practical examples for gcon:
- GKE Clusters List — TableClickDelegate + custom table
- Cloud Run Service Creation — CreateViewBase + forms
- Resource Detail View with Tabs — tabs + viewport + links
- Action with Confirmation — confirm.TypeConfirmDialog
- Sidebar Navigation Entry — sidebar + command palette integration
Plus component selection guide and complexity matrix for gcon view types.
assets/component-taxonomy.json
Component categorization including:
- Standard Bubble Tea components (input, display, feedback, navigation, layout)
- gcon custom components (actionmenu, commandpalette, confirm, diff, forms, sidebar, sortmenu, etc.)
- Archetype mappings: resource-list, resource-details, resource-create, resource-editor, policy-viewer
- Common component pairings
assets/pattern-templates.json
Implementation templates with:
- Files to create and update for each view type
- Base types to embed
- Required components
- Complexity ratings
- Cross-references to
.claude/rules/checklists
Relationship to .claude/rules/
This skill supplements but does not override the project rules:
| Topic | Authoritative Source | This Skill |
|---|---|---|
| Adding new views checklist | .claude/rules/adding-new-views.md | Design patterns and examples |
| Async error handling | .claude/rules/async-operations-error-handling.md | Architecture context |
| Forms framework | .claude/rules/forms-framework.md | Component selection guidance |
| Rendering | .claude/rules/bubble-tea-rendering.md | Layout patterns |
| Component patterns | .claude/rules/component-patterns.md | Best practices supplement |
| Key bindings | .claude/rules/key-bindings.md | — |
When in doubt, follow .claude/rules/ — they are the canonical reference. This skill provides broader architectural context and design guidance.
Component Coverage
gcon Custom Components (internal/ui/components/)
| Component | Purpose |
|---|---|
actionmenu | Context menu for item actions (opened with . key) |
commandpalette | Navigation and command palette (: or Ctrl+K) |
confirm | Type-to-confirm dialogs for dangerous actions |
diff | Diff viewer for comparing changes |
filepicker | File selection dialog |
footer | Status bar with spinner, key hints, running tasks |
forms | Form framework (7 field types, validators, sections) |
header | App header with breadcrumbs and project info |
inputdialog | Simple text input dialog |
labeledit | Label key-value editor |
links | Clickable navigation links to related resources |
projectselector | Project switching modal |
sidebar | Tree-based navigation sidebar |
sortmenu | Column sort menu for table views |
sparkline | Sparkline chart for metrics |
table | Enhanced table with sort, filter, mouse support |
tabs | Tab switcher component |
viewport | Scrollable content viewport |
Standard Bubble Tea Components Used
spinner.Model— viacomponents.NewGCPSpinner()wrapperhelp.Model— help overlaykey.Binding— keyboard shortcut definitions
Quick Decision Guide
Need a new view?
├── Listing GCP resources?
│ └── Use TableClickDelegate + table.Model
│ Example: instances.go, disks.go
├── Creating a GCP resource?
│ └── Use CreateViewBase + forms.Form
│ Example: snapshot_create.go, disk_create.go
├── Showing resource details?
│ └── Use tabs.Tabs + viewport.Model
│ Example: instance_details.go, network_details.go
├── Complex editor with preview?
│ └── Manual implementation with forms + diff
│ Example: bucket_create.go, instance_editor.go
└── Read-only data view?
└── Tabs + viewport (no actions)
Example: iam_policy.go, custom_role_details.go
When not to use it
- →When building non-TUI apps
- →When the view is too simple for design patterns
Prerequisites
Limitations
- →Requires adherence to project rules
- →Component selection can be complex
How it compares
Adapts Bubble Tea patterns to project-specific abstractions like gcon.
Compared to similar skills
bubbletea-designer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| bubbletea-designer (this skill) | 0 | 5mo | No flags | Advanced |
| templ-htmx | 3 | 7mo | No flags | Intermediate |
| gentleman-bubbletea | 2 | 7mo | Review | Intermediate |
| shadmin-dev | 0 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
templ-htmx
Xe
Build interactive hypermedia-driven applications with templ and HTMX. Use when creating dynamic UIs, real-time updates, AJAX interactions, mentions 'HTMX', 'dynamic content', or 'interactive templ app'.
gentleman-bubbletea
Gentleman-Programming
Bubbletea TUI patterns for Gentleman.Dots installer. Trigger: When editing Go files in installer/internal/tui/, working on TUI screens, or adding new UI features.
shadmin-dev
ahaodev
Apply Shadmin feature-development standards (backend Go/Gin/Ent + frontend React/TS). Use when adding/modifying features, CRUD modules, API routes/controllers/usecases/repositories, Ent schemas, frontend pages/routes, React components, TanStack hooks, or any full-stack work in this project. Trigger
charm-styling
rundops
Lip Gloss v2 styling and layout patterns for Go. Use when creating or editing terminal styles, colors, borders, layouts, or visual components using Lip Gloss. Triggers on lipgloss.NewStyle, lipgloss.Color, JoinHorizontal, JoinVertical, Place, border usage, or any visual styling of terminal output.
ui-ux-pro-max
nextlevelbuilder
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
svg-precision
dkyazzentwatwa
Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.