pencil-to-figma-migration
Skill1 starsChanged 4 months agoApache-2.0View on GitHub
Migrate a project's Pencil design source and workflow to Figma through Figwright, including design reconstruction, component and token reuse, visual verification, repository cutover, and cleanup of .pen files, Pencil configuration, exports, and references. Use when asked to replace Pencil with Figma, migrate design.pen or another .pen file to Figma, adopt Figwright, or remove Pencil artifacts after a verified migration.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-aeoSkill
- agent-memorySkill
- beanquerySkill
- ci-repairbaySkill
- delegated-developmentSkill
- ghSkill
- issue-blueprintSkill
- issue-workbenchSkill
- minifluxSkill
- og-imageSkill
- opSkill
- pr-comment-sweepSkill
- pr-launchpadSkill
- repo-surveyorSkill
- review-checkpointSkill
- review-repairbaySkill
- shipyardSkill
- skill-optimizerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 19 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Keep the Pencil source until the scoped Figma result is complete and visually verified.
- Distinctive: line 15
Do not change product UI code unless the user also asks for implementation.
- Distinctive: line 20
Read the repository instructions and inspect the working tree.
- Distinctive: line 27
If the destination or scope is ambiguous, ask one focused question.
- Distinctive: line 58
Do not delete anything yet.
- Distinctive: line 72
Never infer measurements or colors from screenshots when structured source or destination data exists.
- Distinctive: line 86
use component instances instead of copied subtrees.
- Distinctive: line 88
use auto layout for related content and constraints for responsive behavior.
- Distinctive: line 89
import original vectors or images only when they are genuine source assets.
- Distinctive: line 91
keep a source-to-destination node mapping.
- Distinctive: line 93
Do not recreate an entire design system merely because the source uses different names.
- Distinctive: line 100
Check mobile, tablet, and desktop variants when they exist.
- Distinctive: line 107
Do not delete the legacy source until this verification passes or the user explicitly accepts named gaps.
- Distinctive: line 113
Remove only verified legacy artifacts:
- Distinctive: line 122
Do not blindly replace historical prose if doing so would make it false.
- Distinctive: line 128
no legacy design-tool references in active project files.
- Distinctive: line 131
no deleted asset still referenced by production or docs.
- Distinctive: line 132
no unrelated working-tree changes mixed into the migration.
- Distinctive: line 134
Run git diff --check and parse any edited JSON configuration.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pencil to Figma Migration
Migrate the editable design source and the repository workflow to Figma via Figwright. Treat this as a verified reconstruction and cutover, not a filename conversion.
Non-negotiable facts
- Figwright writes to and reads from a connected Figma file; it does not directly import
.penfiles. - Keep the Pencil source until the scoped Figma result is complete and visually verified.
- Reuse the destination Figma file's variables, styles, components, and conventions before creating anything.
- Do not change product UI code unless the user also asks for implementation.
- Preserve unrelated repository changes and never delete an asset merely because it lived beside the
.penfile.
1. Establish scope and source of truth
Read the repository instructions and inspect the working tree. Determine:
- which
.penfile, pages, components, and responsive variants are in scope; - which Figma file and page are the destination;
- whether the request is design migration only, repository cutover only, or both;
- which files are source-only, generated, runtime-owned, or shared with production.
If the destination or scope is ambiguous, ask one focused question. Otherwise proceed.
Record a small mapping while working:
Pencil page/component (name + source id) -> Figma page/component (name + node id) -> verified2. Inventory before mutation
Find the legacy source, sidecars, exports, configuration, docs, and references. Include hidden and ignored files because old renders commonly live in .context/:
rg --hidden --no-ignore -n -i '\bpencil\b|design\.pen|\.pen\b|Pen\.app|mcp-server-darwin' \
--glob '!node_modules/**' --glob '!.git/**' --glob '!.next/**' \
--glob '!coverage/**' --glob '!dist/**' .
rg --files --hidden --no-ignore \
-g '!node_modules/**' -g '!.git/**' -g '!.next/**' \
-g '!coverage/**' -g '!dist/**' \
| rg -i '(^|/)(pencil|pen)(/|\.|$)|design\.pen$'Classify every result before editing:
- Design source:
.pen, source-only vectors, image placeholders. - Generated: sidecars such as
DESIGN.json, HTML renders, screenshots, DOM extraction scripts. - Workflow: MCP config, agent instructions, README/design docs.
- Implementation: comments, tests, specs, and code that cite the old source.
- Unrelated language: common-noun uses such as “pencil sketch”; do not rewrite these unless zero literal matches are explicitly required.
Do not delete anything yet.
3. Connect and ground Figma
Require the Figwright plugin to be open in the target Figma file. Run ping; stop with a clear instruction if it is not connected.
Inspect the destination before writing:
get_metadataandget_pages— confirm the file and target page.get_variable_defs— inventory reusable variables and modes.get_styles— inventory shared paint, text, effect, and grid styles.get_local_componentsorscan_components— inventory components and variants.get_design_contextandget_screenshot— understand nearby naming, structure, and visual conventions.
Never infer measurements or colors from screenshots when structured source or destination data exists. Screenshots are for visual verification.
4. Reconstruct in dependency order
Migrate only what is missing, in this order:
variables -> shared styles -> base components -> variants -> page framesFor each item:
- reuse an existing Figma variable, style, or component when its role matches;
- bind variables and styles instead of hardcoding values;
- use component instances instead of copied subtrees;
- preserve semantic names and stable mobile/tablet/desktop relationships;
- use auto layout for related content and constraints for responsive behavior;
- import original vectors or images only when they are genuine source assets;
- batch independent or atomic Figwright writes when practical;
- keep a source-to-destination node mapping.
Do not recreate an entire design system merely because the source uses different names. Map equivalent roles first; create a new destination primitive only when no equivalent exists.
5. Verify before cutover
For every scoped page and component:
- Compare the Figma screenshot with a trusted Pencil render or approved reference.
- Check mobile, tablet, and desktop variants when they exist.
- Inspect node structure, text, auto layout, constraints, and clipping.
- Confirm colors, dimensions, and typography are variable/style-bound where equivalents exist.
- Confirm component instances remain attached and variant properties survive resizing.
A migration is not complete when it only “looks close.” It must preserve content, hierarchy, responsive intent, and reusable design-system relationships.
Do not delete the legacy source until this verification passes or the user explicitly accepts named gaps.
6. Cut over the repository
Once Figma is verified, make ownership explicit: Figma is the editable design source and Figwright is the bridge. Update project instructions, design-system docs, README files, specs, comments, and test names to say Figma via Figwright where they describe the active workflow.
Remove only verified legacy artifacts:
.pendesign sources;- generated sidecars that existed only for the old design source;
- source-only assets with no remaining runtime or documentation references;
- Pencil MCP configuration;
- temporary renders, exports, DOM scripts, screenshots, and caches;
- stale file-tree entries and old node ids in docs.
Do not blindly replace historical prose if doing so would make it false. Rewrite it to describe the current Figma source or remove obsolete detail.
7. Scan again
Repeat both deep scans from step 2 after cleanup. A successful cutover has:
- no legacy design-tool references in active project files;
- no
.penfiles or Pencil-specific filenames; - explicit Figma/Figwright workflow guidance;
- no deleted asset still referenced by production or docs;
- no unrelated working-tree changes mixed into the migration.
Run git diff --check and parse any edited JSON configuration. Use the project's full test/build gates only when runtime, generated, or renderable application behavior changed; otherwise report the docs/config-only validation performed.
Completion report
Report concisely:
- what was reconstructed in Figma and how it was verified;
- which legacy files and workflow references were removed;
- which scans or repository checks passed;
- any deliberately retained artifact and why.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

