agentleFS
revizahoshii-norevizahoshii-no/agent-skill-project/skills/interface-craft/SKILL.md

interface-craft

Skill1 starsChanged 24 days agoMITView on GitHub

Build or refine production-ready browser interfaces with semantic structure, complete states, deliberate hierarchy, and working interactions.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brainstorming.

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.
  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

42 rules. 0 are common, 37 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 37

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify keyboard, focus, touch, and reduced motion.

    line 33
  2. Distinctive:

    Use native elements before custom roles.

    line 38
  3. Distinctive:

    Use buttons for actions and anchors for navigation.

    line 39
  4. Distinctive:

    Keep DOM order aligned with reading and focus order.

    line 41
  5. Distinctive:

    Use cards only when grouping or interaction requires a boundary.

    line 42
  6. Distinctive:

    Remove sections and controls that have no real job.

    line 43
  7. Distinctive:

    Every enabled control must perform a real action.

    line 47
  8. Distinctive:

    Every relevant control needs:

    line 49
  9. Distinctive:

    Use a small token set:

    line 66
  10. Distinctive:

    Keep native wheel and touch scrolling.

    line 88
  11. Very specific:

    Prefer transform and opacity.

    line 92
  12. Very specific:

    Do not use transition: all.

    line 93
  13. Very specific:

    Do not leave broad will-change declarations active.

    line 94
  14. Distinctive:

    Do not delay ready content for an entrance sequence.

    line 95
  15. Distinctive:

    place focus inside the overlay.

    line 113
  16. Distinctive:

    keep Tab and Shift+Tab within the overlay.

    line 114
  17. Distinctive:

    remove every temporary style and inert state on close, route change, or unmount.

    line 117
  18. Very specific:

    Do not apply overflow: hidden without testing scroll restoration, layout shift, nested scroll, and iOS touch behavior.

    line 120
  19. Distinctive:

    Keep selection and callouts available for:

    line 132
  20. Distinctive:

    Use scoped CSS rather than global JavaScript blockers:

    line 138
  21. Very specific:

    Do not block copy, contextmenu, keyboard shortcuts, or paste globally.

    line 158
  22. Distinctive:

    Do not communicate status by color alone.

    line 170
  23. Distinctive:

    Use whitespace to group and separate content.

    line 175
  24. Distinctive:

    Keep the active palette restricted.

    line 176
  25. Distinctive:

    Use typography for hierarchy, not decoration.

    line 177
  26. Distinctive:

    Avoid uniform card grids when content importance differs.

    line 178
  27. Distinctive:

    Avoid decorative badges, repeated arrows, fake terminals, generic gradients, and default three-step sections.

    line 179
  28. Distinctive:

    Use shadow, glow, glass, patterns, and texture only with a written purpose.

    line 180
  29. Distinctive:

    Keep one repeated identity motif.

    line 181
  30. Distinctive:

    Keep checkbox and radio labels within the hit area.

    line 188
  31. Distinctive:

    Keep submit available until the request begins.

    line 190
  32. Distinctive:

    Keep tokens in one source of truth.

    line 195
  33. Distinctive:

    Prefer grid and flex over layout measurement.

    line 196
  34. Distinctive:

    Avoid transition on all properties.

    line 197
  35. Distinctive:

    Do not patch source or CSS through string-replacement scripts.

    line 199
  36. Distinctive:

    Do not add code comments unless the user explicitly requests them.

    line 200
  37. Distinctive:

    Keep files and component names descriptive.

    line 201
  38. Distinctive:

    No fabricated content or claims.

    line 206
  39. Distinctive:

    No broken theme or state.

    line 207
  40. Distinctive:

    No inaccessible custom control.

    line 208
  41. Distinctive:

    No layout that depends on hidden overflow.

    line 213
  42. Distinctive:

    No visual decision that lacks a reason.

    line 214

“Common” is measured: kept by at least 6 in 10 of the 16 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

Interface Craft

Use when

  • implementing a visual design in HTML, CSS, JavaScript, or a frontend framework;
  • refining hierarchy, spacing, typography, transition choreography, or interaction feedback;
  • building drawers, dialogs, overlays, scroll locking, focus return, or direction-aware reveals;
  • preventing accidental mobile selection, touch callouts, tap flashes, or image dragging on interface chrome;
  • completing component states and behavior;
  • replacing template-like UI with content-driven composition.

Required input

  • approved direction or a clearly labeled draft direction;
  • real content or honest placeholders;
  • target stack and viewport range;
  • known routes, interactions, and protected contracts.

Implementation order

  1. Build semantic structure and source order.
  2. Apply design tokens.
  3. Establish layout and responsive reflow.
  4. Add real interactions.
  5. Add complete states.
  6. Add purposeful motion.
  7. Verify keyboard, focus, touch, and reduced motion.
  8. Run browser checks.

Structure

  • Use native elements before custom roles.
  • Use buttons for actions and anchors for navigation.
  • Give each page a language, unique title, landmarks, primary heading, and logical heading order.
  • Keep DOM order aligned with reading and focus order.
  • Use cards only when grouping or interaction requires a boundary.
  • Remove sections and controls that have no real job.

Interaction completeness

Every enabled control must perform a real action. Valid actions include navigation, state change, form submission, dialog operation, download, or an external destination.

