← ClaudeAtlas

bubbletealisted

Use this skill when building a terminal UI (TUI) in Go with Bubble Tea and the Charm stack: the Elm Architecture / MVU pattern (`tea.Model` with `Init`/`Update`/`View`), `Cmd`/`Msg` event flow, Lip Gloss styling and layout, Bubbles components (`viewport`, `list`, `table`, `textinput`, `textarea`, `spinner`, `progress`), Glamour markdown rendering, and teatest for testing. Especially apt for streaming tokens from an LLM/agent into a terminal (goroutine → `p.Send` → `Update` → `viewport`), an agentic CLI, or any interactive full-screen or inline terminal app in Go. Targets v2 on the `charm.land/*/v2` import paths (Go 1.25+); writes current-version-correct code and avoids v1/beta patterns. Not for: Rust TUIs (→ Ratatui sibling), Python TUIs (→ Textual sibling), plain non-interactive CLI output (use `fmt`/`cobra`/standalone `lipgloss`), web/GUI UIs, or agent session orchestration / tmux / process multiplexing.
vinsonconsulting/claude-skill-foundry · ★ 1 · AI & Automation · score 75
Install: claude install-skill vinsonconsulting/claude-skill-foundry
# Bubble Tea Write current, compiling Bubble Tea **v2** code (pinned to **v2.0.x** on the **`charm.land/*/v2`** import paths) and refuse the v1/beta patterns the model remembers from training. The body is the load-bearing 20%: the Elm mental model and one verified example per concept. Everything enumerable — the full Bubbles catalog, the key/mouse taxonomy, styling, streaming, testing, migration — lives in `references/`. Open the matching reference before writing nontrivial code in that area. ## Imports — the whole stack is on `charm.land` Every Charm *framework* package lives on `charm.land/*/v2`. The most common v2 mistake is importing **lipgloss or bubbles from the old `github.com/charmbracelet/…` path** while using `charm.land` bubbletea — that pulls two incompatible trees into one build and fails to compile. Use these paths; only the `x/*` helpers stay on `github.com`: ```go import ( tea "charm.land/bubbletea/v2" "charm.land/lipgloss/v2" // NOT github.com/charmbracelet/lipgloss "charm.land/bubbles/v2/viewport" // list, table, textinput, textarea, spinner, … under bubbles/v2/<c> "charm.land/glamour/v2" "github.com/charmbracelet/x/ansi" // width/wrap helpers — these have no charm.land alias ) ``` ## Mental model — The Elm Architecture is the whole framework Bubble Tea is **not** a widget toolkit you poke at; it is one mandatory loop. You give the runtime a **Model** (your immutable state) and three methods, and it owns everything else: - **Init** r