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

design-import

/design-import

Importuje projekt ze źródła wskazanego w zapisie, np. z linku Figma, folderu obrazów lub PDF, i proponuje grupy dokumentu przekazania.

Licencja
MIT
Ostatnia zmiana repozytorium
04.11.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
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

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

Licencja

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

Co robi i kiedy

Importuje projekt ze źródła wskazanego w zapisie, np. z linku Figma, folderu obrazów lub PDF, i proponuje grupy dokumentu przekazania.

Oryginalny opis (EN)

Imports the design from the source the setup record names (a Figma link, a folder of images or a PDF), writes the inventory, and proposes the handoff doc groups for the lead to approve. Use when the design line names a source or the call map is on, and again when the design changes.

Jak działa

  1. Gates
  2. Pictures
  3. Inventory
  4. Groups
  5. Seed calls
  6. Check and commit
  7. Refusals
Sekcje z nagłówków SKILL.md, w oryginale · 223 linii, 1 920 słów
Podgląd SKILL.md
---
name: design-import
description: Imports the design from the source the setup record names (a Figma link, a folder of images or a PDF), writes the inventory, and proposes the handoff doc groups for the lead to approve. Use when the design line names a source or the call map is on, and again when the design changes.
---

# Design import

The coordinator runs this in the hub, once per project and again when the design changes. It
fills `callmap/` with what the call map needs before any code exists: the pictures, the
inventory, the approved groups and the seed calls. Read `lead-flow.json` first, then apply the
Gates and the Refusals below before anything else.

Never guess: a label, frame, route or field no source shows is an `open` item, never invented.

## Gates

Run `python3 "${CLAUDE_PLUGIN_ROOT}/lib/leadflow/cli.py" shape "<hub>"` first, in the hub (`<hub>`
is its absolute path). Its `design:` and `call-map:` lines pick the two parts, each on its own. When it exits non-zero,
stop and show its message; a config error is never read as `on`:

- **The picture part** (Pictures, Inventory) runs when the `design:` line names a source: a Figma
  link, a folder of images or a PDF. With `none`, `we make it in tasks` or `not asked`, skip it
  with the one line `no design source (L-064): pictures skipped`, and ask nothing.
- **The call-map part** (Groups, Seed calls, Check and commit) runs when the `call-map:` line is
  `on`. With `call-map: off`, skip it with the one line `call map is off (L-063): skipped`, and
  ask nothing. No record, or a record with no `Call map:` line, prints `call-map: on`.
- **Call map only** (`call-map: on`, no design source): skip Pictures and Inventory. Write no
  `callmap/figma-inventory.md` and no pictures, leave `callmap.figma` unset, and propose only
  `foundations` and `doc-only` groups from `consumers`, with no screens (never invent one). Write no
  flows files: one belongs to a `screens` group, and there is none. Commit `lead-flow.json` and
  `callmap/groups.json` only.
- **Both skipped:** say both lines and stop; change nothing.
- **Pictures only** (`call-map: off`): write the pictures to `callmap/shots/` and the inventory to
  `callmap/figma-inventory.md`. They are files, not settings: write no `callmap` key and no
  `callmap/groups.json`, and do not run callmap-check. Commit them as `docs(design): import design`.

## Pictures

Use the source the `design:` line names; for a Figma link try each source in this order, and use the
first that works:

1. **The Figma connector**, when it is signed in: read the file's pages, sections and frames
   (name, node id, size), and fetch each frame's picture as PNG.
2. **The lead's signed-in Figma in the browser** (the built-in browser; Chrome when the lead asks
   for it). Exporting is a download, so ask **one approval** first: the file name, and the
   frames to export, each with the file it becomes. Then, for each frame:
   - use the frame's own export setting only when it is PNG; otherwise add a PNG 1x setting just
     to export, and that setting is removed afterwards;
   - wait for each file to land before the next click: repeated clicks queue save dialogs that
     block every later download.
3. **A folder of images, or screenshots:** the files the line names, one per screen. List them and
   match each to its screen with the lead.
4. **A PDF:** read it page by page (the Read tool's `pages` parameter), one screen per page. Save a
   page's picture only with a tool on the machine that exports one page to PNG (for example
   `pdftoppm -png -f <n> -l <n>`); with none, keep the page for the inventory and ask the lead for
   PNG exports of the pages.
5. **None of these can be read** (a format this machine cannot open, a link that needs a sign-in):
   ask the lead, in one line, for a PNG or PDF export of each screen. That is an ask, never a
   failure.

A picture must be PNG: convert any other screenshot first (for example
`sips -s format png <in> --out <out>`). Save each picture as `callmap/shots/<screen id>.png` (the
id is a slug, `[a-z0-9][a-z0-9-]*`). Pictures keep their exported size: `callmap-render` reads
the PNG header and scales it to the 390 px column. A screen with no frame gets no picture; the
canvas shows it as `not-drawn`, and the inventory lists it under Gaps.

