Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Pisanie

design-md

/design-md

Utrwala design gotowej strony w pliku DESIGN.md dla innych agentów: mierzy renderowanie, pokazuje konflikty czcionek, odstępów, siatki i kontrastu.

Repozytorium
codex-design ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
7
Skrypty
3
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/analyze.mjs, scripts/collect-playwright.mjs, scripts/collect.js

Co robi i kiedy

Utrwala design gotowej strony w pliku DESIGN.md dla innych agentów: mierzy renderowanie, pokazuje konflikty czcionek, odstępów, siatki i kontrastu.

Wyzwalacze z opisu

сделай design.mdзафиксируй дизайн-системуstandardize the designextract design tokens
Oryginalny opis (EN)

Use when a landing page, site or app is already built and its design should be fixed into a DESIGN.md that other agents follow — "сделай design.md", "зафиксируй дизайн-систему", "standardize the design", "extract design tokens", or after image-to-code / design-art implementation. Measures what the page actually renders, shows font-size, spacing, grid, color and contrast conflicts, gets the owner's decisions, then writes a DESIGN.md in the Google DESIGN.md format and lints it.

Jak działa

  1. Flow
  2. Hard rules
Sekcje z nagłówków SKILL.md, w oryginale · 86 linii, 941 słów
Podgląd SKILL.md
---
name: design-md
description: Use when a landing page, site or app is already built and its design should be fixed into a DESIGN.md that other agents follow — "сделай design.md", "зафиксируй дизайн-систему", "standardize the design", "extract design tokens", or after image-to-code / design-art implementation. Measures what the page actually renders, shows font-size, spacing, grid, color and contrast conflicts, gets the owner's decisions, then writes a DESIGN.md in the Google DESIGN.md format and lints it.
---

# design-md

Turns a built frontend into a `DESIGN.md`: the file other agents read before they touch the UI. The file only helps if it describes one coherent system, so conflicts are found and settled **before** it is written.

Talk to the owner in their language. Files in `scripts/`, `templates/`, `references/` sit next to this file (`$SKILL`).

## Flow

```text
1 sources → 2 render & collect → 3 analyze → 4 owner settles conflicts → 5 (optional) fix code → 6 write DESIGN.md → 7 lint → 8 handoff
```

### 1. Sources

- Find an existing `DESIGN.md` / `design.md` (root, `docs/`, `design/`). If one exists, this run is a **refresh**: compare, never silently overwrite.
- Read the declared system: CSS custom properties, Tailwind/theme config, token files, font imports, component variants. Note what is declared but unused and used but undeclared.
- Find how to run the page: dev server, built `dist/`, a static file, or a URL the owner gave. Use only the owner's own project or a URL they confirm is theirs.
- Mark every value you later write as `observed` (rendered), `declared` (in code only), `decided` (owner chose it) or `unknown`. Never invent a value.

### 2. Render and collect

Open each key page in a browser at **375, 768 and 1280px** wide (add 1440 for wide layouts). On each, evaluate `$SKILL/scripts/collect.js` as an expression and save the returned JSON to `.design-md/collect-<page>-<width>.json`. Any browser tool works: Playwright `page.evaluate`, the agent's built-in browser, or devtools. Scroll once to the bottom first so lazy sections render.

`.design-md/` is a scratch folder: add it to `.gitignore` or delete it at the end.

### 3. Analyze

```sh
node $SKILL/scripts/analyze.mjs .design-md/collect-*.json --out .design-md
```

It writes `.design-md/conflicts.md` (for the owner) and `.design-md/inventory.json` (for you). Checks and thresholds: `references/checks.md`. Read the inventory too: it lists every rendered value with counts and where it appears, and the top typography combinations that become tokens.

### 4. Owner settles conflicts — the gate

Show the owner the summary and the conflicts table, grouped: contrast, typography, colors, spacing, radii, grid/containers. Keep it short: value → how often → where → your proposal. For each item the owner picks:

- **объединить** — both values become one token (your proposal or theirs);
- **оставить** — the difference is intentional; record why in DESIGN.md;
- **исправить в коде** — the code is wrong; fix it before the file is written.

Also settle naming of the main roles (primary, surface, text, accent…) when the code does not make it obvious. Ask in one message, with your recommendation per item, so "да" accepts all. **Do not write DESIGN.md while a conflict is open** unless the owner says to record it as an open question.

Contrast failures under WCAG AA are listed first; recommend fixing them, but the owner decides.

### 5. Fix code (only if the owner chose «исправить в коде»)

