ui-convert-writer-paper
Installation
SKILL.md
Paper Writer
Converts Design IR files into Paper MCP calls. Creates design artifacts in a Paper project using the serialized write order: tokens → styles → components → pages.
Non-negotiable Rules
- Serialized writes — never parallelize MCP calls.
- Registry updates — update
registry.jsonafter every successful write. - Idempotency — check
registry.jsonbefore writing. Skip if hash matches. - Follow Paper API conventions — use Paper-native element types and properties.
Write Order
Phase 1: Tokens → Paper Design Tokens
Map IR tokens to Paper's token/variable system:
| Token Type | Paper Equivalent |
|---|---|
| Colors | Color variables |
| Spacing | Spacing variables |
| Radii | Radius variables |
| Fonts | Typography definitions |
| Shadows | Effect definitions |
Phase 2: Styles → Paper Shared Styles
Create reusable style definitions from token combinations.
Phase 3: Components → Paper Components
For each IR component:
- Read IR file from
.ui-convert/ir/ - Create Paper element with appropriate type
- Add child elements
- Mark as reusable component
- Update
registry.json
IR-to-Paper property mapping follows the standard pattern:
| IR Key | Paper Property |
|---|---|
w, h |
Width, height |
x, y |
Position |
bg |
Background fill (token reference) |
fg |
Text color |
d |
Layout direction |
al, jc |
Alignment, justification |
g |
Gap |
p |
Padding |
br |
Border + radius |
op |
Opacity |
txt |
Text content |
Phase 4: Layouts → Paper Layout Containers
For each layout artifact:
- Create a container with page-level dimensions
- Apply layout properties (direction, padding, gap)
- Insert placeholder slots for child pages/sections
- Convert to component if the layout is reused across pages
Phase 5: Pages → Paper Pages/Artboards
For each page artifact:
- Create page/artboard
- Create elements from IR node tree
- Use component instances for
refnodes - Apply layout properties
IR Node Type → Paper Element
| IR Type | Paper Implementation |
|---|---|
pg |
Page/artboard |
fr |
Container with layout |
txt |
Text element |
btn |
Component: container + text |
inp |
Styled input element |
img |
Image element |
crd |
Container with styling |
mdl |
Overlay container |
hdr, nav, ftr, sdb |
Semantic containers |
lst, tbl |
List/table containers |
ref |
Component instance |
MCP Tool Signatures
This writer uses the concrete tool signatures defined in references/paper-mcp-tools.md.
All MCP calls must match those signatures. If the Paper MCP server does not expose a required tool,
the ui-convert-mcp-validator preflight will catch and report it before any writes begin.
Error Handling
- MCP tool not found → halt and report; Paper MCP may not be configured
- Token conflicts → append suffix
- Rate limits → add delay between batches
- Auth errors → halt pipeline
Cross-references
- IR format →
ui-convert-ir-schema - Registry →
ui-convert-state(registry.json) - Called by →
ui-convert-coordinator(whentargetTool: "paper") - Writer pattern → same as
ui-convert-writer-pencil,ui-convert-writer-figma - MCP tool signatures → references/paper-mcp-tools.md
Related skills