## Inventory

Write `callmap/figma-inventory.md`. `callmap-check` reads it when `callmap.figma` is set: every
screen's `figma[].node` must appear in it, and every label must appear exactly as in Figma (any
language, the same spaces and joiners). The format:

```markdown
# <project> - Figma screen inventory

Source: Figma file `<file_key>` ("<file_name>"), read through <the connector | the browser | screenshots>.
(With no Figma file the line is `Source: screenshots`, `Source: folder <path>` or `Source: PDF <file>`.)
Reading caveats: what could not be read (no Dev Mode, numbers that are mock data, frames not opened).

## 1. Pages
| Page | Content |
|---|---|
| Checkout | the cart and checkout screens; the main source |

## 2. Frames
| Frame | Node id | Size | Section | Screen |
|---|---|---|---|---|
| Cart | 1234-5678 | 390x844 | Cart | cart |
| Done | 1234-5690 | 390x844 | Cart | done |

## 3. Screens
### 3.1 Cart (1234-5678)
Every visible label, exactly as in Figma; each control and where it goes.

## 4. Shared components
## 5. Gaps
Screens with no frame, states Figma does not draw (empty, loading, error), labels you could not read.
```

Node ids are in their URL form (`1234-5678`, from `?node-id=`). Short ids such as `4-11` (`4:11`
in the connector) are valid too. A frame read from a screenshot has no node id: say so in its
row, and leave its screen's `figma` list empty.

## Groups

A group is one handoff doc, `<consumer code>-<n>` (L-020). Propose them from the design's sections
and pages (with no design source: from `consumers` alone, see Gates), in one message with the
reason for each:

- **`callmap.figma`:** its `file_key` and `file_name`, from the file's URL and title. With
  screenshots only (no Figma file), leave `callmap.figma` unset: the inventory checks stay off,
  the inventory's Source line names the source (`screenshots`, `folder <path>` or `PDF <file>`), and every screen's `figma` list stays empty.
- **`callmap.default_service`:** when `lead-flow.json` has no `callmap` yet, propose it (a
  `repos[].service`), with or without `callmap.figma`.
- **The groups:** for each, `code`, `title`, `sub` (one line, optional), `consumer` (a
  `consumers[].id`), `kind`, `figma_section` (the section name, or `null`) and `doc`
  (`docs/<consumer>/<code>-<slug>.md`). The kind is:
  - `screens`: a Figma section (or page) whose screens share calls; it gets a canvas row;
  - `foundations`: `<code>-1` of each consumer with screens: errors, auth, paging, shared pieces;
  - `doc-only`: a consumer with no screens at all; it gets a doc and no canvas row.
- **The screens** of each `screens` group, by id and frame. A screen sits in exactly one group.

Wait for the lead's yes; change what the lead changes. Only then:

1. Add what was proposed of `callmap.figma` and `default_service` to `lead-flow.json` with the
   Edit tool.
2. Write `callmap/groups.json`:

```json
{"groups": [
  {"code": "HD-1", "title": "Client foundations", "sub": "Errors, auth, paging", "consumer": "web",
   "kind": "foundations", "figma_section": null, "doc": "docs/web/HD-1-foundations.md"},
  {"code": "HD-2", "title": "Cart", "sub": "Lines, counts, checkout", "consumer": "web",
   "kind": "screens", "figma_section": "Cart", "doc": "docs/web/HD-2-cart.md"},
  {"code": "BO-1", "title": "Reports", "consumer": "backoffice",
   "kind": "doc-only", "figma_section": null, "doc": "docs/backoffice/BO-1-reports.md"}
]}
```

On a re-run, never renumber: an existing group keeps its code and doc, because hub messages link
the reader as `#hd-2`. New sections get the next free number; a group whose section is gone is
listed for the lead, never deleted.

**A new reader:** on a re-run, a `consumers` entry with no group in `callmap/groups.json` (added by a
superseding record or by Add a repo) gets its groups, proposed to the lead as above and appended
after the existing ones, each with the next free number for that consumer's code. It gets its
`foundations` and `doc-only` groups on the call-map-only path, and its screen groups too when the
`design:` line names a source. Then run callmap-check.

## Seed calls

Calls show on the map before they are built (L-022). For each approved `screens` group, write
`callmap/flows/<code>.json`, `{"calls": {}, "screens": []}` with both keys always present; a call
no screen uses yet goes in `callmap/flows/_unplaced.json`, `{"calls": {}}`; and a path across
screens in `callmap/flows/_journeys.json`, `{"flows": [{id, name, steps: [{screen, action}]}]}`,
where `action` (optional) is a `control` of that screen.

- **Screens:** `id`, `name`, `label`, `figma[{label, node}]`, `on_open` (call keys),
  `sections[{name, label, calls, note}]`, `actions[{control, label, calls, goes_to, note}]` and
  `states[{when, shows}]`, as the frames show them. Every list is present, even when empty.
  `control` is unique in its screen; `goes_to` is a screen id or `null`. Every screen, section
  and action `label` is copied exactly as in the inventory. A state Figma does not draw is an
  `open` item.
