charmbracelet
Skill2 starsChanged 7 months agoMITView on GitHub
Build Go terminal user interfaces and interactive CLIs with the Charmbracelet ecosystem, especially Bubble Tea, Bubbles, Huh, Lip Gloss, Wish, Glamour, and Log. Use this skill when the user asks for a TUI, terminal UI, interactive CLI, Bubble Tea model/update/view code, Bubbles widgets, Huh forms, Lip Gloss layout or styling, Wish SSH apps, Glamour markdown rendering, or a polished Go terminal app.
In this repository26 other files it gives its agents.
- other/AGENTS.mdAGENTS.md
- beamng-modsSkill
- bootstrap-vueSkill
- depsdotdevSkill
- find-domainSkill
- github-cliSkill
- go-cobraSkill
- goreleaserSkill
- go-viperSkill
- kasettoSkill
- laravel-actionsSkill
- lefthookSkill
- miseSkill
- pelican-panel-pluginsSkill
- php-monorepo-builderSkill
- php-saloonSkill
- prd-todo-slicerSkill
- prd-to-kandev-tasksSkill
- qodo-mergeSkill
- release-pleaseSkill
- rewrite-in-goSkill
- shieldsioSkill
- skill-researcherSkill
- skill-scoutSkill
- taskfileSkill
- website-visual-testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill to build modern Go CLIs with the Charmbracelet stack.
- Very specific: line 13
Use charm.land/.../v2 imports for the current v2 ecosystem.
- Distinctive: line 14
Treat Bubble Tea as the app runtime and state machine.
- Distinctive: line 15
Treat Bubbles as reusable widgets, not the app shell.
- Distinctive: line 16
Treat Lip Gloss as layout and styling.
- Distinctive: line 17
Treat Huh as the fastest way to build forms and wizards.
- Distinctive: line 18
Treat Glamour as markdown-to-ANSI rendering.
- Very specific: line 19
Treat Log as diagnostics to stderr or files, not to the TUI surface.
- Distinctive: line 20
Treat Wish as the SSH transport layer for remote terminal apps.
- Distinctive: line 41
Start with Bubble Tea when the user asks for a TUI, terminal UI, dashboard, picker, wizard, or interactive CLI.
- Distinctive: line 42
Add Bubbles instead of rebuilding common widgets by hand.
- Distinctive: line 43
Add Lip Gloss once layout or visual hierarchy matters.
- Distinctive: line 44
Add Huh when the interaction is form-heavy.
- Distinctive: line 45
Add Glamour when the app renders markdown content.
- Distinctive: line 46
Add Log for diagnostics, background jobs, or server logs.
- Distinctive: line 47
Add Wish only when the app should run over SSH.
- Distinctive: line 51
Keep business logic separate from the Bubble Tea model.
- Very specific: line 52
Do I/O in tea.Cmd, not directly in Update or View.
- Very specific: line 92
Read references/bubbletea-core.md for Bubble Tea's model, commands, messages, and program lifecycle.
- Very specific: line 93
Read references/bubbletea-patterns.md for app structure, async work, Cobra integration, and multi-model composition.
- Very specific: line 94
Read references/troubleshooting-workarounds.md before migrating old Charmbracelet code or mixing stale examples with v2 code.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Use this skill to build modern Go CLIs with the Charmbracelet stack. Default to Bubble Tea for any stateful TUI or interactive terminal flow, then layer in Bubbles, Huh, Lip Gloss, Wish, Glamour, and Log as needed.
Start Here
- Use
charm.land/.../v2imports for the current v2 ecosystem. - Treat Bubble Tea as the app runtime and state machine.
- Treat Bubbles as reusable widgets, not the app shell.
- Treat Lip Gloss as layout and styling.
- Treat Huh as the fastest way to build forms and wizards.
- Treat Glamour as markdown-to-ANSI rendering.
- Treat Log as diagnostics to
stderror files, not to the TUI surface. - Treat Wish as the SSH transport layer for remote terminal apps.
When To Reach For Which Library
| Need | Use |
| Full TUI, app state, key handling, message loop | references/bubbletea-core.md |
| Real app architecture, commands, child models, async patterns | references/bubbletea-patterns.md |
Reusable widgets like list, table, textinput, viewport, help | references/bubbles.md |
| Forms, prompts, wizards, embedded form screens | references/huh.md |
| Styling, spacing, borders, color, layout composition | references/lipgloss.md |
| SSH-native TUI or remote CLI app | references/wish.md |
| Markdown help panes, docs, release notes, previews | references/glamour.md |
| Structured CLI logging and diagnostics | references/log.md |
| High-level library chooser and API map | references/api-surface.md |
| Concrete implementation recipes | references/common-use-cases.md |
| Migration issues and footguns | references/troubleshooting-workarounds.md |
| Upstream example shortlist | references/examples.md |
Default Build Strategy
- Start with Bubble Tea when the user asks for a TUI, terminal UI, dashboard, picker, wizard, or interactive CLI.
- Add Bubbles instead of rebuilding common widgets by hand.
- Add Lip Gloss once layout or visual hierarchy matters.
- Add Huh when the interaction is form-heavy.
- Add Glamour when the app renders markdown content.
- Add Log for diagnostics, background jobs, or server logs.
- Add Wish only when the app should run over SSH.
Core Rules
- Keep business logic separate from the Bubble Tea model.
- Do I/O in
tea.Cmd, not directly inUpdateorView. - Handle resize with
tea.WindowSizeMsgand keep layouts responsive. - Request background color with
tea.RequestBackgroundColorwhen styles depend on light/dark mode. - In Bubble Tea v2, declare terminal behavior in
tea.Viewfields likeAltScreenandMouseMode. - In standalone Lip Gloss or Glamour output, print with Lip Gloss writers so color downsampling works.
- In Wish apps, remember middleware runs in reverse declaration order.
- In Bubble Tea apps, write logs to
stderror a file, not to stdout.
Bubble Tea First Skeleton
package main
import tea "charm.land/bubbletea/v2"
type model struct{}
func (m model) Init() tea.Cmd {
return nil
}
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyPressMsg:
switch msg.String() {
case "q", "ctrl+c":
return m, tea.Quit
}
}
return m, nil
}
func (m model) View() tea.View {
v := tea.NewView("Hello from Bubble Tea")
return v
}Read These Next
- Read
references/bubbletea-core.mdfor Bubble Tea's model, commands, messages, and program lifecycle. - Read
references/bubbletea-patterns.mdfor app structure, async work, Cobra integration, and multi-model composition. - Read
references/troubleshooting-workarounds.mdbefore migrating old Charmbracelet code or mixing stale examples with v2 code.
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.

