agentleFS
humbleteamhumbleteam/design-handoff/SKILL.md

design-handoff

Skill1 starsChanged 4 months agoMITView on GitHub

Turns a mockup, screenshot, or HTML file into a dev-ready handoff spec - layout measurements, a token map, a component-state inventory, accessibility notes, and numbered open questions. Use for "write a handoff spec for this screen", "turn this mockup into dev docs", "document component states", or "what tokens does this screen use". Not for critiquing design quality or generating new UI - see design-review or html-mockup.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use design-review and frontend-design.

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

    design-review

    Also in 3 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no token set is given, say so in the output and derive a draft one from the mockup itself (see Step 3).

    line 17
  2. Distinctive:

    Do not guess it.

    line 28
  3. Distinctive:

    Do not derive it by "reasonable default" (no darkening a color 10% for a hover guess, no assuming a 200ms fade because that's common).

    line 29
  4. Very specific:

    Write OPEN QUESTION and add it to section 8, numbered, tagged BLOCKING or NON-BLOCKING.

    line 30
  5. Distinctive:

    If a token set was provided, match each observed value to the nearest existing token.

    line 48
  6. Very specific:

    If no token set was provided at all, every row is NEW-TOKEN - draft a full proposed set, and say plainly in the spec that none of it is …

    line 50
  7. Distinctive:

    Every image, icon, or illustration that needs export: recommended format (SVG for icons and illustrations, PNG or WebP for photos), and …

    line 85

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

Design handoff

Turn a finished mockup into a spec a developer can implement without asking you a follow-up question for anything that was actually visible in the source - and without you inventing an answer for anything that wasn't.

Input

Accept any of:

  • One or more mockup images or screenshots, pasted into chat or given as file paths.
  • An HTML file or a URL to a live page.
  • An optional token set: a CSS file with custom properties, a JSON token file, or a plain description of existing design tokens (palette, type scale, spacing ramp, radii, shadows).

If no token set is given, say so in the output and derive a draft one from the mockup itself (see Step 3).

Output

One markdown file per screen, named <screen-slug>-handoff.md, following the eight-section structure in references/handoff-template.md. Read that file for the exact skeleton to copy before writing the first spec.

Decide screen count first. If two or more inputs show the same layout with only a component's state changed (a button in default and hover, a form before and after an error), that is ONE screen - merge the evidence into section 4 of a single spec. The same layout in a second theme (light and dark) is also ONE screen - see Edge cases for how the token map carries both. If the inputs show different screens, routes, or breakpoints, write one spec file per screen. For a screen supplied at multiple breakpoints, write one file per screen and add a subsection per breakpoint under section 2 (Layout) rather than duplicating the whole file. Theme and breakpoint are the two declared conditions one spec can carry at once; sections 1, 3, 4, and 6 each carry them differently - see Edge cases.

The spine: never invent what you can't see

This is the rule every other step serves. If a value, state, or behavior is not directly visible in the source material:

  • Do not guess it.
  • Do not derive it by "reasonable default" (no darkening a color 10% for a hover guess, no assuming a 200ms fade because that's common).
  • Write OPEN QUESTION and add it to section 8, numbered, tagged BLOCKING or NON-BLOCKING.

A spec with ten open questions because the source only shows one state is doing its job. A spec with zero open questions because you filled every gap with a plausible guess has failed at the one thing it exists to do.

Steps

1. Screen summary

Record dimensions (from image size, HTML viewport, or a stated breakpoint - mark (estimated) if inferred from proportions rather than measured), a one-sentence purpose, and how many source images or files fed this spec. A spec covering more than one breakpoint records one named dimensions line per breakpoint: a single line cannot describe two viewports, and picking one silently drops a measurement the source actually gave you.

2. Layout

Walk the screen in reading order (top to bottom, left to right within a row) and list every region: name, position or size, internal padding, and the gap to the next region. Use whatever units the source supports - exact pixels from HTML/CSS, or (estimated) proportions from a static image. If two sources of the same screen show conflicting spacing (e.g., two screenshots at slightly different padding), flag the conflict explicitly in this section. Do not average the two values and do not silently pick one. A conflict means two sources claim the same condition - same theme, same breakpoint - and disagree. Two sources showing different values under different declared conditions are variants of one screen, not a conflict, and they belong in the per-condition columns described in Edge cases.

3. Token map

List every color, font, spacing value, corner radius, and shadow that appears on the screen, with four columns: property, observed value, mapped token, status. One row per property - per role a token would name - and each role appears exactly once.

  • If a token set was provided, match each observed value to the nearest existing token. Use a small tolerance (a few px for spacing, a close visual neighbor for color) - if nothing matches within that tolerance, the value is new.
  • Values with no match get NEW-TOKEN: <proposed-name> in the mapped-token column, following the naming convention of the existing tokens if one is visible (e.g., color-<role>, space-<n>, radius-<size>), or a plain role-based kebab-case name if there is no existing convention to follow.
  • If no token set was provided at all, every row is NEW-TOKEN - draft a full proposed set, and say plainly in the spec that none of it is confirmed against a real system yet.
  • A spec covering more than one declared condition - two themes, or two breakpoints - splits the observed-value column into one column per condition and keeps one row per property. "Exactly once each" counts rows, not observed values: the property appears once, carrying every value the source showed for it.
  • One value serving two roles is two rows, one per role, and the repeated value is the point. A row is what a token names, so the row count follows the roles rather than the hexes: a card surface and a button label that are both #FFFFFF are two roles, two rows, two proposed names, and the duplicated value in the observed column is the evidence that they coincide on this screen. Collapsing them into one row loses the thing the developer came for - which token to reach for at each place - and naming one token for both asserts that the system wants them tied together, which is a claim about the design system and not a reading of the screen. Say so in the status column instead: each row proposes its own role-based name, and whether the two should resolve to one underlying value is an open question when no token set was supplied. Two rows carrying the same hex are not the near-duplicate drift a token audit flags, because they are identical by intent rather than by accident; the drift case is two values a few steps apart in one role. Under two declared conditions the per-condition columns can answer the open question instead of leaving it open. Two roles that share a value in one theme and carry different values in the other are not tied, and the screen proves it: keep the two rows, close the question with the theme that diverged as its evidence, and do not propose one token for both. Two roles that share a value in every supplied condition stay an open question, because agreement across the themes on hand is still a coincidence the system may not intend.

4. Component inventory

For every distinct interactive element (buttons, inputs, cards, nav items, toggles, and so on), enumerate exactly these eight canonical states: default, hover, focus, active, disabled, loading, empty, error.

For each state, mark one of:

  • A concrete spec line (fill, label, border, icon), only if that state is actually visible in the source.
  • not applicable with a one-clause reason, and the reason is a fact about the artifact rather than about this render of it (a static label has no hover state; a button with a fixed label holds no content that can be empty). A list, a results area or a cart is the other branch however it was photographed - one item today is not a claim that it cannot be empty tomorrow, and whether the content can be absent is the flow fact section 8's empty paragraph hands to an open question.
  • OPEN QUESTION #n if the state is plausible for this component but isn't shown.

If the source shows only a default state for a whole screen, say that plainly at the top of this section ("Source shows default state only - states table below is mostly open questions by design") rather than padding the table with invented hover and focus colors.

A screen carrying more than one declared condition keeps one row per state and splits the two columns instead, the same move section 3 makes with its observed-value column: Visible in source? (light) / Visible in source? (dark), or (375) / (1440), and one spec line per condition. Three rules follow from it, and all three are the spine applied to a table that now carries more than one source per row:

  • A state shown under one condition and not the other reads yes / no, and its spec line covers only the condition it was actually seen in.
  • The other condition is an OPEN QUESTION, never the first condition's values reused. A fill read off the light screenshot is the light fill, and the dark one is unobserved until a dark screenshot shows it. Carrying it across is the same invention as guessing a hover color, with the difference that it looks measured.
  • A state the source shows under every condition, identical in all of them, is written once with the conditions it covers named. One line for one observation is accurate; the same line copied per column claims the source was read twice.

5. Behavior notes

Transitions, scroll behavior (sticky headers, infinite scroll, parallax), and validation timing (on blur, on submit, on keystroke) - but only what the source directly shows or states in an annotation. An arrow icon implies navigation; it does not imply a transition style. Mark anything speculative as an open question instead of describing it as fact.

6. Accessibility annotations

  • Landmark roles inferred from visual structure (header, nav, main, list, button, dialog).
  • Accessible names proposed from visible text or, for icon-only controls, from the icon's meaning.
  • A proposed focus order matching reading order and visual hierarchy, numbered. Section 2 records reading order per breakpoint, so a spec whose breakpoint subsections walk the regions in a different order carries one numbered list per breakpoint, each naming its breakpoint. One list cannot describe two orders, and picking one silently drops an order the source gave, which is the failure the per-breakpoint dimensions line in section 1 exists to prevent. Breakpoints that share a reading order get one list naming the breakpoints it covers, and a theme never gets a list of its own, because a repaint does not move a region. This is the mirror of how the next bullet behaves under two conditions: contrast is checked once per theme and covers every breakpoint, per Edge cases, and focus order is written once per distinct breakpoint order and covers every theme.
  • Contrast ratios for every foreground/background text pairing the source actually renders, checked against WCAG 2.2 SC 1.4.3 (4.5:1 for normal text, 3:1 for large text) and SC 1.4.11 for non-text UI components. The pairings come from the evidence, and the token map supplies each side's value. Section 3 records one row per role, so there is no pairing in it to enumerate - a foreground and a background are two of its rows, and which of them meet is a fact about the screen rather than about the table. Two rows holding the same value are still two sides and not a pair: a surface and a label that share a hex meet different partners on the screen. Resolving section 3's open question later does not reach this section. If the two roles come back tied to one token, section 3's mapped-token column changes and the pairs do not: they were read off the screen, and one name for two roles does not move which foreground sits on which background. The ratios do not move either, because one token is only available where both rows already carried that value, which is the coincidence that raised the question. So both contrast rows stay, and the trap is reading one token as one row - the two sides meet different partners, so a surface backing dark body text and a label sitting on a primary fill are two pairs with two ratios, and collapsing them or dropping either one loses a pairing the screen shows, which reads as a pairing nobody checked. If the answer comes back the other way, that the roles should diverge, that is a value some later screen will show rather than a reading of this one, so this spec's ratios stand and the divergence belongs to the spec written against that screen. Read the pairs off what the source shows: section 4's state rows, each of which names a fill and a label, and the screen's own text sitting on the surface it sits on from sections 1 and 2. Crossing every text color in the token map with every background in it instead is the failure this bullet is written against: it manufactures combinations the screen never showed - a muted helper color on a CTA fill it never touches - and a spec that reports a ratio for a pair nobody can see has invented the pair, which is what the spine bans. A value the source carries but never pairs with anything, a fill with no text on it, is a token-map row and not a contrast row. If the exact hex can't be extracted from the source, say the ratio is estimated and flag it as an open question if it's close to the threshold.
  • A disabled control's own colors are exempt, and the exemption is the criterion's, not a concession. SC 1.4.3 excepts text that is part of an inactive user interface component under Incidental, and SC 1.4.11 excepts inactive components in the same words, so neither has a ratio to fail. This is not an edge case here: section 4 enumerates disabled for every component, so its fill and label reach the token map on most screens, and "every pairing in the token map" then walks them into a check they were never subject to. The finding that produces is worse than noise - a greyed label reported as a 2.1:1 failure gets fixed by darkening it until it passes, which removes the one visual signal that the control is unavailable, so the spec would be asking a developer to break the state it just documented. Write the row with the ratio computed and exempt - inactive component (SC 1.4.3 Incidental, SC 1.4.11) in place of a pass or fail verdict. The row stays, because a pairing missing from section 6 reads as one nobody checked, and that is the same gap a missing section 4 row leaves. Three boundaries: the exemption covers the inactive component's own text and visual information and nothing around it, so a helper line or error message sitting beside a disabled control is ordinary text and is checked; it is keyed to the state and not the component, so the same button's default, hover and focus rows are checked normally; and it needs the control to be genuinely inoperable, since a control that is merely styled muted while remaining operable is active, and calling it exempt is the invention the spine bans. Where the source does not say which it is, that is an OPEN QUESTION rather than an assumed exemption.

7. Assets list

Every image, icon, or illustration that needs export: recommended format (SVG for icons and illustrations, PNG or WebP for photos), and size(s) - a single file for vector, a density ladder for raster.

Format is a recommendation and may be written as one. Two things in this section are not recommendations, and the spine applies to them exactly as it does everywhere else:

  • Which density ladder a raster asset needs. That depends on the platforms being built for, and a mockup does not name them. Write @1x/@2x/@3x only when the source or the brief states the target platforms. Otherwise write it as the stated default and raise an OPEN QUESTION on the platforms, because a web-only build and an iOS build do not export the same set.
  • Whether an element is an exported asset at all. A chevron, a divider, a gradient, or a rounded avatar frame may be an SVG file, an icon-font glyph, or drawn entirely in CSS, and a static image cannot tell you which. Where it is ambiguous, raise an OPEN QUESTION rather than listing the row as an export or leaving it out. A missing row reads as "no asset needed", and that is a decision the source never made.

8. Open questions

Collect every OPEN QUESTION raised in sections 2 through 7 into one numbered list. Tag each:

  • BLOCKING - implementation cannot proceed correctly without an answer.
  • NON-BLOCKING - implementation can proceed with a stated reasonable default, revisit before ship.

The stated default is the whole of the second tag, so write it into the question. NON-BLOCKING means the line itself says what gets built while the answer is outstanding, and a default is statable from exactly two places: a standard this spec already cites, or not building the thing at all. An unshown focus ring takes the first - section 6 cites WCAG 2.2 SC 2.4.7, a visible indicator is required, so the floor is the standard's and only the treatment is open. An unshown disabled, loading, empty, or error state takes the second - the question is whether the state exists in the flow, and nothing is built until it is answered. An unshown hover or active fill has neither: the state exists whatever the build does, so there is nothing to leave out, and a fill derived from the default fill is the guess the spine bans. That is BLOCKING.

The roster is every state section 4 enumerates, under the names section 4 uses, and it is complete on purpose: hover and active are the two with no statable default, focus has the cited standard, and disabled, loading, empty and error are the four whose question is whether the state exists at all. Default is observed or the spec has no section 4 row to write. A state missing from this list would reach section 8 with no test to decide its tag, and the only tag available without a statable default is BLOCKING, so the gap does not read as a gap - it reads as a blocking count one higher than the screen earns, which is the number the closing status line calls the real signal.

empty is the one state the artifact itself most often answers. A component that holds no variable content cannot have an empty state, so section 4 closes the row with not applicable and its one-clause reason and nothing reaches section 8. The question only arrives for a component that does hold content - a list, a results area, a cart, a notification panel - shown with content in it and never without, and then it is a flow fact like the other three: the default is that no empty-state treatment is built until someone says the content can be absent.

Two moves are illegal, and both produce a count nobody can check. A NON-BLOCKING question with no default written out is tagged by feel: the reader cannot tell what proceeding looks like, and the line reads as reassurance. A question whose own text says the answer is needed before the build, or before a style can be specified, is BLOCKING whatever tag it carries - the sentence and the tag cannot disagree. Sort by the test, not by how the question feels: an unshown hover fill and an unshown active fill are the same question twice and take the same tag.

Number continuously across the whole spec (the numbers referenced inline in sections 2-7 must match this list).

The range is 2 through 7, not 2 through 6. Section 7 is where the source is most often silent - target platforms and CSS-versus-asset calls are decisions a mockup does not record - and a question raised there needs the same numbered home as any other. Anything with nowhere to be collected gets written as fact instead, which is the failure this section exists to prevent.

Edge cases

  • Only one state shown for the whole screen. Expected outcome, not a failure - the component inventory will read mostly OPEN QUESTION. Say so explicitly rather than inventing hover/focus/active to make the table look complete.
  • No token set provided. Derive a full draft token set from the mockup and mark every single row NEW-TOKEN (proposed). Never present a derived value as if it matched an existing system that wasn't given to you.
  • Conflicting spacing or color across two references of the same screen. Flag the conflict in the relevant section with both values named. Do not average, and do not pick one without saying you picked one and why.
  • Low-resolution or cropped screenshot. Mark affected values (estimated). If the uncertain value would change an implementation decision (a token match, a contrast ratio near the WCAG threshold), add it to open questions instead of stating it as fact.
  • HTML input with both inline styles and CSS classes on the same element. Prefer the computed/rendered style over a raw inline attribute when they conflict; note the conflict in section 3 if it affects a mapped token.
  • A component that only appears once and has no clear interactive affordance (e.g., a static badge). Skip section 4 for it entirely rather than filling in eight rows of not applicable.
  • The same screen supplied under more than one declared condition - light and dark theme, or two breakpoints such as 375 and 1440. One screen, one spec file. Split the observed-value column of section 3 into one column per condition (Observed (light) / Observed (dark), or Observed (375) / Observed (1440)) so each property keeps a single row and a single token name carrying every value. A value that differs across conditions is a variant, and a value present under only one condition is a NEW-TOKEN for that condition. Neither is a conflict, and neither triggers the conflict rule above, which fires only when two sources claim the same condition and disagree. This matters more than tidiness: card padding of 16px at 375 and 32px at 1440 filed as a conflict sends the developer back with a question that has no answer, and filed as one row with one value hands them the wrong build at the other breakpoint. Section 6 then checks contrast once per theme, not once per pair: a foreground and background that clear 4.5:1 on a white surface can fail on the dark one, and a single ratio hides it. Breakpoints do not change color, so one check per theme covers every breakpoint. Section 6's focus order runs on the other axis: a breakpoint moves regions and a theme does not, so the numbered order is written once per breakpoint whose section 2 reading order differs and covers every theme. Contrast and focus order split on one axis each, and neither is borrowed for the other. Section 4 splits as well: one row per state, with Visible in source? and the spec line carried per condition, because a state photographed only in light is unobserved in dark and a value copied across conditions reads as measured when nothing measured it.

After writing

State plainly at the end of your reply: how many spec files you wrote, how many open questions total, and how many of those are BLOCKING. That count is the real signal for whether this screen is ready to build.

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.