
open-pencil-design-editor
AI-native open-source Figma alternative with CLI, MCP server, and Vue SDK for reading/writing .fig files programmatically.
- Installs
- 811
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/trending-skills --skill open-pencil-design-editor- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads open-pencil-design-editor automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
OpenPencil Design Editor
Skill by ara.so — Daily 2026 Skills collection.
OpenPencil is an open-source, AI-native design editor that reads and writes native Figma (.fig) files, provides a headless CLI, an MCP server for AI agents, and a Vue SDK for building custom editors. It is MIT-licensed and runs in the browser, as a desktop app (Tauri/macOS/Windows/Linux), or fully headlessly.
Installation
Web app (no install)
Visit app.openpencil.dev/demo.
Desktop (macOS)
brew install open-pencil/tap/open-pencil
Or download from releases.
CLI
bun add -g @open-pencil/cli
MCP server
bun add -g @open-pencil/mcp
Local development
git clone https://github.com/open-pencil/open-pencil
cd open-pencil
bun install
bun run dev # Web app at localhost:1420
bun run tauri dev # Desktop (requires Rust)
CLI Reference
The open-pencil CLI operates on .fig files headlessly. When the desktop app is running, omit the file argument to connect to the live canvas via RPC.
Inspect file structure
# Print the full node tree
open-pencil tree design.fig
# Find nodes by type
open-pencil find design.fig --type TEXT
open-pencil find design.fig --type FRAME
# Get a specific node by ID
open-pencil node design.fig --id 1:23
# File metadata
open-pencil info design.fig
XPath queries
# All frames
open-pencil query design.fig "//FRAME"
# Frames narrower than 300px
open-pencil query design.fig "//FRAME[@width < 300]"
# Text nodes whose name contains "Button"
open-pencil query design.fig "//TEXT[contains(@name, 'Button')]"
# Nodes with rounded corners
open-pencil query design.fig "//*[@cornerRadius > 0]"
# Text inside sections
open-pencil query design.fig "//SECTION//TEXT"
Export
# PNG (default)
open-pencil export design.fig
# JPG at 2x scale, quality 90
open-pencil export design.fig -f jpg -s 2 -q 90
# SVG
open-pencil export design.fig -f svg
# WEBP
open-pencil export design.fig -f webp
# JSX with Tailwind v4 utility classes
open-pencil export design.fig -f jsx --style tailwind
Example Tailwind output:
<div className="flex flex-col gap-4 p-6 bg-white rounded-xl">
<p className="text-2xl font-bold text-[#1D1B20]">Card Title</p>
<p className="text-sm text-[#49454F]">Description text</p>
</div>
Design token analysis
open-pencil analyze colors design.fig
open-pencil analyze typography design.fig
open-pencil analyze spacing design.fig
open-pencil analyze clusters design.fig # Repeated structures / component candidates
Scripting with Figma Plugin API (eval)
# Read: count children on the current page
open-pencil eval design.fig -c "figma.currentPage.children.length"
# Read: get all text node contents
open-pencil eval design.fig -c "figma.currentPage.findAll(n => n.type === 'TEXT').map(n => n.characters)"
# Write: set opacity of all selected nodes (-w writes back to file)
open-pencil eval design.fig -c "figma.currentPage.selection.forEach(n => n.opacity = 0.5)" -w
# Write: rename all frames on the page
open-pencil eval design.fig -c "figma.currentPage.findAll(n => n.type === 'FRAME').forEach((f, i) => f.name = 'Frame ' + i)" -w
# Connect to the live running desktop app (no file arg)
open-pencil eval -c "figma.currentPage.name"
open-pencil tree
open-pencil export -f png
All commands support --json for machine-readable output:
open-pencil find design.fig --type TEXT --json
open-pencil analyze colors design.fig --json
MCP Server
The MCP server exposes 90 tools (87 core + 3 file management) for AI agents to read and write .fig files.
Stdio (Claude Code, Cursor, Windsurf)
bun add -g @open-pencil/mcp
Add to your MCP client config (e.g. ~/.claude/mcp.json or Cursor settings):
{
"mcpServers": {
"open-pencil": {
"command": "openpencil-mcp"
}
}
}
HTTP server (scripts, CI)
openpencil-mcp-http
# Listens at http://localhost:3100/mcp
Claude Code desktop integration
- Install the ACP adapter:
npm i -g @zed-industries/claude-agent-acp - Add MCP permission to
~/.claude/settings.json:{ "permissions": { "allow": ["mcp__open-pencil"] } } - Open the desktop app →
Ctrl+J→ select Claude Code from the provider dropdown.
Agent skill (quick setup)
npx skills add open-pencil/skills@open-pencil
AI Chat (Built-in)
- Open with
⌘J(macOS) orCtrl+J(desktop/web). - 87 tools: create shapes, set fills/strokes, manage auto-layout, work with components and variables, boolean operations, token analysis, asset export.
- Bring your own API key — no backend or account required.
Supported providers
Configure via the provider dropdown in the chat panel:
| Provider | Env var |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
| Google AI | GOOGLE_AI_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Any compatible endpoint | Custom base URL |
Real-time Collaboration
No server, no account. Peer-to-peer via WebRTC.
- Click the Share button (top-right).
- Share the generated URL:
app.openpencil.dev/share/<room-id>. - Peers see live cursors, selections, and edits.
- Click a peer's avatar to follow their viewport.
Project Structure
packages/
core/ @open-pencil/core — engine: scene graph, renderer, layout, codec
cli/ @open-pencil/cli — headless CLI
mcp/ @open-pencil/mcp — MCP server (stdio + HTTP)
docs/ Documentation site
src/ Vue 3 app — components, composables, stores
desktop/ Tauri v2 (Rust + config)
tests/ E2E (188 tests) + unit (764 tests)
Tech stack
| Layer | Technology |
|---|---|
| Rendering | Skia (CanvasKit WASM) |
| Layout | Yoga WASM (flex + CSS Grid) |
| UI | Vue 3, Reka UI, Tailwind CSS 4 |
| File format | Kiwi binary + Zstd + ZIP |
| Collaboration | Trystero (WebRTC P2P) + Yjs (CRDT) |
| Desktop | Tauri v2 |
| AI/MCP | Anthropic, OpenAI, Google AI, OpenRouter; MCP SDK; Hono |
Development Commands
bun run dev # Start web dev server (localhost:1420)
bun run tauri dev # Start desktop app (requires Rust)
bun run check # Lint + typecheck
bun run test # E2E visual regression tests
bun run test:unit # Unit tests
bun run format # Code formatting
bun run tauri build # Production desktop build
Desktop prerequisites: Rust + Tauri v2 platform deps.
Common Patterns
Batch-rename all text nodes in a .fig file
open-pencil eval design.fig \
-c "figma.currentPage.findAll(n => n.type === 'TEXT').forEach((t, i) => t.name = 'Text_' + i)" \
-w
Extract all colors as JSON
open-pencil analyze colors design.fig --json > colors.json
Export every frame as PNG in CI
for id in $(open-pencil find design.fig --type FRAME --json | jq -r '.[].id'); do
open-pencil export design.fig --id "$id" -f png -o "frames/$id.png"
done
Query nodes matching a naming convention
# Find all nodes named with a "btn-" prefix
open-pencil query design.fig "//*[starts-with(@name, 'btn-')]"
Connect an MCP client to a running desktop app
When the desktop app is open, the MCP stdio server can connect to the live canvas. No file path needed — all reads and writes go to the open document.
{
"mcpServers": {
"open-pencil": {
"command": "openpencil-mcp"
}
}
}
Export a selection as Tailwind JSX programmatically
open-pencil export design.fig --id 1:23 -f jsx --style tailwind
Troubleshooting
openpencil-mcp not found after install
- Ensure
bun's global bin dir is on yourPATH:export PATH="$HOME/.bun/bin:$PATH" - Or use
npx openpencil-mcpas the MCP command value.
Desktop app CLI connection fails
- The desktop app must be running before issuing commands without a file argument.
- Check that no firewall rule blocks the local RPC socket.
Tauri dev build errors
- Install platform prerequisites: v2.tauri.app/start/prerequisites
- Ensure Rust is up to date:
rustup update
.fig file won't open
- Confirm the file was exported from Figma (not a
.figbackup or plugin artifact). - Run
open-pencil info design.figto check if the codec can parse the header.
AI chat returns no response
- Verify your API key is set correctly in the provider settings panel.
- For OpenRouter, ensure your key has credits and the selected model is available.
Collaboration peers not connecting
- Both peers must use the exact same share URL (room ID is case-sensitive).
- WebRTC requires both peers to allow the browser/app through any firewall.
Links
- Web app: app.openpencil.dev/demo
- Documentation: openpencil.dev
- MCP tools reference: openpencil.dev/reference/mcp-tools
- Releases: github.com/open-pencil/open-pencil/releases
- License: MIT
FAQ
What does the open-pencil-design-editor skill do?
AI-native open-source Figma alternative with CLI, MCP server, and Vue SDK for reading/writing .fig files programmatically.
How do I install open-pencil-design-editor?
Run npx skills add https://github.com/reason-machines/trending-skills --skill open-pencil-design-editor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/open-pencil-design-editor/ (personal) or .claude/skills/open-pencil-design-editor/ (project).
Which AI agents can use open-pencil-design-editor?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is open-pencil-design-editor safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains open-pencil-design-editor?
It is published by reason-machines in reason-machines/trending-skills. It has 811 recorded installs.
More from reason-machines/trending-skills
openclaw-control-center
reason-machines/trending-skills
Local-first, security-first control center for OpenClaw agents — visibility dashboard with readonly defaults, token attribution, collaboration tracing, and safe write operations.
inkos-multi-agent-novel-writing
reason-machines/trending-skills
Multi-agent CLI system for autonomous novel writing, auditing, and revision with human review gates
claude-hud-statusline
reason-machines/trending-skills
A Claude Code plugin that displays a real-time HUD showing context usage, active tools, running agents, and todo progress in your terminal statusline.
understand-anything-knowledge-graph
reason-machines/trending-skills
Turn any codebase into an interactive knowledge graph using Claude Code skills — explore, search, and ask questions about any project visually.
agency-agents-ai-specialists
reason-machines/trending-skills
A collection of specialized AI agent personalities for Claude Code, Cursor, Aider, Windsurf, and other AI coding tools — covering engineering, design, marketing, sales, and more.
agent-browser-automation
reason-machines/trending-skills
Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.