This skill should be used when diagnosing, fixing, or understanding Unix terminal display issues including terminfo database problems, Unicode/UTF-8 character rendering, locale configuration, TUI application display, SSH terminal setup, and terminal emulator configuration. Use for garbled characters, wrong colors, broken box drawing, emoji rendering, and character encoding problems.
Diagnose and fix Unix terminal display issues: terminfo capabilities, Unicode/UTF-8 rendering, locale configuration, and terminal emulator setup. Covers colors, box drawing, emoji, SSH terminals, and TUI applications.
$COLORTERM detection and truecolor verificationTERM=tmux-256color setup and substrate-level tmux display issues — for tmux automation use tmux-devRun comprehensive diagnostics to identify terminal, locale, and environment issues:
python3 scripts/terminal_diagnostics.py
The diagnostic script checks:
When to use: Start with diagnostics when users report any terminal display issues.
For detailed terminfo troubleshooting, refer to references/terminfo_guide.md which covers:
Common operations:
# Check current terminal's capabilities
infocmp
# Test color support
tput colors
# Verify terminfo entry exists
infocmp $TERM >/dev/null 2>&1 && echo "OK" || echo "Missing"
# Compare terminal types
infocmp -d xterm-256color tmux-256color
# Create custom entry
infocmp xterm-256color > custom.ti
# Edit custom.ti
tic -o ~/.terminfo custom.ti
The terminal emulator implements the ANSI color protocol — 16 named colors, the 256-color palette, and 24-bit truecolor. Color tier support is independent of $TERM; $COLORTERM=truecolor signals 24-bit capability.
# Tier checks
echo $TERM # terminfo entry (xterm-256color, tmux-256color, ...)
echo $COLORTERM # "truecolor" or "24bit" → 16M colors supported
tput colors # numeric: 8, 16, 256, etc.
# Visual tests
printf '\e[31mRED\e[0m\n' # 16-color: red text
printf '\e[38;5;208mORANGE\e[0m\n' # 256-color: palette index 208
printf '\e[38;2;255;128;0mORANGE-truecolor\e[0m\n' # 24-bit: R=255 G=128 B=0
See references/ansi_colors.md for the full ANSI escape sequence reference, palette tiers, $COLORTERM detection, color-test tools (pastel, colortest), and terminal palette setup (base16, pywal).
For detailed Unicode guidance, refer to references/unicode_troubleshooting.md which covers:
Common fixes:
# Fix locale for UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Test Unicode rendering
echo "ASCII: Hello"
echo "CJK: 你好世界"
echo "Emoji: 😀 🎉 ✨"
echo "Box: ┌─┐│└┘"
# Fix box drawing (if showing as q, x, m, j)
export NCURSES_NO_UTF8_ACS=0
# Remove BOM from file
sed -i '1s/^\xEF\xBB\xBF//' file.txt
Capture terminal sessions as animated GIFs for GitHub/GitLab READMEs — the asciinema JS player is blocked in README renderers; rendered GIFs work everywhere.
Load references/terminal_recording.md for the full pattern: headless deterministic recording via a pacing library (say/run helpers), tuned agg rendering defaults, post-recording credential safety gate (grep for Bearer/JWT/UUID tokens — discard and re-record on any hit), and the record.sh scaffolder that materializes a self-contained recording setup into any target repo (target stays plugin-free after scaffolding).
Prerequisites: brew install asciinema agg
python3 scripts/terminal_diagnostics.py
Key information to verify:
| Symptoms | Domain | Reference |
|----------|--------|-----------|
| Wrong colors, broken function keys | Terminfo | references/terminfo_guide.md |
| Garbled text, emoji broken, box drawing issues | Unicode/UTF-8 | references/unicode_troubleshooting.md |
| Mouse click bindings not firing, wrong range value | tmux automation | Use tmux-dev skill (tmux_mouse_bindings.md) |
| Need to create/manage tmux sessions, set up logging | tmux automation | Use tmux-dev skill (tmux_session_management.md) |
Terminfo issues:
echo $TERM
export TERM=xterm-256color
tput colors # Should show 256
Unicode issues:
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale | grep UTF-8
Add fixes to appropriate shell config file:
.zshenv - Environment variables (LANG, PATH).zshrc - Interactive config (TERM overrides)# In ~/.zshrc or ~/.bashrc
if [[ -n "$SSH_CONNECTION" ]]; then
export TERM=xterm-256color
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
fi
# For tmux - add to ~/.tmux.conf
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# For screen - add to ~/.screenrc
term screen-256color
Then in shell config:
if [[ -n "$TMUX" ]]; then
export TERM=tmux-256color
elif [[ -n "$STY" ]]; then
export TERM=screen-256color
fi
python3 scripts/terminal_diagnostics.pyecho $TERMexport TERM=xterm-256colortput colors (should show 256)locale | grep UTF-8export LANG=en_US.UTF-8export NCURSES_NO_UTF8_ACS=0references/unicode_troubleshooting.mdlocale | grep UTF-8echo "😀 🎉 ✨"references/unicode_troubleshooting.mdterminal_diagnostics.py - Comprehensive diagnostic tool for terminal, locale, and environment (supports --json mode)tests/display_tests.py - Display consistency tests (Python-based)tests/base.py - Shared test infrastructureterminfo_guide.md — Terminfo database, $TERM selection, infocmp/tic/tput, terminal capabilitiesansi_colors.md — ANSI escape codes, 16/256/truecolor tiers, $COLORTERM, palette setup (base16), color-test toolsunicode_troubleshooting.md — Unicode/UTF-8 character rendering and encoding issuesterminal_recording.md — asciinema→GIF pipeline: headless recording, pacing library, agg defaults, credential safety gate, record.sh scaffoldernpx skills add totallyGreg/terminal-emulation下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer