interface-cheat-sheet
Skill1 starsChanged 21 days agoMITView on GitHub
A list of tips, improvements and best practices that quickly make your interfaces better.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-friendly-cliSkill
- anand-laptopsSkill
- anand-objectivesSkill
- anand-writing-styleSkill
- blind-spotSkill
- calendarSkill
- codeSkill
- data-analysisSkill
- data-storySkill
- data-vizSkill
- decision-compressionSkill
- designSkill
- devtoolsSkill
- evidence-provenanceSkill
- expert-lensSkill
- failure-redteamSkill
- generate-fake-dataSkill
- ideation-protocolSkill
- interactionsSkill
- interactive-storytellingSkill
- llmSkill
- meeting-prepSkill
- meeting-response-styleSkill
- memorable-explanationsSkill
- mental-modelsSkill
- pdfSkill
- possibility-scanSkill
- post-mortemSkill
- reframe-questionSkill
- stability-checkSkill
- verification-gateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 6 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use concentric border radius on nested elements.
- Very specific: line 14
Never use transition: all, name the exact properties that change instead.
- Distinctive: line 17
Use CSS transitions for interactions, because they can be interrupted.
- Distinctive: line 18
Disable all transitions: when changing theme from light to dark and vice versa.
- Very specific: line 19
Use will-change only for properties that are actually changing.
- Very specific: line 20
When you run into an issue with an element shifting randomly by 1-2px when animating, especially in Safari on iOS, add will-change: …
- Distinctive: line 21
When animating entrance, stagger elements by group or by invidivual elements.
- Very specific: line 26
Always use .woff2 on the web, never .ttf or .otf.
- Very specific: line 27
Use font-variant-numeric: tabular-nums on every value that changes and in tables: timers, counters, prices, data columns.
- Very specific: line 29
Use text-wrap: balance on headings, text-wrap: pretty on descriptions, neither in long-form text.
- Very specific: line 30
Use overflow-wrap: break-word where long words, links or IDs can escape.
- Very specific: line 41
Never name a token for its appearance or its first use: --color-accent-solid, not --color-blue-button or --color-sidebar-gray.
- Very specific: line 51
Use semantically correct native elements: <button> for buttons, <a> for links, never a plain <div> when you can use a native element.
- Very specific: line 53
Only use tabindex="0" and tabindex="-1" — positive values break the natural tab order.
- Very specific: line 55
Write alt text by purpose: alt="Search" on a search button, not alt="magnifying glass".
- Very specific: line 60
Use at least a 24x24px hit-area, 44x44px on touch and 40x40px on desktop where possible.
- Very specific: line 61
Use pointer-events: none on decorative elements like glows and gradients so they never swallow clicks meant for control.
- Very specific: line 62
Put hover styling behind @media (hover: hover).
- Very specific: line 64
Use role="status" for routine updates and role="alert" only for urgent errors.
- Very specific: line 66
Make sure the skip-to-content link is the first focusable element and add scroll-margin-top on anchored headings.
- Very specific: line 71
Use logical properties like margin-inline-start and padding-inline-end instead of left and right.
- Distinctive: line 72
Don't use fixed widths or heights on text containers.
- Distinctive: line 76
Start button labels with a verb: “Save draft” or “Delete project”, never “OK!” or a bare “Yes”.
≈ “Common” is an estimate: at least 1 in 5 of the 383,637 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.
Files
User Interface
- Use concentric border radius on nested elements.
- Align for optical alignment, not geometric alignment.
- Give images a
1pxoutline, offset by-1px: black at8%opacity in light mode, white at8%in dark mode.
Animation
- Never use
transition: all, name the exact properties that change instead. - Slightly scale down buttons to a value between
0.95and0.98when pressed withtransition: scale 200ms ease-out. - Cross-fade icons when they swap. The entering icon scales
0.25→1, opacity0→1and blur4px→0px. The exiting one reverses the same animation. - Use CSS transitions for interactions, because they can be interrupted. Use keyframes for sequences that only run once.
- Disable all transitions when changing theme from light to dark and vice versa.
- Use
will-changeonly for properties that are actually changing.transform,opacityandfilter. - When you run into an issue with an element shifting randomly by 1-2px when animating, especially in Safari on iOS, add
will-change: transformto the element. - When animating entrance, stagger elements by group or by invidivual elements.
- Don't animate high-frequency interactions such as color change of an item on hover in a list.
Typography
- Always use
.woff2on the web, never.ttfor.otf. - Use
font-variant-numeric: tabular-numson every value that changes and in tables: timers, counters, prices, data columns. Skip if you're already using a monospace font. - Cap long-form text at 60–75 characters per line.
- Use
text-wrap: balanceon headings,text-wrap: prettyon descriptions, neither in long-form text. - Use
overflow-wrap: break-wordwhere long words, links or IDs can escape;white-space: nowrapon labels and badges. -webkit-font-smoothing: antialiasedand-moz-osx-font-smoothing: grayscaleonce on the root, never per component.- Store copy in natural case and control the presentation with
text-transform. - Smart punctuation: curly quotes, an en dash for ranges, an em dash for asides, the single ellipsis character.
text-underline-position: from-fontwithtext-decoration-skip-ink: auto, so underlines clear the descenders.- Truncated text keeps the full value reachable in a tooltip or an expanded view.
Colors
- Every step in a color palette should have a purpose: page background, component hover, border, solid fill, body text. Don't add steps that nothing uses.
- Components should use semantic tokens (
--color-text-secondary), never primitives (--blue-500). The primitive is the raw value, the token is how the value is used. - Never name a token for its appearance or its first use:
--color-accent-solid, not--color-blue-buttonor--color-sidebar-gray. - Reserve
accentfor the brand color soprimarynever means both the brand and the main body text. - Don't reuse a token from another role just because it's the right color. When that role's color changes your element changes with it, so add a token for the new role instead.
- Measure contrast against the background the element actually renders on, not the page background.
- Dark mode palette is not the light palette reversed.
- Pick one theme switching mechanism:
prefers-color-schemeor a.darkclass and use it for every token. - You can define a gradient's interpolation space: use
in oklabfor even brightness,in oklchfor more vivid middle tones or neither which falls back to sRGB with a classic muted midpoint.
Accessibility
- Use semantically correct native elements:
<button>for buttons,<a>for links, never a plain<div>when you can use a native element. - Style
:focus-visible; don't useoutline: nonewithout a replacement. - Only use
tabindex="0"andtabindex="-1"— positive values break the natural tab order. - Give icon-only buttons a descriptive
aria-labeland never putaria-hidden="true"on a focusable element. - Write alt text by purpose:
alt="Search"on a search button, notalt="magnifying glass". Decorative images getalt="". - Give every input a real
<label>,typeandinputmode. - Never block paste; people paste passwords and one-time codes.
- A tooltip on a
disabledcontrol never opens for keyboard or touch. Put the explanation in visible text next to it, or usearia-disabled="true"to keep the control focusable. - Keep submit enabled until the request starts, then validate on submit:
aria-invalid="true",aria-describedbypointing at the error, focus on the first invalid field. - Use at least a
24x24pxhit-area,44x44pxon touch and40x40pxon desktop where possible. Make sure extended hit areas never overlap. - Use
pointer-events: noneon decorative elements like glows and gradients so they never swallow clicks meant for control. - Put hover styling behind
@media (hover: hover). On touch,:hoversticks after a tap and looks selected. - Wrap motion in
@media (prefers-reduced-motion: no-preference)so it only plays for people who haven't asked to reduce it. - Use
role="status"for routine updates androle="alert"only for urgent errors. - For status changes add an icon, a label or an underline. Status changes should never use color alone.
- Make sure the skip-to-content link is the first focusable element and add
scroll-margin-topon anchored headings.
Layout
- The gap between groups is at least twice the gap inside one:
8pxwithin,16px+ between. - Use logical properties like
margin-inline-startandpadding-inline-endinstead of left and right. - Don't use fixed widths or heights on text containers.
Writing
- Start button labels with a verb: “Save draft” or “Delete project”, never “OK!” or a bare “Yes”.
- Repeat the consequence in confirmation buttons: “Delete project” next to “Cancel”.
- Pick one word per flow and keep it for every step: “Continue” or “Next”, never both.
- Describe the destination in link text: “Read docs”, never “Click here”.
- Capitalize buttons, headings and labels the same way everywhere. Sentence case is the safer default.
- Label toggles with the state they turn on: “Send read receipts”, never “Disable read receipts”.
- Orient the reader in empty states and offer one next action instead of “No results”.
- Address the reader as “you”, not “the user”.
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
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.