- **Calls:** only the routes the design notes, decisions or existing code name: `method`, `path`,
  `kind` (`new`, or `existing` for a route already there), `params`, `response`, `errors`,
  `auth`, `behind` and `decisions`. A seeded call has no `task`: the coordinator sets it when it
  opens the wave that builds the call. A route nobody has named yet keeps `method` and `path`
  empty and says why in `open`. Add `service` when it is not `callmap.default_service`, and
  `release` on calls, screens and journeys when `callmap.releases` is set.

`callmap/flows/HD-2.json`:

```json
{"calls": {"cart.get": {"method": "GET", "path": "api/cart", "kind": "new", "params": [],
  "response": "The whole cart.", "errors": [{"code": "E100", "when": "not signed in",
  "app_shows": "the sign-in screen"}], "auth": "access token", "behind": [], "decisions": []}},
 "screens": [
  {"id": "cart", "name": "Cart", "label": "Your cart", "figma": [{"label": "Cart", "node": "1234-5678"}],
   "on_open": ["cart.get"],
   "sections": [{"name": "Lines", "label": "Items", "calls": [], "note": ""}],
   "actions": [{"control": "Checkout", "label": "Checkout", "calls": [], "goes_to": "done",
     "note": "", "open": "no route named for checkout yet"}],
   "states": [{"when": "no lines", "shows": "an empty cart", "open": "Figma draws no empty cart"}]},
  {"id": "done", "name": "Order placed", "label": "Thank you", "figma": [{"label": "Done", "node": "1234-5690"}],
   "on_open": [], "sections": [], "actions": [], "states": []}]}
```

`callmap/flows/_journeys.json`:

```json
{"flows": [{"id": "buy", "name": "Buy", "steps": [{"screen": "cart", "action": "Checkout"}, {"screen": "done"}]}]}
```

A handoff task owns its group's flows file once its wave opens. On a re-run, never overwrite a
flows file, and add new screens and calls only to the flows file of a group with no open handoff
task. For a group whose handoff task is open, list its new screens and calls for the lead
instead, and add them after that task's close. In every case, list each changed frame for the
lead.

## Check and commit

```bash
python3 "${CLAUDE_PLUGIN_ROOT}/lib/leadflow/cli.py" callmap-check "<hub>"
```

It must print a line starting `OK:`. Fix each problem it lists (a label not in the inventory is
a typo in one of the two). Then commit in the hub: `docs(callmap): import design`, covering
`lead-flow.json` and `callmap/groups.json`, plus `callmap/flows/` when flows files were written and
`callmap/figma-inventory.md` and `callmap/shots/` when the picture part ran. Name only paths that
exist. Ask the lead before pushing the hub.

## Refusals

Stop, say why, and change nothing when:

- **`lead-flow.json` has a `bundle`:** the call map lives only in the lead's hub. A teammate's
  screens come through the lead's import. Both parts stop.

These two stop one part only, and the other part goes on:

- **`consumers` is empty (call-map part only):** a group must name its consumer. Skip the call-map
  part and tell the lead to add the consumers first (the `setup` skill proposes them). The picture
  part still runs, and its files are committed as Gates' pictures only says.
- **The picture part has a source but none works, and the lead has sent no export:** nothing shows
  the screens; say so, import no pictures, and carry on with the call-map part as in Gates' call
  map only. With no design source this does not apply.

Wersje

RepozytoriumWynikLicencja
Ta strona · M-reza-kd/lead-flow-plugin100MIT
yonatangross/orchestkit100MIT

Migawka bazy z 13.11.2026 · wersja paczki d000d8666698 (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

  • 100design-ship
    Zamienia link z claude.ai/design w pull request: importuje projekt, przygotowuje okładkę i oczekiwania, a potem otwiera PR.
  • 100figma-fetch
    Pobiera strukturę ramek i komponentów oraz cały widoczny tekst z projektu Figma wskazanego adresem URL.
  • 90figma-bridge
    Przenosi specyfikacje Markdown do ramek Figma i z powrotem, a gdy Figma nie działa, tworzy klikalny prototyp HTML.
  • 100figma
    Importuje treści Figma do kompozycji HyperFrames: zasoby, tokeny marki, komponenty i sekcje storyboardu jako animatiki oraz animacje i shadery z Figma Motion.
  • 95qt-figma-token-extraction
    Wyciąga tokeny projektowe z systemu Figma i generuje design-tokens.json oraz singletony QML.
  • 100figma-api
    Automatyzuje pracę z REST API Figmy: odczyt plików, eksport ikon i obrazów, wyciąganie stylów jako tokenów projektowych oraz webhooki przy zmianach plików.

Uwagi i zgłoszenia

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