← 返回
内容创作 中文

Paper Design

Design UI screens in Paper — a professional design tool running locally on macOS. Create artboards, write HTML into designs, take screenshots, and iterate vi...
在 Paper(macOS 本地专业设计工具)中设计 UI 界面。创建画板、将 HTML 写入设计稿、截图并持续迭代优化。
candoolabs
内容创作 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 526
下载
💾 11
安装
1
版本
#design#latest#mcp#paper#ui

概述

Paper Design — MCP Bridge Skill

Paper is a professional design tool (like Figma) that runs locally on macOS. This skill connects to Paper's MCP server via HTTP, giving you full design capabilities.

Prerequisite: Paper must be open with a design file loaded. If Paper is not running, tell the user to open it first.

How to Use Paper

All Paper operations go through the paper.sh script in this skill's directory:

exec {baseDir}/paper.sh <tool_name> '<json_arguments>'

Important: Always quote JSON arguments with single quotes to prevent shell expansion.

Quick Start

# 1. Check what's on the canvas
exec {baseDir}/paper.sh get_basic_info

# 2. Create a new mobile artboard
exec {baseDir}/paper.sh create_artboard '{"name":"Home Screen","styles":{"width":"390px","height":"844px","display":"flex","flexDirection":"column","backgroundColor":"#FAFAFA"}}'

# 3. Add content (one visual group at a time)
exec {baseDir}/paper.sh write_html '{"html":"<div layer-name=\"Header\" style=\"display:flex;padding:60px 20px 20px;align-items:center\"><span style=\"font-family:Inter Tight;font-size:28px;font-weight:700;color:#1A1A1A\">Home</span></div>","targetNodeId":"ARTBOARD_ID","mode":"insert-children"}'

# 4. Take a screenshot to review
exec {baseDir}/paper.sh get_screenshot '{"nodeId":"ARTBOARD_ID"}'
# → saves to /tmp/paper-screenshots/screenshot-TIMESTAMP.jpg

# 5. View the screenshot
image /tmp/paper-screenshots/screenshot-TIMESTAMP.jpg

# 6. When done, release the working indicator
exec {baseDir}/paper.sh finish_working_on_nodes

Tool Reference

Reading the Canvas

CommandPurpose
------------------
paper.sh get_basic_infoFile name, page, artboards, fonts in use
paper.sh get_selectionCurrently selected nodes on canvas
paper.sh get_node_info '{"nodeId":"ID"}'Size, visibility, parent, children, text
paper.sh get_children '{"nodeId":"ID"}'Direct children with IDs and types
paper.sh get_tree_summary '{"nodeId":"ID"}'Compact hierarchy overview (cheap)
paper.sh get_tree_summary '{"nodeId":"ID","depth":5}'Deeper hierarchy
paper.sh get_computed_styles '{"nodeIds":["ID1","ID2"]}'CSS styles for nodes
paper.sh get_jsx '{"nodeId":"ID"}'JSX code (for dev handoff)
paper.sh get_font_family_info '{"familyNames":["Inter","DM Sans"]}'Font availability + weights

Visual Review

# Screenshot an artboard or node
exec {baseDir}/paper.sh get_screenshot '{"nodeId":"ARTBOARD_ID"}'

# Higher resolution (for reading small text)
exec {baseDir}/paper.sh get_screenshot '{"nodeId":"ARTBOARD_ID","scale":2}'

# Save to specific path
exec {baseDir}/paper.sh get_screenshot '{"nodeId":"ARTBOARD_ID"}' --save /tmp/my-review.jpg

# Then view the screenshot with the image tool
image /tmp/paper-screenshots/screenshot-TIMESTAMP.jpg

Creating Designs

# Create artboard (mobile)
exec {baseDir}/paper.sh create_artboard '{"name":"Screen Name","styles":{"width":"390px","height":"844px","display":"flex","flexDirection":"column","backgroundColor":"#FFFFFF"}}'

