Paper Flex logo

Paper Flex

Organization
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.

Overview

Publishermillionco
Repositoryskills
Skill namepaper-flex
Stars
34
Forks
2
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by millionco on GitHub. Read the source before you install it.

Installation

Install the Paper Flex AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/millionco/skills/tree/main/skills/paper-flex
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Paper Flex in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Paper Flex on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Paper Flex is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Paper Flex AI skill do?

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.

Why use Paper Flex on TypingMind?

Because you install it once and use it with any model. Paper Flex is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Paper Flex in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/millionco/skills/tree/main/skills/paper-flex. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Paper Flex?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Paper Flex?

As many as you like. As long as a model supports skills, you can use Paper Flex with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Paper Flex AI skill free?

Yes. It is published on GitHub by millionco under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