agentleFS
postmeridiempostmeridiem/clide/.claude/skills/ui-design/SKILL.md

ui-design

Skill4 starsChanged 3 months agoMITView on GitHub

Visual design guide for clide UI development — covers theme tokens, surface-specific token selection, control geometry/spacing/alignment, and Phosphor icons. Use when building or modifying widgets, panels, pane chrome, status indicators, tabs, list items, dialogs, or any visual surface. Triggers on: new widget code, theme-related changes, "which token", "what color", color/background questions, visual inconsistency fixes, "alignment off", "spacing", "padding", control geometry questions, new panel/pane/view development, adding or looking up Phosphor icons, icon codepoints.

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use algorithmic-art, mcp-builder and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    algorithmic-art

    Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

    Also in 3 projects that use this

  • MicrosoftSkill

    mcp-builder

    Guide 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).

    Also in 4 projects that use this

  • MicrosoftSkill

    caveman

    Ultra-compressed response style that reduces output token count while preserving technical accuracy, with intensity levels and auto-clarity safety rules

    Also in 3 projects that use this

  • OpenAISkill

    systematic-debugging

    Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the reference that matches the question.

    line 27
  2. Very specific:

    All colors come from SurfaceTokens via ClideTheme.of(context).surface.

    line 34
  3. Very specific:

    Never use Material* or Cupertino* widgets or color constants — clide is WidgetsApp only (D-7).

    line 36
  4. Very specific:

    Use ClideText for themed text.

    line 38
  5. Very specific:

    Do NOT pull a dialog card's stripe or a simple card's config into the collapser, and do NOT nest collapsers — inside a run, tools render as …

    line 101

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UI design — clide visual surface guide

This skill bundles four concerns that all surface in widget work:

ConcernReferenceWhen to read
Token system, palette, typographyreferences/theme.mdDesigning or extending the theme pipeline; deciding whether to add a new token
Token selection per surfacereferences/surface.mdBuilding a new widget or modifying an existing one — "which token does this need"
Spacing, alignment, control layoutreferences/geometry.mdBuilding tab strips, list items, buttons, anything where icons sit next to text or padded edges
Phosphor icon usage and codepointsreferences/icons.mdAdding or referencing an icon
Full Phosphor glyph table (1512, with codepoints)references/phosphor-glyphs.mdPicking a specific glyph by name/look — find its codepoint, see if it's already defined

Read the reference that matches the question. They cross-reference each other where relevant; you don't need to read all four.

Universal rules

These apply across every reference and every surface:

  • All colors come from SurfaceTokens via ClideTheme.of(context).surface. Never hardcode Color(0xFF...).
  • Never use Material* or Cupertino* widgets or color constants — clide is WidgetsApp only (D-7).
  • Use ClideText for themed text; never bare Text in production widgets.
  • Typography sizes: clideFontMono for code/paths/IDs, clideFontCaption for status/section headers, body inherits from DefaultTextStyle.
  • Font family comes from the user-selectable facade, not a const: a monospace surface uses fontFamily: ClideSettings.fonts.monoOf(context) (and fontFamilyFallback: clideMonoFamilyFallback); the UI face is inherited via the root DefaultTextStyle, or ClideSettings.fonts.uiOf(context) when a widget must set it explicitly. clideMonoFamily / clideUiFamily are the facade's defaults — don't read them directly in new widgets (D-101). Same facade exposes ClideSettings.theme.of(context) and .i18n.of(context).
  • User-facing strings resolve through the catalog, never a hardcoded literal (D-21/D-102): ClideSettings.i18n.string(context, 'dotted.key', namespace: <ext id or 'core'>, placeholder: '<English>') (or .interpolated for templated). Add the key→English to assets/i18n/en_us/<namespace>.json. The placeholder is the English fallback; the extension's own id is its namespace (framework chrome uses core). Contribution manifests carry titleKey/labelKey for the same reason.

Localization & string length (D-21/D-102)

  • Config / layout. Catalogs are bundled assets at assets/i18n/<locale>/<namespace>.json — the locale is a directory (en_us, nl_nl, nl_be, en_eu, …); a new language is a new folder of the same namespace files. The active language is app.locale (Settings → Appearance → Language), applied live by root_shell via i18n.setLocale; add the Locale to availableLocales in main.dart and a folder under assets/i18n/. en_US is default; nl_NL ships.
  • Design for length variation. Translations are not the same width — Dutch runs ~20% longer than English, German more. So never hard-size a surface to its English label. Tight surfaces (status-bar items, chips, buttons, tab titles, menu items) must tolerate ~30% growth: let them wrap, ellipsis, or Flexible/Expanded, not a fixed width tuned to English. When you add or translate a label, sanity-check the length delta on those tight surfaces (an *.semantics label is screen-reader-only, so its length never deforms layout). A quick audit: compare len(nl)/len(en) per key and eyeball the short-but-grew cases on real (non-semantics) surfaces.

Conversation-panel cards (T-305)

The Claude conversation stream has three card categories. They are NOT one shared wrapper widget — each is its own widget; they only share the spacing constants in lib/widgets/src/clide_card_metrics.dart (kClideCardGap, kClideCardRadius, kClideCardHeaderPadH/V, kClideCardCounterSlotWidth) so the stream reads as one rhythm. Change spacing there, not per-card.

  1. Dialog cards — ConversationCard with a speaker side stripe (you / claude / agent). Prose/attribution; not collapsible.
  2. Simple cards — a single item shown fully open, never collapses (e.g. the image card). Standalone display; no chevron, no status chrome.
  3. Collapsibles — ClideCollapserCard (lib/widgets/). Every tool use is one, over a list of 1..N inner item cards (a single tool = a 1-item list; there is no separate single-card path). Rules:
    • Whole card toggles; chevron hard against the left edge, the status tick (spinner/check/cross) hard against the right edge, the count in a fixed-width slot just inboard of it.
    • color drives the border + chevron/label tint (per-instance fidelity).
    • Collapsed ticker echoes the run's last content line as the title + count + aggregate status (computed by the caller, bubbled up from items).
    • Inner item cards are content + their own per-item status; they pass margin: EdgeInsets.zero-ish (a bottom margin matching the canvas) so the collapser pads the inner canvas evenly on all sides — never let an inner card jam under the header or against a frame edge.

Do NOT pull a dialog card's stripe or a simple card's config into the collapser, and do NOT nest collapsers — inside a run, tools render as the bare inner content card (_ConversationTurn(collapseTools: false)).

Anti-patterns (cross-cutting)

  • Borrowing another surface's token (sidebarBackground for hat bar) — give each surface its own token even if they share a palette key. See theme.md.
  • Hardcoded hex colors → use a token. See surface.md for which one.
  • fontSize: 14 literal → use clideFontCaption or clideFontMono.
  • fontFamily: 'JetBrainsMono' literal → use clideMonoFamily.
  • Stacking edge padding on a padded parent + a padded child action → see geometry.md "no double edge padding".
  • Eyeballing pixel margins instead of working back from the constraint — the math matters; see geometry.md "uniform inner spacing".

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.