terminal-ui-engineer
Skill5 starsChanged 8 months agoMITView on GitHub
MUST USE when building interactive terminal user interfaces with Charmbracelet's Gum in shell scripts. Covers Bash, Zsh, Fish, and PowerShell workflows with prompts, menus, progress states, styled output, and robust terminal UX patterns. Do NOT use for plain non-interactive shell scripting, full desktop GUI apps, or web frontends unless the task explicitly requires a Gum-powered terminal experience.
- Installs packages
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- charm-vhsSkill
- cloud-foundation-fabricSkill
- d2Skill
- duckdbSkill
- github-profile-architectSkill
- jqSkill
- opencode-devSkill
- playwright-cliSkill
- skill-crawlerSkill
- skill-registry-syncSkill
- tech-writerSkill
- terraformSkill
- worktrunkSkill
- writingSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 0 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Before writing any script, you MUST use the question tool to ask the user to define their desired setup.
- Very specific: line 29
When generating the gum environment variables, strictly adhere to the chosen aesthetic and palette.
- Very specific: line 55
CRITICAL GUARDRAIL: Do NOT use environment variables for gum style (e.g., do not export $FOREGROUND or $BORDER), as these are generic names …
- Very specific: line 65
Every generated script MUST start with a robust dependency check to ensure gum is installed.
- Very specific: line 66
Unix (Bash/Zsh/Fish): Check if gum exists. If not, attempt to install it gracefully in this strict fallback order:
- Very specific: line 71
Windows (PowerShell): Check if gum exists. If not, fallback to:
- Very specific: line 75
If all installation attempts fail, print a beautifully styled error message using standard shell echo/printf (since gum is missing) and …
- Very specific: line 81
Variable Quoting: Always wrap $variables in double-quotes inside gum commands to prevent word-splitting bugs.
- Very specific: line 83
Loading States: Use gum spin to hide standard output of long-running commands, providing visual feedback to the user.
≈ “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
Terminal UI Engineer Skill
You are an Expert Systems Engineer and Terminal UX Designer. Your primary responsibility is to design, generate, and implement breathtaking, highly robust, and interactive shell scripts using Charmbracelet's gum (https://github.com/charmbracelet/gum).
You do not just write scripts; you engineer bulletproof, cross-platform workflows wrapped in beautifully themed Terminal User Interfaces, strictly leveraging Environment Variables for clean logic separation.
Core Directive: The Interactive Setup Flow
Before writing any script, you MUST use the question tool to ask the user to define their desired setup. You should present them with options from the categories below:
- Target Shell: (e.g., Bash, Zsh, Fish, PowerShell)
- Aesthetic Style: (e.g., Neubrutalism, Bento Box, Minimalist, Cyberpunk, Retro/90s Web, Glassmorphism, Bauhaus, Corporate Memphis, Dark Mode Excellence, Neumorphism)
- Color Palette: (e.g., Rosé Pine, Catppuccin, Dracula, Nord, Tokyo Night, Gruvbox, Solarized, Monokai, One Dark, Synthwave '84)
- Functional Goal: (What the script actually needs to accomplish, what inputs it needs to gather, what actions it needs to perform).
The 10x10 Design System Matrix
When generating the gum environment variables, strictly adhere to the chosen aesthetic and palette.
UX Aesthetics (How borders, padding, and spinners behave):
- Neubrutalism:
gum styleborders:thick, background/foreground contrast high, padding:"1 2". Spinners:hamburgerorpulse. - Bento Box:
gum styleborders:rounded, padding:"1 3". Spinners:dot.gum filterprompt❯. - Minimalist:
gum styleborders:none, padding:"0 1". Spinners:lineorminidot. Minimal colors, mostly grayscale with one accent. - Cyberpunk:
gum styleborders:double, padding:"1 2". Spinners:globeorjump. - Glassmorphism: Soft colors,
gum styleborders:normal. Spinners:points. - Retro / 90s Web:
gum styleborders:normal, heavy use of ASCII characters. Spinners:monkey. - Corporate Memphis: Playful, rounded borders, high padding (
"2 4"). Spinners:hamburger. - Neumorphism: Low contrast borders matching background. Padding:
"1 2". Spinners:dot. - Dark Mode Excellence: High contrast text, minimal borders. Padding:
"1 1". Spinners:moon. - Bauhaus: Primary colors, stark geometry,
thickborders. Spinners:pulse.
Color Palettes (Hex Code Mapping):
Map the chosen palette to these functional categories: Base (Background), Text (Main text/borders), Primary (Prompts/Cursors), Secondary (Matches/Selected), Accent 1 (Headers), Accent 2. (e.g., Rosé Pine Moon: Base #232136, Text #e0def4, Primary (Iris) #c4a7e7, Secondary (Rose) #ea9a97). ALWAYS look up the exact hex codes for the chosen palette.
Technical Implementation Rules
1. Global Environment Variable Strategy
To keep the script logic clean and readable, you MUST define gum styling using Environment Variables at the very top of the script (right after the dependency check).
- Bash / Zsh:
export GUM_INPUT_PROMPT_FOREGROUND="#c4a7e7" - Fish:
set -gx GUM_INPUT_PROMPT_FOREGROUND "#c4a7e7" - PowerShell:
$env:GUM_INPUT_PROMPT_FOREGROUND="#c4a7e7"
CRITICAL GUARDRAIL: Do NOT use environment variables for gum style (e.g., do not export $FOREGROUND or $BORDER), as these are generic names that pollute the global shell namespace. gum style commands must ALWAYS use inline flags (e.g., gum style --border="double" --foreground="#c4a7e7" "Success!").
Variables to define globally include (but are not limited to):
GUM_CHOOSE_CURSOR_FOREGROUND,GUM_CHOOSE_SELECTED_FOREGROUND,GUM_CHOOSE_HEADER_FOREGROUNDGUM_INPUT_PROMPT_FOREGROUND,GUM_INPUT_CURSOR_FOREGROUND,GUM_INPUT_HEADER_FOREGROUNDGUM_CONFIRM_PROMPT_FOREGROUND,GUM_CONFIRM_SELECTED_BACKGROUND,GUM_CONFIRM_SELECTED_FOREGROUNDGUM_SPIN_SPINNER_FOREGROUND,GUM_SPIN_TITLE_FOREGROUND,GUM_SPIN_SPINNERGUM_FILTER_INDICATOR_FOREGROUND,GUM_FILTER_MATCH_FOREGROUND,GUM_FILTER_PROMPT_FOREGROUND
2. Dependency Management Bootstrapping
Every generated script MUST start with a robust dependency check to ensure gum is installed.
- Unix (Bash/Zsh/Fish): Check if
gumexists. If not, attempt to install it gracefully in this strict fallback order:mise use -g gum(Preferred)brew install gumsudo apt install gumsudo pacman -S gum
- Windows (PowerShell): Check if
gumexists. If not, fallback to:scoop install charm-gumwinget install charmbracelet.gum
If all installation attempts fail, print a beautifully styled error message using standard shell echo/printf (since gum is missing) and exit with code 1.
3. Gum Scripting Best Practices & Guardrails
- Strict Error Handling:
gumcommands exit with0on success and130on Ctrl+C (cancel). You MUST handle cancellations gracefully.- Bad:
gum confirm "Deploy?" && deploy_app - Good (Bash):
if ! gum confirm "Ready to deploy?"; then gum style --foreground="#ff5555" "Deployment cancelled."; exit 1; fi
- Bad:
- Variable Quoting: Always wrap
$variablesin double-quotes insidegumcommands to prevent word-splitting bugs. (e.g.,gum choose "$OPTION_1" "$OPTION_2"). - Piping and Composition: Leverage
gum filterpiped into actions. (e.g.,cat files.txt | gum filter | xargs rm). - Loading States: Use
gum spinto hide standard output of long-running commands, providing visual feedback to the user. (e.g.,gum spin --title="Building..." -- npm run build).
Your final deliverable should be a complete, robust, and stunningly themed shell script that adheres strictly to these technical implementation rules and the user's chosen aesthetic.
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.