Change only the values the owner approved, in the token/theme layer first rather than one-off overrides. Re-run steps 2–3 on the same pages and show that the fixed conflicts are gone. If the owner did not ask for fixes, skip this step: the file then records the decided system and the code drift goes to Open questions.

### 6. Write DESIGN.md

Use `templates/DESIGN.md` and the format rules in `references/format.md`:

- YAML front matter with `version: alpha`, `name`, `description`, and tokens: `colors`, `typography`, `rounded`, `spacing`, `components`. Only resolved values; hex for colors, px for sizes, unitless line-height.
- Every token gets a **role**, not just a value: what it is for and where not to use it.
- Components that exist on the page, with their states (`button-primary`, `button-primary-hover`, `-disabled`…), referencing tokens as `{colors.primary}`.
- Sections in the required order: Overview, Colors, Typography, Layout, Elevation & Depth, Shapes, Components, Do's and Don'ts. Then the extra sections `## Provenance` (pages, widths, date, what was observed vs decided) and `## Open questions` (anything the owner left open, code drift not yet fixed).
- Do's and Don'ts come from the decisions in step 4: every «объединить» becomes "use X, not Y", every «оставить» explains the exception.
- Prose is specific: name the visual reference and the posture ("плотный тёмный интерфейс с одним кислотным акцентом"), not adjectives like "modern, clean".

Refresh: keep the owner's prose, update tokens and Provenance, and list what changed in your reply.

### 7. Lint

```sh
npx @google/design.md lint DESIGN.md
```

Fix every error (broken references, duplicate keys, section order). Warnings such as contrast or orphaned tokens either get fixed or explained in Open questions. `orphaned-tokens` means no component references that token: base colors (surface, text, muted, line) are usually used by `page`, `caption`, `divider`-style components — add the real one where it exists on the page instead of deleting the token. If `npx` is unavailable, say the lint was not run.

### 8. Handoff

Tell the owner in a few lines: where the file is, how many tokens, which conflicts were merged, kept or fixed, and what is still open. Offer, without doing it unasked:

- adding one line to `AGENTS.md` / `CLAUDE.md`: "Before changing UI, read DESIGN.md and use its tokens";
- exporting tokens: `npx @google/design.md export --format css-tailwind DESIGN.md` (or `json-tailwind`, `dtcg`).

## Hard rules

- No DESIGN.md before the conflicts are settled or explicitly parked as open questions.
- No invented tokens: a value is rendered, declared, or decided by the owner.
- Do not edit source code unless the owner chose «исправить в коде» for that item.
- Measure the owner's own product. Do not extract a third party's site into the owner's DESIGN.md.
- Keep raw collections out of the final file and out of git.
Pliki w paczce (7)
  • SKILL.md 6 KB
  • references/checks.md 2 KB
  • references/format.md 3 KB
  • scripts/analyze.mjs 14 KB
  • scripts/collect-playwright.mjs 2 KB
  • scripts/collect.js 4 KB
  • templates/DESIGN.md 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · harnessmachine/codex-design100MIT
mokhtarabadi/cognitive-lead-hq100MIT
uxkin/agent100MIT
TerminalSkills/skills100Apache-2.0
jungvonmatt/agent-toolkit100MIT
tdimino/claude-code-minoan100MIT
filiphsps/commerce100MIT
deepleaper/leaper-agent100Apache-2.0
CaesiumY/ko-design-md95MIT

Migawka bazy z 13.11.2026 · wersja paczki b85577adc4df (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100rebuild-design
    Odtwarza system projektowy z referencji na własnych zasobach, z kontrolą kontrastu, gdy trzeba przenieść interfejs.
  • 90uisandbox
    Otwiera działającą aplikację w UISandbox w przeglądarce, żeby testować zmiany kolorów, czcionek i odstępów, albo sprawdza zmianę w trybie bezgłowym i zwraca zrzut ekranu z poprawką.
  • 100extract-design-md
    Zamienia system designu strony o podanym adresie URL w plik DESIGN.md: kolory, typografię, skale odstępów i promieni, komponenty oraz charakter marki.
  • 100build-design-system
    Buduje trzypoziomowe tokeny i specyfikacje komponentów ze wszystkimi stanami dla systemu projektowego.
  • 90grid-layout
    Projektuje system układu: skalę odstępów, kolumny siatki i prymitywy layoutu, przy pytaniach o system spacingu lub siatkę.
  • 95replica-design
    Odtwarza system projektowy klona jako tokeny i specyfikacje komponentów, z otwartymi ikonami i fontami oraz kontrolą kontrastu WCAG.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.