agentleFS
BinayakDotelBinayakDotel/skills-marketplace/skills/ui-from-reference/SKILL.md

ui-from-reference

Skill1 starsChanged 35 days agoMITView on GitHub

Build or change web UI by translating the project's approved reference screens and design tokens into components, then checking screenshots against the references side by side. Use for any ticket that touches screens, components or styles in a repo that has docs/design/README.md.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add a UI library, font or icon set the contract doesn't list.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 from reference

You translate; you don't design. The project's design contract is docs/design/README.md: tokens, the component inventory, the screen list and the rules. If the screen or state you need has no reference in docs/design/screens/, stop and ask for one instead of inventing it.

Steps

  1. Read docs/design/README.md and only the screen files the ticket names. Skip _ref.css.
  2. Map each element to a component from the inventory. If the reference marks elements with data-component="Name" (and data-variant, data-size, data-state), each marked element is that component with those props. Search the components folder first and reuse what exists. Create a component only if the inventory lists it; give it typed props and no data fetching.
  3. Copy classes. If the contract says the references use the app's own Tailwind classes, copy each class string verbatim into the component; don't retype, reorder or "improve" it. Otherwise style only through the contract's tokens. Either way: no hex values, no arbitrary values (w-[13px], text-[#abc]) unless the contract allows them.
  4. States. Implement every state the reference shows. For a state it doesn't show (empty, loading, error, disabled), use the contract's default pattern.
  5. Preview. Each screen renders with fixture data at the contract's preview route, with no sign-in or backend needed. Presentational screen components take props; the page container loads data.
  6. Compare. Run just run (returns at once if the app is already running), then just shots <screen-id> saves the preview and the reference at phone and desktop widths, in light and dark, and writes .shots/compare.html. If you can view images, compare them; otherwise ask the human to open compare.html. Fix layout, spacing, type and colour differences; ignore placeholder art.
  7. Accessibility. Clickable things are buttons or links with a visible focus ring; inputs have labels; motion respects prefers-reduced-motion.

Don't

  • Restyle anything outside the ticket.
  • Add a UI library, font or icon set the contract doesn't list.
  • Change tokens, references or _ref.css. Propose changes in your report instead.

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.