Agent skill

Bubbletea

by devantler-tech in devantler-tech/ksail

Build terminal user interfaces with Go and Bubbletea framework.

MITAuto-check passedDevOps & Cloud

Install Bubbletea

skills CLI
$ npx skills add devantler-tech/ksail --skill bubbletea -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install devantler-tech/ksail bubbletea --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/devantler-tech/ksail.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/bubbletea .claude/skills/bubbletea && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bubbletea
GitHub stars
165
Token cost
~2.3k tokens
SKILL.md length
599 words
Files
5 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Build terminal user interfaces with Go and Bubbletea framework.

  • Works in 3 steps: Calculate Available Space → Use Weight-Based Panel Sizing → Truncate Text to Prevent Wrapping
  • Creating TUI apps with the Elm architecture
  • SKILL.md covers When to Use This Skill, Core Principles, Creating New Projects and Available Components, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Bubbletea is an agent skill from devantler-tech/ksail. Build terminal user interfaces with Go and Bubbletea framework. Use for creating TUI apps with the Elm architecture, dual-pane layouts, accordion modes, mouse/keyboard handling, Lipgloss styling, and reusable components. Includes production-ready templates, effects library, and battle-tested layout patterns from real projects.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/components.md`, `references/emoji-width-fix.md` and `references/golden-rules.md`).

It sits in DevOps & Cloud, covering Container orchestration. The repository describes itself as: All-in-one Kubernetes SDK: create, manage, and operate clusters across distributions (Kind, K3d, Talos, VCluster) with built-in GitOps, secrets, AI assistant, and MCP server… The licence is MIT.

When your agent uses it

  • Creating TUI apps with the Elm architecture
  • Dual-pane layouts
  • Accordion modes
  • Mouse/keyboard handling

Example prompts

  • “/bubbletea”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Calculate Available Space
  2. Use Weight-Based Panel Sizing
  3. Truncate Text to Prevent Wrapping

What it can do on your machine

Read from SKILL.md and the folder at commit 3115397. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • charm.sh

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bubbletea loads about 2.3k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 85 tokens; SKILL.md has 599 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from devantler-tech/ksail at commit 3115397, republished under its MIT licence (© devantler-tech). 599 words, ~2,274 tokens.

Download SKILL.mdSave it as .claude/skills/bubbletea/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
bubbletea
description
Build terminal user interfaces with Go and Bubbletea framework. Use for creating TUI apps with the Elm architecture, dual-pane layouts, accordion modes, mouse/keyboard handling, Lipgloss styling, and reusable components. Includes production-ready templates, effects library, and battle-tested layout patterns from real projects.
license
MIT
metadata.github-path
.claude/skills/bubbletea
metadata.github-ref
refs/tags/v1.0.3
metadata.github-repo
https://github.com/ggprompts/tfe
metadata.github-tree-sha
b3dceb6065a02f1960f92483d9f44a1c2e4e36aa
metadata.internal
true

Bubbletea TUI Development

Production-ready skill for building beautiful terminal user interfaces with Go, Bubbletea, and Lipgloss.

When to Use This Skill

Use this skill when:

  • Creating new TUI applications with Go
  • Adding Bubbletea components to existing apps
  • Fixing layout/rendering issues (borders, alignment, overflow)
  • Implementing mouse/keyboard interactions
  • Building dual-pane or multi-panel layouts
  • Adding visual effects (metaballs, waves, rainbow text)
  • Troubleshooting TUI rendering problems

Core Principles

CRITICAL: Before implementing ANY layout, consult references/golden-rules.md for the 4 Golden Rules. These rules prevent the most common and frustrating TUI layout bugs.

The 4 Golden Rules (Summary)
  1. Always Account for Borders - Subtract 2 from height calculations BEFORE rendering panels
  2. Never Auto-Wrap in Bordered Panels - Always truncate text explicitly
  3. Match Mouse Detection to Layout - Use X coords for horizontal, Y coords for vertical
  4. Use Weights, Not Pixels - Proportional layouts scale perfectly

Full details and examples in references/golden-rules.md.

Creating New Projects

This project includes a production-ready template system. When this skill is bundled with a new project (via new_project.sh), use the existing template structure as the starting point.

Project Structure

All new projects follow this architecture:

your-app/
├── main.go              # Entry point (minimal, ~21 lines)
├── types.go             # Type definitions, structs, enums
├── model.go             # Model initialization & layout calculation
├── update.go            # Message dispatcher
├── update_keyboard.go   # Keyboard handling
├── update_mouse.go      # Mouse handling
├── view.go              # View rendering & layouts
├── styles.go            # Lipgloss style definitions
├── config.go            # Configuration management
└── .claude/skills/bubbletea/  # This skill (bundled)
Architecture Guidelines
  • Keep main.go minimal (entry point only, ~21 lines)
  • All types in types.go (structs, enums, constants)
  • Separate keyboard and mouse handling into dedicated files
  • One file, one responsibility
  • Maximum file size: 800 lines (ideally <500)
  • Configuration via YAML with hot-reload support

Available Components

See references/components.md for the complete catalog of reusable components:

  • Panel System: Single, dual-pane, multi-panel, tabbed layouts
  • Lists: Simple list, filtered list, tree view
  • Input: Text input, multiline, forms, autocomplete
  • Dialogs: Confirm, input, progress, modal
  • Menus: Context menu, command palette, menu bar
  • Status: Status bar, title bar, breadcrumbs
  • Preview: Text, markdown, syntax highlighting, images, hex
  • Tables: Simple and interactive tables

Effects Library

Beautiful physics-based animations available in the template:

  • 🔮 Metaballs - Lava lamp-style floating blobs
  • 🌊 Wave Effects - Sine wave distortions
  • 🌈 Rainbow Cycling - Animated color gradients
  • 🎭 Layer Compositor - ANSI-aware multi-layer rendering

See references/effects.md for usage examples and integration patterns.

Layout Implementation Pattern

When implementing layouts, follow this sequence:

1. Calculate Available Space
go
func (m model) calculateLayout() (int, int) {
    contentWidth := m.width
    contentHeight := m.height

    // Subtract UI elements
    if m.config.UI.ShowTitle {
        contentHeight -= 3  // title bar (3 lines)
    }
    if m.config.UI.ShowStatus {
        contentHeight -= 1  // status bar
    }

    // CRITICAL: Account for panel borders
    contentHeight -= 2  // top + bottom borders

    return contentWidth, contentHeight
}
2. Use Weight-Based Panel Sizing
go
// Calculate weights based on focus/accordion mode
leftWeight, rightWeight := 1, 1
if m.accordionMode && m.focusedPanel == "left" {
    leftWeight = 2  // Focused panel gets 2x weight
}

// Calculate actual widths from weights
totalWeight := leftWeight + rightWeight
leftWidth := (availableWidth * leftWeight) / totalWeight
rightWidth := availableWidth - leftWidth
3. Truncate Text to Prevent Wrapping
go
// Calculate max text width to prevent wrapping
maxTextWidth := panelWidth - 4  // -2 borders, -2 padding

// Truncate ALL text before rendering
title = truncateString(title, maxTextWidth)
subtitle = truncateString(subtitle, maxTextWidth)

func truncateString(s string, maxLen int) string {
    if len(s) <= maxLen {
        return s
    }
    return s[:maxLen-1] + "…"
}

Mouse Interaction Pattern

Always check layout mode before processing mouse events:

go
func (m model) handleLeftClick(msg tea.MouseMsg) (tea.Model, tea.Cmd) {
    if m.shouldUseVerticalStack() {
        // Vertical stack mode: use Y coordinates
        topHeight, _ := m.calculateVerticalStackLayout()
        relY := msg.Y - contentStartY

        if relY < topHeight {
            m.focusedPanel = "left"  // Top panel
        } else {
            m.focusedPanel = "right" // Bottom panel
        }
    } else {
        // Side-by-side mode: use X coordinates
        leftWidth, _ := m.calculateDualPaneLayout()

        if msg.X < leftWidth {
            m.focusedPanel = "left"
        } else {
            m.focusedPanel = "right"
        }
    }

    return m, nil
}
Show full SKILL.md (241 more words)Show less

Common Pitfalls to Avoid

See references/troubleshooting.md for detailed solutions to common issues:

❌ DON'T: Set explicit Height() on bordered panels
go
// BAD: Can cause misalignment
panelStyle := lipgloss.NewStyle().
    Border(border).
    Height(height)  // Don't do this!
✅ DO: Fill content to exact height
go
// GOOD: Fill content lines to exact height
for len(lines) < innerHeight {
    lines = append(lines, "")
}
panelStyle := lipgloss.NewStyle().Border(border)

Testing and Debugging

When panels don't align or render incorrectly:

  1. Check height accounting - Verify contentHeight calculation subtracts all UI elements + borders
  2. Check text wrapping - Ensure all strings are truncated to maxTextWidth
  3. Check mouse detection - Verify X/Y coordinate usage matches layout orientation
  4. Check border consistency - Use same border style for all panels

See references/troubleshooting.md for the complete debugging decision tree.

Configuration System

All projects support YAML configuration with hot-reload:

yaml
theme: "dark"
keybindings: "default"

layout:
  type: "dual_pane"
  split_ratio: 0.5
  accordion_mode: true

ui:
  show_title: true
  show_status: true
  mouse_enabled: true
  show_icons: true

Configuration files are loaded from:

  1. ~/.config/your-app/config.yaml (user config)
  2. ./config.yaml (local override)

Dependencies

Required:

github.com/charmbracelet/bubbletea
github.com/charmbracelet/lipgloss
github.com/charmbracelet/bubbles
gopkg.in/yaml.v3

Optional (uncomment in go.mod as needed):

github.com/charmbracelet/glamour       # Markdown rendering
github.com/charmbracelet/huh           # Forms
github.com/alecthomas/chroma/v2        # Syntax highlighting
github.com/evertras/bubble-table       # Interactive tables
github.com/koki-develop/go-fzf         # Fuzzy finder

Reference Documentation

All reference files are loaded progressively as needed:

  • golden-rules.md - Critical layout patterns and anti-patterns
  • components.md - Complete catalog of reusable components
  • troubleshooting.md - Common issues and debugging decision tree
  • emoji-width-fix.md - Battle-tested solution for emoji alignment across terminals (xterm, WezTerm, Termux, Windows Terminal)

External Resources

Best Practices Summary

  1. Always consult golden-rules.md before implementing layouts
  2. Always use weight-based sizing for flexible layouts
  3. Always truncate text explicitly (never rely on auto-wrap)
  4. Always match mouse detection to layout orientation
  5. Always account for borders in height calculations
  6. Never set explicit Height() on bordered Lipgloss styles
  7. Never assume layout orientation in mouse handlers

Follow these patterns and you'll avoid 90% of TUI layout bugs.

© devantler-tech, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .agents/skills/bubbletea of devantler-tech/ksail.

  • SKILL.md
  • references/components.md
  • references/emoji-width-fix.md
  • references/golden-rules.md
  • references/troubleshooting.md

Open the folder on GitHubat commit 3115397

Compare with similar skills

Bubbletea next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bubbletea compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bubbletea this skilldevantler-tech/ksail165—~2.3kAutomated safety check: PassMIT
KubeSphere Multi-Tenant Managementkubesphere/kubesphere17k1 repos~3.1kAutomated safety check: PassCustom licence
Azure Diagnosticsmicrosoft/azure-skills1.5k1 repos~1.6kAutomated safety check: PassMIT
Kubeshark Installerkubeshark/kubeshark12k—~3.6kAutomated safety check: NotesApache-2.0
Sim Helmsimstudioai/sim30k—~2.2kAutomated safety check: PassApache-2.0
Helm Chart ScaffoldingCybereason-Public/owLSM28013 repos~381Automated safety check: PassGPL-2.0

Similar skills

  • Creates and queries KubeSphere users, workspaces and projects and assigns built-in roles, defaulting to least privilege and never deleting anything.

    17k GitHub starsUsed in 1 repo~3.1k tokens
    DevOps & CloudAuto-check passed
  • Azure Diagnostics

    microsoft/azure-skills

    Official

    Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage.

    1.5k GitHub starsUsed in 1 repo~1.6k tokens
    DevOps & CloudAuto-check passed
  • Kubeshark Installer

    kubeshark/kubeshark

    Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.

    12k GitHub stars~3.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Sim Helm

    simstudioai/sim

    Install, upgrade, and operate the Sim Helm chart on Kubernetes.

    30k GitHub stars~2.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Helm Chart Scaffolding

    Cybereason-Public/owLSM

    Comprehensive guidance for creating, organizing, and managing Helm charts for packaging and deploying Kubernetes applications.

    280 GitHub starsUsed in 13 repos~381 tokens
    DevOps & CloudAuto-check passed
  • Syntax reference for KFL2, the CEL-based display filter language used to search Kubernetes network traffic captured by Kubeshark, loaded before any filter is written.

    12k GitHub stars~3.6k tokensUpdated today
    DevOps & CloudAuto-check passed

More from devantler-tech/ksail

  • Astro

    devantler-tech/ksail

    Skill for building with the Astro web framework. An agent skill from devantler-tech/ksail.

    165 GitHub starsUsed in 3 repos~1.1k tokens
    Auto-check passed
  • GitHub Actions Docs

    devantler-tech/ksail

    A skill your agent uses when users ask how to write, explain, customize, migrate, secure, or troubleshoot GitHub Actions workflows, workflow syntax, triggers, matrices, runners, reusable workflows…

    165 GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check passed
  • Ksail

    devantler-tech/ksail

    Use the ksail CLI to spin up and manage Kubernetes clusters (Kind/K3d/Talos/vCluster/KWOK — local via Docker; EKS — cloud via AWS) and GitOps workloads declaratively.

    165 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Ways Of Working

    devantler-tech/ksail

    Codifies devantler-tech engineering practices: agent-first development workflow, TDD, CI/CD pipelines, GitHub Flow, code quality gates, and Kubernetes workflows with ksail.

    165 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Maintain

    devantler-tech/ksail

    Repository maintenance for devantler-tech/ksail — triage, bug fixes, CI/workflow health & CI-failure/flaky investigation, docs upkeep, driving every open PR (external contributions included) to a…

    165 GitHub stars~209 tokensUpdated today
    Auto-check passed

Categories

Questions about Bubbletea

What does Bubbletea do?

Build terminal user interfaces with Go and Bubbletea framework. Bubbletea is an agent skill from devantler-tech/ksail. Build terminal user interfaces with Go and Bubbletea framework.

When should I use Bubbletea?

Bubbletea fits situations like: creating TUI apps with the Elm architecture; dual-pane layouts; accordion modes; mouse/keyboard handling.

How do I install Bubbletea in Claude Code?

Run `npx skills add devantler-tech/ksail --skill bubbletea -a claude-code`. Or copy the skill folder (.agents/skills/bubbletea in devantler-tech/ksail) into .claude/skills/bubbletea in your project. Claude Code loads it when a task matches its description.

How do I install Bubbletea in Codex?

Run `npx skills add devantler-tech/ksail --skill bubbletea -a codex`. Or copy the skill folder (.agents/skills/bubbletea in devantler-tech/ksail) into .agents/skills/bubbletea in your project. Codex loads it when a task matches its description.

Can I use Bubbletea in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add devantler-tech/ksail --skill bubbletea -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bubbletea, .gemini/skills/bubbletea, .github/skills/bubbletea and .opencode/skills/bubbletea in your project.

What does Bubbletea need to run?

SKILL.md names no scripts, command-line tools or credentials: Bubbletea is instructions for the agent only.

Does Bubbletea access the network?

SKILL.md names 2 domains. As links in the text: github.com and charm.sh. This is read from the text; nothing was executed.

Is Bubbletea safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bubbletea use?

Bubbletea is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bubbletea use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Bubbletea?

Skills that share tags, products or a category with Bubbletea: KubeSphere Multi-Tenant Management (kubesphere/kubesphere, 17k stars), Azure Diagnostics (microsoft/azure-skills, 1.5k stars), Kubeshark Installer (kubeshark/kubeshark, 12k stars) and Sim Helm (simstudioai/sim, 30k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bubbletea?

devantler-tech (a GitHub organization) maintains it in devantler-tech/ksail, which has 165 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.

Source: devantler-tech/ksail on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.