Every relevant control needs:

  • default state;
  • hover state;
  • visible focus state;
  • active state;
  • disabled state when applicable;
  • accessible name;
  • pointer and touch affordance;
  • keyboard operation.

Dialogs must manage focus and close with Escape. Destructive actions need confirmation or undo.

Motion choreography

Motion must explain state, direction, hierarchy, or continuity. Do not animate merely because an element exists.

Use a small token set:

:root {
  --ease-premium: cubic-bezier(.16, 1, .3, 1);
  --motion-fast: 180ms;
  --motion-state: 380ms;
  --motion-reveal: 700ms;
}

Preferred patterns:

  • state change: opacity and a 4 to 12 pixel translation over 180 to 380 milliseconds;
  • section reveal: opacity plus a 24 to 48 pixel directional translation over 500 to 800 milliseconds;
  • stagger: 40 to 90 milliseconds between related children, capped so the last item does not feel delayed;
  • shared continuity: FLIP-style translation from measured origin to final position only when the two states represent the same object;
  • icon or label morph: overlap old and new states, then transition opacity, translation, scale, or rotation;
  • scroll reveal: use IntersectionObserver; do not run layout work on every scroll event;
  • direction-aware reveal: enter from below while scrolling down and from above while scrolling up;
  • replay: default to once; replay only after the element has fully left for a meaningful interval or when repetition explains navigation.

Keep native wheel and touch scrolling. Do not add inertial scrolling or lerp over the page unless the user explicitly requests it and accessibility has been evaluated.

Implementation rules:

  • Prefer transform and opacity.
  • Do not use transition: all.
  • Do not leave broad will-change declarations active.
  • Do not delay ready content for an entrance sequence.
  • Cancel or replace stale animations when state changes.
  • Preserve final state when animation is interrupted.
  • Under reduced motion, render the final state immediately or use one short opacity transition.

Overlay and scroll-lock contract

Classify an overlay before locking the page:

  • modal dialog, blocking drawer, and lightbox lock background scroll;
  • non-modal inspector, popover, tooltip, and toast do not lock the page by default.

A blocking overlay must:

  1. record the current page scroll position;
  2. compensate for scrollbar removal so the layout does not shift;
  3. lock the document without losing the recorded position, including mobile Safari behavior;
  4. mark background content inert;
  5. place focus inside the overlay;
  6. keep Tab and Shift+Tab within the overlay;
  7. close with Escape when closure is safe;
  8. restore the previous scroll position and trigger focus;
  9. remove every temporary style and inert state on close, route change, or unmount;
  10. contain touch overscroll inside scrollable overlay content.

Do not apply overflow: hidden without testing scroll restoration, layout shift, nested scroll, and iOS touch behavior.

Accidental-selection shielding

This is interaction shielding, not security. It prevents unintended blue selection, mobile touch callouts, tap flashes, and image dragging on interface chrome.

Apply shielding selectively to:

  • buttons, tabs, navigation labels, icon controls, drag handles, badges, and compact control cards;
  • decorative images and illustrations that are not intended for drag or save behavior;
  • labels whose long press would expose a browser copy or search callout instead of a useful action.

Keep selection and callouts available for:

  • articles, descriptions, addresses, reference values, code, logs, generated output, and other useful text;
  • inputs, textareas, contenteditable regions, and explicit copy targets;
  • any content whose selection is needed for accessibility or the primary task.

Use scoped CSS rather than global JavaScript blockers:

[data-ui-shield] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

[data-copyable],
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

Do not block copy, contextmenu, keyboard shortcuts, or paste globally. Do not describe this as copy protection.

Data and async states

A data view is incomplete without:

  • empty state that explains what to do next;
  • loading state that communicates progress;
  • error state that explains recovery;
  • success or ready state;
  • disabled or permission state when the workflow requires it.

Do not communicate status by color alone.

Visual discipline

  • One focal point per screen.
  • Use whitespace to group and separate content.
  • Keep the active palette restricted.
  • Use typography for hierarchy, not decoration.
  • Avoid uniform card grids when content importance differs.
  • Avoid decorative badges, repeated arrows, fake terminals, generic gradients, and default three-step sections.
  • Use shadow, glow, glass, patterns, and texture only with a written purpose.
  • Keep one repeated identity motif.

Forms

  • Visible label for every field.
  • Correct name, type, inputmode, and autocomplete.
  • Never block paste.
  • Keep checkbox and radio labels within the hit area.
  • Show errors near fields and focus the first invalid field.
  • Keep submit available until the request begins.
  • Preserve unsaved work or warn before navigation.

Code quality

  • Keep tokens in one source of truth.
  • Prefer grid and flex over layout measurement.
  • Avoid transition on all properties.
  • Avoid unnecessary libraries.
  • Do not patch source or CSS through string-replacement scripts.
  • Do not add code comments unless the user explicitly requests them.
  • Keep files and component names descriptive.

Completion check

  • No dead controls.
  • No fabricated content or claims.
  • No broken theme or state.
  • No inaccessible custom control.
  • Blocking overlays preserve scroll, contain focus, and restore both on close.
  • Interface chrome resists accidental selection without blocking useful text, input, copy, or paste.
  • Direction-aware reveals use bounded transforms and preserve their final state.
  • Reduced motion keeps every interaction complete and understandable.
  • No layout that depends on hidden overflow.
  • No visual decision that lacks a reason.

Human documentation: ../../docs/guides/interface-craft.md.

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.