Docs

Skills Craft

UI

Build, refine and review UI against a bar: the project's own, the user's, or this skill's default, rendering each state you touch and looking at it before calling it done.

Your agent loads it when the work comes up, or ask for ui by name.

Use for new pages, sections and components; dark mode; extracting components; improving or reviewing the frontend; picking a component, chart or state library; craft such as shadows, radius, optical alignment, hit areas, typography and hover states; and anything that moves: transitions, easing, springs, gestures, reduced motion, naming an effect. Triggers on 'build this page', 'improve the UI', 'review the frontend', 'add dark mode', 'this feels off', 'why does this look cheap', 'which library for', 'improve the animations', 'what's it called when', 'this animation feels wrong'.

Ships with bar.md, essentials.md, feel.md, libraries.md, motion, surfaces.md, typography.md.

Feedback loopable first. You can't judge an interface you haven't seen. Before you change it, make the state you're changing render on its own, with what decides it in the URL: the page, the record, the props, the theme, the breakpoint, the open menu. A playground route, a story or a query string all work; a state that only shows after six clicks doesn't. Then change, screenshot, look, and repeat. When the project has no way to log in, seed the state or take a screenshot, build that piece first; the setup skill holds the list.

A bar says what every UI change must meet. This skill finds the bar, then adds the craft under it: surfaces, type, feel, motion, which library to reach for, and how to change an interface without breaking it.

The bar

Take the first that exists. It's the whole bar; the others don't add to it.

  1. .ai/guidelines/ui.md in the project.
  2. ui.md in the user's Altitude folder: ~/.config/altitude/ui.md, or ~/.claude/altitude/ui.md while that still exists.
  3. bar.md, this skill's default.

Say which one you're working to. Where the bar and a craft file below disagree, the bar wins.

A session that edits UI without this skill may get the bar from Altitude's ui hook, which refuses its first UI edit once with the bar and essentials.md.

ui.sh

For a new page, section or component, or for UI ideas to pick from, check whether the user switched the ui.sh integration on: the Altitude server's whoami or settings tool reports it, and the ui.sh fetch tool is in the session, loaded or deferred. When both hold, run the ui-sh skill first; it fetches the design guidelines and brings you back here. When either is missing, carry on here without mentioning it.

Load

ForRead
Radius, shadows, optical alignment, hit areas, image outlinessurfaces.md
Wrapping, font smoothing, tabular numbers, tracking, leadingtypography.md
'Feels off', a general craft reviewfeel.md
A component library, chart, animation, state or styling dependencylibraries.md
Anything that movesthe Motion section below

A full pass on a page reads feel.md, surfaces.md and typography.md.

Per kind of work

  • Nav links or a logo centred on the page, not between the items beside them: three flex sections. Left flex flex-1 items-center, the centred group at its own width, right flex flex-1 items-center justify-end. Equal flex-1 gutters put the group on the page's true centre.
  • A request that goes against the bar or a craft file: say so once, with what the file recommends and why, then build what was asked. Never override in silence, either way.
  • Dark-mode images: a dark version of a raster image needs an image tool in the session. Without one, stop and say so. Never fake it with CSS filters.
  • Extracting components: reuse the project's components (its component library, Blade components, the existing components/ directory) before you create one. Scope is the files named or the feature just built, never the whole app, and the UI renders the same before and after: screenshot both and compare.

Motion

Work out which job the ask is, then load that job's file and nothing else. Every job but naming measures against motion/standards.md; quote its values exactly, never rounded.

Ask sounds likeJobLoad
'what's it called when...'Name itmotion/glossary.md
'what could animate here', 'make it feel alive'Find itmotion/finding.md + standards
'review this transition', 'is this animation any good'Review itstandards
'improve the animations', 'audit the motion'Plan itstandards + motion/plan-template.md
  • Start from restraint. Often the right animation is none. A candidate ships only when it passes all four gate questions in finding.md; for a whole app, five to seven at most, with the rejected ones listed.
  • Escalate hard: motion on an action started from the keyboard, transition: all, an entry from scale(0), ease-in on UI, over 300ms on an interactive element unless standards §4 lists the exception, keyframes on something that fires in quick succession, hover motion without a (hover: hover) gate.
  • Build on the repo's motion tokens, easing and duration; extend them, never add a second set.
  • Give every value exactly: the curve, the duration, the properties. 'A bit faster' isn't a value.
  • Prove motion with a recording or a frame strip, slowed the same way before and after, plus prefers-reduced-motion switched on. A still screenshot can't show timing.
  • Reviewing and finding don't touch source; building needs its own ask. Write a plan so a different, smaller agent can run it without this conversation.

How to work

  1. Read the code around the change first. Match the project's tokens, spacing scale, component patterns and names. Never start a second vocabulary beside them.
  2. Render the state, screenshot it before you change it, change it, screenshot it again.
  3. Change only what the ask covers. Something that works but looks wrong is named in the report and left.
  4. Say what changed and why. A diff of magic numbers with no reasons isn't a refinement.

Reviewing rather than fixing

Asked for a review instead of a change, report in one table, a row per issue:

BeforeAfterWhy

Call weak work weak and good work fine. Don't invent findings.

Verify

  • Every state you touched, rendered and looked at: both colour schemes, every breakpoint the bar names, each interaction state (hover, focus, empty, loading, error). Back each screenshot with a fact: a computed style, a DOM attribute, a measured size.
  • A recording for hover, focus, menus, transitions and anything with timing, with a real pointer that also passes over neighbouring elements.
  • The formatter, lint, type check and tests under 'Done means' in the project's guidelines pass.
  • Refining and extracting never change what the UI does.
  • Hand over with the URL that shows each state, and the screenshots inline. When you couldn't see the page, say so.

This page is built from resources/skills/ui/SKILL.md in Altitude 1.0.0.