open-pencil
Ce qu’il fait
Cette compétence permet à votre IA de travailler avec les fichiers de design .fig et l'éditeur OpenPencil, notamment en lisant leur structure, en exportant des images et en modifiant les designs. Elle s'adresse aux designers et aux développeurs qui travaillent avec ces fichiers.
Quand l’utiliser
- ✓Quand vous demandez à votre IA d'ouvrir ou d'inspecter un fichier de design .fig.
- ✓Quand vous voulez exporter un design en PNG, SVG, PDF ou JSX.
- ✓Quand vous voulez analyser des jetons de design ou modifier un design à partir d'un script.
Lien du skill
https://github.com/open-pencil/open-pencil/blob/master/skills/open-pencil/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Exporte le cadre Login de ce fichier de design en SVG.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La compétence fonctionne de deux façons. Elle peut se connecter à l'application OpenPencil déjà ouverte, ou travailler directement sur un fichier .fig que vous indiquez. Elle utilise l'outil en ligne de commande OpenPencil et son serveur MCP pour lire et modifier le design.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
OpenPencil
OpenPencil provides a CLI and MCP server for .fig design files and the running OpenPencil editor.
Use two modes:
- App mode — connect to the running OpenPencil editor by omitting the file argument.
- Headless mode — work with
.figfiles directly by passing a file path.
# App mode — operates on the document open in the editor
openpencil tree
# Headless mode — operates on a .fig file
openpencil tree design.fig
Use openpencil --help, per-command help, and the connected MCP server’s tool schemas to check the installed version’s capabilities. See the CLI reference and MCP guide for current documentation.
Variable formulas
Inside eval, use openpencil.setVariableFormula('Spacing', 'large', '{base} * 2') for numeric formulas or openpencil.setVariableFormula('State', 'visible', '{viewport} > 1024 and not {loading}') for Boolean formulas, which use and, or, not and number comparisons. Collections and variables must already exist. An optional fourth argument selects a mode by name; otherwise the default mode is edited. The call validates before mutation and returns the resolved value. Length formulas use stored pixels. The CSS stylesheet writes number formulas as calc(); design-token files hold the result with the formula in $extensions.
Variables follow Figma's plugin API: figma.variables.getLocalVariables(), createVariable(name, collection, type), variable.setValueForMode(modeId, value), and node.setBoundVariable(field, variable) with Figma's field names (characters, width, paddingLeft) and types; paint colours bind through figma.variables.setBoundVariableForPaint. To bind as the layer panel does, use openpencil.bindVariable(node, field, variable) and openpencil.unbindVariable(node, field) with OpenPencil names (text, visible, opacity, fills/0/color): text content takes a text or number variable, shown as text; visibility a boolean or text one. openpencil also sets layout and text direction (setLayoutDirection, setTextDirection), OkHCL paint colors (setFillOkHCL, setStrokeOkHCL), writes styled text from Markdown (setTextMarkdown(text, markdown), or set_text with markdown: true), exposes instance swaps (exposeInstanceSwap), and reports font availability (getFontStatus()); booleans and flattening are Figma's figma.union, subtract, intersect, exclude and figma.flatten.
Requirements
# CLI
bun add -g @open-pencil/cli
# MCP server used by the desktop app and external MCP clients
bun add -g @open-pencil/mcp
The desktop app starts openpencil-mcp-http automatically in production Tauri builds when @open-pencil/mcp is installed globally and exposes automation on:
- HTTP/RPC:
http://127.0.0.1:7600 - WebSocket bridge:
ws://127.0.0.1:7601 - MCP Streamable HTTP:
http://127.0.0.1:7600/mcp
CLI Commands
openpencil --help
Common commands:
info— document overview: pages, node counts, fontstree— print hierarchy with types and sizespages— list pagesnode— detailed node properties by IDselection— current selection from the running appfind— find nodes by name/typequery— XPath selectors for node searchvariables— list variables and collectionstokens— variables as a CSS custom-property stylesheet, a Tailwind v4 theme, or W3C design token files (--format dtcg --out <folder>)export— export PNG/JPG/WEBP/SVG/PDF/JSX/.figconvert— convert between supported document formatsanalyze— colors, typography, spacing, repeated clusterslint— consistency, structure, and accessibility checksformats— supported document/export formatseval— execute JavaScript with the Figma Plugin APItool— list, describe, and call any MCP tool from the shell, in app or headless modedocuments— list, open, create, save, close, and activate documents in the running appundo/redo— step back through your own (automation) changes in the running appsettings— read and change editor settings in the running app
Inspect
openpencil info design.fig
openpencil tree design.fig
openpencil tree --page "Components" --depth 3 # app mode
openpencil pages design.fig
openpencil node design.fig --id 1:23
openpencil node --id 1:23 # app mode
openpencil selection --json
openpencil variables design.fig
openpencil variables --
Questions fréquentes
Dois-je avoir l'application ouverte ?
Non. Vous pouvez donner le chemin d'un fichier pour travailler directement dessus, ou ne rien indiquer pour utiliser l'application ouverte.
Peut-elle modifier mon design ?
Oui. Elle peut modifier les designs par programme, donc vérifiez le résultat après les changements.
Où trouver les commandes ?
La compétence renvoie vers l'aide et la référence de la ligne de commande OpenPencil pour la version que vous avez installée.
Détails
Description originale de l’auteur
Work with Figma .fig design files and the running OpenPencil editor — inspect structure, query nodes, analyze design tokens, export PNG/SVG/PDF/JSX, and modify designs programmatically. Use when asked to open, inspect, export, analyze, or edit .fig files, or to control the running OpenPencil app.
repo: open-pencil/open-pencil
Popularité
- Étoiles GitHub
- 9.5k
- Position au classement
- #12225
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Skills similaires
canvas
394kPermet à votre agent d'afficher un widget visuel hébergé sur un panneau Mac connecté, puis de masquer ce panneau ou de le déplacer vers une autre page.
control-ui
394kAide votre agent à organiser et dépanner l'interface de contrôle d'OpenClaw, y compris les sessions, les tableaux de bord et les passerelles connectées.
diagram-maker
394kAide votre agent à créer des diagrammes clairs en SVG, HTML ou Excalidraw modifiable, pour des processus, des architectures système et des croquis de tableau blanc.