# Create artboard (desktop)
exec {baseDir}/paper.sh create_artboard '{"name":"Dashboard","styles":{"width":"1440px","height":"900px","display":"flex","flexDirection":"column","backgroundColor":"#F5F5F5"}}'

# Create related artboard (positioned next to existing)
exec {baseDir}/paper.sh create_artboard '{"name":"Screen V2","relatedNodeId":"EXISTING_ID","styles":{"width":"390px","height":"844px"}}'

Writing HTML into Designs

# Add elements as children of a node
exec {baseDir}/paper.sh write_html '{"html":"<div style=\"...\">content</div>","targetNodeId":"PARENT_ID","mode":"insert-children"}'

# Replace an existing node
exec {baseDir}/paper.sh write_html '{"html":"<div style=\"...\">new content</div>","targetNodeId":"OLD_NODE_ID","mode":"replace"}'

HTML Rules (critical):

  • Always use inline styles (style="...")
  • Use display: flex for ALL layouts — no grid, no inline, no tables
  • Use padding and gap for spacing — NO margins
  • No emojis as icons — use SVG paths
  • Set layer-name="Semantic Name" on key elements
  • Google Fonts available via font-family: "Font Name"
  • Font sizes MUST use px units
  • Use border-box sizing assumptions

Modifying Existing Designs

# Update styles on nodes
exec {baseDir}/paper.sh update_styles '{"updates":[{"nodeIds":["ID1","ID2"],"styles":{"backgroundColor":"#FF0000","padding":"20px"}}]}'

# Change text content
exec {baseDir}/paper.sh set_text_content '{"updates":[{"nodeId":"TEXT_ID","textContent":"New text here"}]}'

# Duplicate nodes (efficient for repeated elements)
exec {baseDir}/paper.sh duplicate_nodes '{"nodes":[{"id":"SOURCE_ID"}]}'
# With specific parent:
exec {baseDir}/paper.sh duplicate_nodes '{"nodes":[{"id":"SOURCE_ID","parentId":"TARGET_PARENT"}]}'

# Delete nodes
exec {baseDir}/paper.sh delete_nodes '{"nodeIds":["ID1","ID2"]}'

# Rename layers
exec {baseDir}/paper.sh rename_nodes '{"updates":[{"nodeId":"ID","name":"Header"}]}'

Finishing Up

# ALWAYS call when done with an artboard — releases the working indicator
exec {baseDir}/paper.sh finish_working_on_nodes

Design Workflow (Mandatory)

  1. Startget_basic_info to see what's on the canvas
  2. Check fontsget_font_family_info before writing any typography
  3. Design brief — Before writing HTML, decide: color palette (5-6 hex), type choices, spacing rhythm, visual direction
  4. Build incrementally — ONE visual group per write_html call (header, row, button group — not an entire screen)
  5. Review every 2-3 changesget_screenshotimage → critique spacing, typography, contrast, alignment, clipping
  6. Fix issues before moving on
  7. Finishfinish_working_on_nodes when done

Review Checkpoints (every 2-3 modifications)

After a screenshot, evaluate:

  • Spacing — Uneven gaps? Cramped? Clear rhythm?
  • Typography — Readable? Strong hierarchy?
  • Contrast — Low contrast text? Elements blending?
  • Alignment — Consistent vertical/horizontal lanes?
  • Clipping — Content cut off at edges?

Default Artboard Sizes

DeviceWidthHeight
-----------------------
Mobile (iPhone)390px844px
Tablet (iPad)768px1024px
Desktop1440px900px

Troubleshooting

  • "Paper is not running" — Open the Paper app on macOS first
  • "Failed to initialize MCP session" — Paper needs a design file open (not just the app)
  • Empty response — The node ID may be wrong; use get_basic_info to find valid IDs
  • Session expired — The script auto-retries with a fresh session; if persistent, delete /tmp/paper-mcp-session

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 08:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,306
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,133
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,413