Логотип Paper Flex

Paper Flex

Організація
millionco
paper-flex

Use when converting Paper canvas or design nodes from absolute positioning to flex or auto-layout. Covers Paper MCP absolute-to-flex restructuring, x-paper-clone preservation, clone z-order, computed spacing, shadow cleanup, SVG/image fidelity, layered cards, and screenshot verification.

Огляд

Видавецьmillionco
Репозиторійskills
Назва навичкиpaper-flex
Зірки
34
Форки
2
Файли в пакеті
2
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 2

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем millionco. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Paper Flex у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/millionco/skills/tree/main/skills/paper-flex
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/millionco/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/paper-flex .claude/skills/paper-flex
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Paper Flex в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Paper Flex, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Paper Flex не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Paper Flex

You convert Paper layouts from absolute positioning into flex structure without losing the original pixels.

Hard rule: preserve existing visual nodes first. Recreate only plain layout wrappers or simple text/div surfaces whose computed styles are fully known.

RED/GREEN Intent

This skill closes failures seen without Paper-specific guidance:

  • Using generic move/relative positioning instead of x-paper-clone plus update_styles
  • Losing SVG path data, image fills, crops, or exact shadows by rebuilding nodes
  • Breaking z-order because Paper appends x-paper-clone nodes after normal divs
  • Leaving cloned absolute left/top offsets inside flex flow
  • Letting shadows or filters become visible/inherited after restructuring

GREEN outcome: the converted node has a readable flex hierarchy, original SVG/image fidelity, verified z-order, and a screenshot that still matches the source.

Required First Pass

Before writing or deleting anything:

  1. Call get_guide({ topic: "paper-mcp-instructions" }).
  2. Call get_basic_info and get_selection to confirm target artboard/node scope.
  3. Call get_screenshot on the target and keep it as the visual baseline.
  4. Call get_tree_summary(depth=10) and get_children on the target.
  5. Call get_computed_styles for the target and every direct visual child. Record left, top, width, height, colors, fonts, shadows, filters, radii, and image fills.
  6. If text styling will be created or changed, call get_font_family_info before writing typography.

Do not start conversion from memory or screenshot alone. The computed styles are the source of truth for flex math.

Source Preservation Rules

  1. Keep the original nodes until the converted layout has passed screenshot comparison.
  2. Use <x-paper-clone node-id="..."> for SVGs, images, complex vectors, icons, masks, and styled shapes.
  3. Never hand-redraw an SVG, image, logo, or complex decorative layer. No exceptions for "simple enough."
  4. After cloning into flex flow, batch update_styles to set left: "0px" and top: "0px" on every flow clone.
  5. After cloning anything that must remain overlaid, batch update_styles to set the required position, left, and top. Inline styles on <x-paper-clone> are not enough.

Conversion Workflow

  1. Map the absolute children into semantic groups: background, header row, text stack, media, card, controls, overlays.
  2. Compute spacing from coordinates:
text
gap = next.top - (current.top + current.height)
leftPadding = first.left - container.left
topPadding = first.top - container.top
  1. Use Paper-compatible layout: display: flex, flex-direction, align-items, justify-content, gap, and wrapper padding.
  2. Do not rely on margins. Use gap, padding wrappers, or explicit spacer frames for non-uniform spacing.
  3. Build incrementally. Each write_html call should add one visual group or wrapper.
  4. Use separate write_html calls whenever clone z-order matters:
text
1. write_html container shell
2. write_html decorative/background clones into shell
3. write_html content wrappers/divs into shell
4. update_styles cloned positions and flow offsets
  1. Delete original children only after the converted children exist, positions are verified, and the screenshot matches. Verify the final child list with get_children.

Paper-Specific Traps

TrapWhy It BreaksCorrect Move
Setting position styles on <x-paper-clone>Paper ignores clone position overrides at insertion timeClone first, then call update_styles
Mixing clones and divs in one write_htmlPaper appends clones after divs, changing z-orderInsert decorative clones in an earlier write
Leaving original clone coordinatesAbsolute offsets push flow items away from their flex slotsReset flow clones to left: "0px", top: "0px"
Using position: relative for overlapped cardsPaper stacks instead of overlapping in fixed wrappersUse absolute cards inside a fixed-size wrapper
Keeping hidden source shadowsFlex order can reveal shadows that were covered beforeRemove boxShadow on clones whose shadow was hidden by a later opaque sibling
Applying filter to a flex parentFilters inherit and affect children unintentionallyApply filters only to leaf nodes that need them
Cloning reference SVGs blindlySome SVG clones contain empty text childrenInspect with get_tree_summary; delete empty Text children

Layered Cards

Open references/layered-cards.md when the design has back cards, floating badges, corner marks, or overlapping elements.

Default card stack rules:

  1. Card stack wrapper is a plain fixed-size frame, not a flex container.
  2. Back card is the first child.
  3. Front card uses position: absolute; left: 0px; top: 0px.
  4. Floating badges, labels, and corner marks are inside the stack wrapper as last children.

Good And Bad Patterns

Bad: Delete an imported SVG, write a new <svg>, put it in a flex row, and eyeball the icon.

Good: Clone the original SVG with x-paper-clone, place it in the flex row, reset its flow offsets with update_styles, then compare screenshots.

Bad: One write_html call containing a background clone and content divs.

Good: Write the shell, insert background clones in a separate call, then insert content so Paper's clone ordering cannot place backgrounds on top.

Before Marking Complete, You MUST:

  1. Verify the original screenshot and converted screenshot match.
  2. Verify no SVG, image, logo, mask, or complex shape was recreated instead of cloned.
  3. Verify every flow clone has left: "0px" and top: "0px" via get_computed_styles.
  4. Verify every absolute overlay clone has its intended position, left, and top via get_computed_styles.
  5. Verify decorative/background clones appear earlier than content with get_children.
  6. Verify overlapping badges/labels are last children of their stack/wrapper.
  7. Verify hidden shadows are removed where flex restructuring would reveal them.
  8. Verify filters are on leaf nodes only.
  9. Call finish_working_on_nodes when done.

Do not skip any step. A skipped step means visual corruption.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Paper Flex?

Use when converting Paper canvas or design nodes from absolute positioning to flex or auto-layout. Covers Paper MCP absolute-to-flex restructuring, x-paper-clone preservation, clone z-order, computed spacing, shadow cleanup, SVG/image fidelity, layered cards, and screenshot verification.

Навіщо використовувати Paper Flex у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Paper Flex — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Paper Flex у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/millionco/skills/tree/main/skills/paper-flex. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Paper Flex?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Paper Flex?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Paper Flex — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Paper Flex?

Так. Навичку опубліковано на GitHub: millionco, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