跳到正文
cccskills
免费在 GitHub 公开

better-interface

Design engineering principles for making TUI interfaces feel polished. Use when building Textual widgets, reviewing TUI code, implementing transitions, focus states, alignment, spacing, or any visual detail work. Triggers on TUI polish, design details, "make it feel better", "feels off", layout alignment, color consistency, responsive sizing.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(5)

  • SKILL.md5.0 KB
  • color.md1.9 KB
  • interaction.md2.6 KB
  • layout.md1.5 KB
  • typography.md2.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Details that make TUI interfaces feel better

Great TUIs rarely come from a single thing. It's a collection of small details that compound into a professional experience. Apply these principles when building or reviewing Textual/terminal UI code.

Quick Reference

CategoryWhen to Use
LayoutAlignment, spacing, responsive sizing, content regions
ColorPalette consistency, contrast, semantic color usage
InteractionFocus management, key hints, modal flow, feedback
TypographyText truncation, wrapping, Unicode, monospace alignment

Core Principles

1. Consistent Spacing

Use a spacing scale (1, 2, 4 cells). Mismatched padding between related elements is the most common thing that makes TUIs feel off. Textual's padding and margin CSS properties use cell units.

2. Optical Alignment Over Grid Alignment

When geometric centering looks wrong in a terminal, adjust optically. Asymmetric Unicode characters (arrows, bullets) and mixed-width content need manual nudging. A centered title above left-aligned content often needs 1 cell of left padding removed.

3. Color Hierarchy

Use 3-4 color tiers consistently:

  • Primary: key actions, active focus (bright, saturated)
  • Secondary: labels, metadata (dimmed)
  • Muted: borders, separators (very dim)
  • Danger/Success: semantic states only (red/green)

Never use bright colors for passive elements. Reserve saturation for things the user needs to notice.

4. Focus is Sacred

The focused widget must be visually distinct at a glance. Use border color changes, not just cursor position. A user glancing at the screen should instantly know where input will go.

5. Responsive Layout

TUI must work at 80x24 minimum. Use fr units and max-width/ min-width in Textual CSS to adapt. Content that overflows should truncate with ellipsis, never wrap into garbage.

6. Feedback on Every Action

Every keypress that does something should produce visible feedback within one frame. If an operation takes time, show a spinner or status message immediately — don't let the user wonder if their input was received.

7. Subtle Transitions

Textual supports CSS transitions. Use short durations (150-300ms) for background color and opacity changes on hover/focus. Never animate layout properties (width, height) — terminal reflow is not smooth.

8. Border Consistency

Pick one border style and stick with it. tall for primary containers, round for cards/modals, heavy for emphasis. Mixing ascii, tall, round, and heavy in one screen looks incoherent.

9. Key Hints

Always show available keys in a footer or status bar. Format as key action pairs separated by thin spaces. Dim the keys relative to the actions. Update hints contextually as focus moves.

10. Content Density

Terminal space is precious. Default to dense layouts. Use blank lines only to separate logical groups, never for decoration. Single-line headers over multi-line. Abbreviate labels when the full form is obvious from context.

Common Mistakes

MistakeFix
Inconsistent padding between similar widgetsUse a spacing constant
Bright colors on passive/decorative elementsReserve bright for actions and focus
No visible focus indicatorAdd border color or background change on focus
Content overflows and wraps badlySet overflow: hidden with text-overflow: ellipsis
No key hints visibleAdd contextual footer with available actions
Large empty regions at default sizeUse fr units to distribute space
Mixed border styles in one viewStandardize on one style per element tier
No feedback on async operationsShow spinner/status immediately on action

Review Checklist

  • Spacing is consistent between related elements
  • Focused widget is visually distinct (border or background)
  • Color usage follows the 3-4 tier hierarchy
  • Layout works at 80x24 minimum terminal size
  • Long text truncates with ellipsis, never wraps into garbage
  • Key hints are visible and contextually updated
  • Every user action produces visible feedback
  • Border styles are consistent within each tier
  • No bright colors on passive elements
  • Transitions are short (150-300ms) and only on color/opacity

Reference Files

  • layout.md — Alignment, spacing, responsive sizing
  • color.md — Palette consistency, contrast, semantic usage
  • interaction.md — Focus management, key hints, modals
  • typography.md — Truncation, wrapping, Unicode alignment

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

commit

免费

Create a git commit with conventional commit format. Injects current git state automatically.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

greentext

免费

Explain system behavior, request flows, architecture, or implementation logic as short 4chan-style greentext lines. Use when the user asks for a step-by-step explanation, says "explain the logic", asks for "greentext", or wants terse sequential reasoning with each line starting with `>`.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

issue

免费

Create a GitHub issue using the wingman issue templates (bug, feature). Injects branch and commit context automatically.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

pr

免费

Create a pull request using the wingman PR template. Injects git state, commit history, and diff stats automatically.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

pr-review

免费

Review PR comments from GitHub. Fetches inline review comments and issue comments, classifies by blocking vs non-blocking, and summarizes actionable items.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

promote

免费

Create a changelog-style promotion PR between two branches. Use for release promotions or branch-to-branch merges with a structured changelog.

中文简介正在准备中。当前显示原文说明。

dedalus-labs/wingman1822026年4月25日 更新

查看 dedalus-labs 的全部技能

报告此技能的问题