Skip to content

dedalus-labs/wingman / .agents/skills/better-interface

better-interface

Verified

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.

FileKindSize
SKILL.mdskill md5.0 KB
color.mdmarkdown1.9 KB
interaction.mdmarkdown2.6 KB
layout.mdmarkdown1.5 KB
typography.mdmarkdown2.7 KB

typography.md

View on GitHub
# Typography

Text truncation, wrapping, Unicode alignment, and monospace rendering in terminal UIs.

## Truncation

Long text must truncate with ellipsis, never wrap into a broken layout.

```tcss
/* Good — truncate with ellipsis */
.filename {
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
```

### Where to Truncate

| Content | Truncate? | Where |
| --- | --- | --- |
| File paths | Yes | From the left (`...rc/wingman/app.py`) |
| Chat messages | No | Let them wrap within the message area |
| Status text | Yes | From the right with ellipsis |
| Titles/headings | Yes | From the right with ellipsis |
| Table cells | Yes | From the right, keep header visible |

## Wrapping

Within content areas (chat messages, descriptions), wrapping is expected.
Use Textual's default wrapping behavior. But:

- Never break mid-word for English text
- Code blocks should scroll horizontally, not wrap
- Wrap at the container boundary, not at an arbitrary column

## Unicode and Box Drawing

Terminal UIs use Unicode box-drawing characters for borders and trees.
Consistency matters:

- Use one weight: light (`─ │ ┌ ┐ └ ┘`) or heavy (`━ ┃ ┏ ┓ ┗ ┛`)
- Don't mix rounded (`╭ ╮ ╰ ╯`) with square corners in the same widget
- Tree connectors: `├── └── │` — be consistent with trailing spaces

### Width Issues

Some Unicode characters are double-width in terminals (CJK, some emoji).
This breaks alignment in tables and fixed-width layouts.

```python
# Good — use unicodedata to measure actual display width
import unicodedata

def display_width(s: str) -> int:
    return sum(2 if unicodedata.east_asian_width(c) in ('W', 'F') else 1 for c in s)

# Bad — using len() for alignment
pad = " " * (20 - len(text))  # wrong if text contains wide chars
```

## Monospace Alignment

Terminal text is monospace, which makes alignment easy — if you respect it:

- Align columns with spaces, never tabs (tab width varies by terminal)
- Right-align numbers in columns
- Pad shorter strings to column width

```python
# Good — aligned columns
f"{'Name':<20} {'Size':>8} {'Modified':<12}"
f"{'app.py':<20} {'1.2 KB':>8} {'2024-01-15':<12}"

# Bad — no alignment
f"Name: {name} Size: {size} Modified: {modified}"
```

## Emphasis

In a terminal, you have limited tools for emphasis:

| Technique | Use for | Textual markup |
| --- | --- | --- |
| Bold | Section titles, key values | `[bold]text[/bold]` |
| Dim | Metadata, secondary info | `[dim]text[/dim]` |
| Color | Semantic meaning (see color.md) | `[#7aa2f7]text[/]` |
| Reverse | Selected items in lists | `[reverse]text[/reverse]` |

Never combine more than two: bold + color is fine, bold + dim + italic + color is noise.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall