agentleFS
madebymustafamadebymustafa/design-taste/skills/taste-code-craft/SKILL.md

taste-code-craft

Skill1 starsChanged 3 months agoMITView on GitHub

Code-level craft for agent-built UI: semantic HTML, token-driven CSS (no hardcoded values), specificity discipline, component hygiene, zero inline styles, no dead code. The engineering half of "designed, not generated" — a beautiful page is betrayed by sloppy markup. Use when generating or auditing any frontend code. Stack on the design-taste core skill.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 1 is distinctive, and 8 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.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the element that means the thing: <nav>, <main>, <section aria-labelledby>, <figure>, <time>, <button> (not a <div> with a click …

    line 23
  2. Very specific:

    Every <img> has alt (empty alt="" only when decorative) and explicit width/height to prevent layout shift.

    line 25
  3. Very specific:

    If the page has no <main>, one <section> without a heading, or a clickable <div>, it fails.

    line 27
  4. Very specific:

    Every color, spacing value, radius, shadow, and font size comes from a variable — zero hardcoded hex values in component rules.

    line 31
  5. Distinctive:

    When a design system exists (taste-design-system), components consume semantic tokens — never reach past them to primitives.

    line 35
  6. Very specific:

    No styling by ID, no bare element selectors with side effects (section { }), no * { } resets past a single box-sizing reset.

    line 40
  7. Very specific:

    No dead markup: unused wrapper divs, empty elements, comments of old code, console.log, TODO-left-in-production.

    line 54
  8. Very specific:

    No placeholder assets: no lorem text, no https://placehold.co, no unsplash URLs without intent, no image that 404s.

    line 55
  9. Very specific:

    No accessibility regressions introduced in markup: focusable elements reachable, aria-hidden not applied to focusable content, buttons not …

    line 58

≈ “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

taste-code-craft

A designed page is a designed codebase. The DOM is the first layout you write — structure it like one.

1. SEMANTIC HTML (The DOM Is Design)

  • One <h1> per page; heading levels descend without skipping (h1 → h2 → h3, never h2 after a bare h4).
  • Use the element that means the thing: <nav>, <main>, <section aria-labelledby>, <figure>, <time>, <button> (not a <div> with a click handler), <a href> for navigation.
  • Lists are <ul>/<ol> — a row of features is a list, not five <div>s.
  • Every <img> has alt (empty alt="" only when decorative) and explicit width/height to prevent layout shift.
  • Labels: every <input> has a visible <label> (or aria-labelledby); never placeholder as the only label.
  • If the page has no <main>, one <section> without a heading, or a clickable <div>, it fails.

2. TOKENS OVER LITERALS (The Design System in Code)

  • Every color, spacing value, radius, shadow, and font size comes from a variable — zero hardcoded hex values in component rules. Literal #000 or padding: 13px appearing three times is a token missing.
  • The palette in code matches the design read exactly: no invented extra grays (#F7F8FA for a page that says #F4F1EA), no brand-name hexes that weren't chosen.
  • Type uses the declared scale (rem/fluid clamp), not ad-hoc pixel sizes per component.
  • Breakpoints come from a single media-query convention (one set of widths, documented once), not per-component magic numbers.
  • When a design system exists (taste-design-system), components consume semantic tokens — never reach past them to primitives.

3. SPECIFICITY & CSS ARCHITECTURE

  • No !important — if one is needed, the selector model is wrong.
  • No styling by ID, no bare element selectors with side effects (section { }), no * { } resets past a single box-sizing reset.
  • Max nesting depth 2 (or the framework's own convention); selectors that need 4+ levels describe a component boundary that should exist.
  • Utility/inline systems (Tailwind) are fine if the config is tokenized and class counts stay readable; 30-class soup on one element is not.
  • Dead rules: any CSS rule that matches nothing in the markup gets deleted before delivery — pages ship with zero unused selectors.
  • Components are single-responsibility: one file/block per UI component, no component doing hero + footer + modal work.

4. ZERO INLINE STYLES (Except The Three Exceptions)

  • Inline style="..." is banned for layout, color, and type — that's what classes exist for.
  • Allowed exceptions (use sparingly, comment why): dynamic values (CSS variable injection from JS state, e.g. progress), one-off alignment of a single static element that would need a new class, SVG presentation attributes.
  • An audit counts inline styles; more than ~5 on a page = architecture drift.

5. HYGIENE & DELIVERY

  • No dead markup: unused wrapper divs, empty elements, comments of old code, console.log, TODO-left-in-production.
  • No placeholder assets: no lorem text, no https://placehold.co, no unsplash URLs without intent, no image that 404s.
  • Files that ship: every font is loaded once (see taste-web-performance), every stylesheet is used, no duplicate font links from copy-paste.
  • Formatting is consistent (one quote style, one trailing-comma policy) — run the formatter; an agent that skips formatting signals it skipped other things.
  • No accessibility regressions introduced in markup: focusable elements reachable, aria-hidden not applied to focusable content, buttons not nested in buttons.

6. CHECKLIST (Fail the Code If…)

  • Any element that should be a <button>/<a>/<ul> is a <div>.
  • Any hardcoded color, spacing, radius, or type size outside the token set.
  • Any !important, ID-styling, or 4+ level nesting.
  • Any inline style outside the three exceptions.
  • Any unused CSS rule, dead markup, or console.log shipped.
  • Heading levels skipped or duplicated h1.
  • An image without alt and explicit dimensions.
  • The code looks like it was generated by an agent that didn't read the design system.

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.