/penpot-ai-kit:penpot-build-from-codefrom penpot-ai-kit
Translates application code (React, HTML, CSS, Vue, Svelte, Tailwind) into a Penpot screen bound to an existing design system, mapping styles to semantic tokens and reusing library components.
Ships in penpot-ai-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Take an existing application artifact — JSX/TSX, HTML, Vue/Svelte templates, CSS/Tailwind, a
styled-components tree — and rebuild it as an editable Penpot screen bound to the file's design
system. Work as a senior design engineer for whom the design system is the single source of
truth: a code-derived #0066FF is not a fill, it is a lookup into the token set; a <Button> is an
instance of the library Button, not a rounded rectangle.
The one rule: never one-shot a screen, and never hardcode a value a token already expresses.
Discover the system first, then build one section per execute_code call, resolving every fill,
spacing, radius and type value against the discovered tokens. No match → propose a token and stop;
do not invent it.
Tool surface: shared/penpot-mcp-tool-reference.md. API traps: shared/plugin-api-gotchas.md (the
#n below). Verify any signature you are unsure of with penpot_api_info.
<SettingsPage> as an editable board bound to the semantic set,
reusing Button, InputField and Card".detach() without
approval; semantic tokens over primitives; viewport width.validateScreen.js); zero unreported raw values; every part with a matching library component is
an instance; all spacing on the 4px grid; semantic layer names.Before every ✋ checkpoint that shows visual work, run the export → look → fix loop of
shared/visual-self-review.md (max 2 self-fixes).
Phase 0 — Discovery (read-only). high_level_overview, then scripts/inspectDesignSystem.js:
every token (name, type, resolvedValue) and library component (name, id, variant axes), kept as
plain data in storage.run.ds — a value → token reverse index and a component-by-role catalog
(references/01-discovery.md). Check penpot.library.connected too: the system may live in a
connected library. Parse the code into a section outline and a style inventory in which every
distinct value is matched to a token or flagged UNMAPPED.
✋ Show token / component coverage and the UNMAPPED list; ask which become proposed tokens and which
are documented exceptions.
Phase 1 — Screen wrapper. scripts/createScreenWrapper.js (idempotent by name): a viewport-sized
flex column Board with its background, gap and padding bound to tokens, and the RUN_ID ledger.
✋ Export the empty board; confirm size and orientation.
Phase 2 — Sections, one per call. scripts/buildSection.js for one section from its code fragment
(references/02-component-assembly.md, 03-token-binding.md, 04-incremental-transform.md):
component.instance() for every part with a catalog match, raw shapes only for bespoke parts, every
value bound with applyToken. In a separate, later call read shape.tokens to confirm the
bindings; then export the section.
✋ Show the section; approval covers this section only — name the next one before continuing.
Phase 3 — Validate and report. scripts/validateScreen.js: token coverage %, raw values, structure
sanity (layouts set, no auto-named layers, instances vs shapes). Then the structured report
(AGENTS.md §12). ✋ Coverage and remaining gaps; sign-off.
applyToken. Unmatched → add it
to ledger.proposedTokens (name, value, tier) and stop for approval; never write the raw value, and
never add a literal "as a fallback" because a read-back looked empty.shape.tokens in a later call. Guard every apply (shape.tokens[prop] !== tok.name): re-applying a
bound token removes the binding, and so does a literal write to a bound property.p-5 (20px) maps to the spacing token for 20, not to a
literal; an off-grid code value is rounded to the nearest grid token and reported.color.action.primary.bg, not color.blue.500).switchVariant(pos, value) takes the property index (#9). No detach() without approval.buildSection.js returns skippedNodes: true instead of duplicating children.layoutChild.* only after appendChild
(#15); run the clearFlip sweep after sections that use fill sizing (#16); structural boards get
fills = [], surfaces a bound token (#11).growType after any resize() (#3); exact font match with
penpot.fonts.all.find(f => f.name === "…") (#13b).screen-<view>; sections by semantic role (header, nav, card-grid);
instances keep their component name. Never Rectangle 12.More traps with code-translation examples: references/05-anti-rationalization.md. Failures and
fixes: references/06-error-recovery.md.
Mode review (shared/modes-and-policies.md). Safe set: semantic renaming of layers it created,
and swapping a raw value for a token whose resolved value is exactly equal. Always reviewed: the
screen board and any geometry, instancing or restructuring components, any proposed token, detach(),
and any token match that is a judgement call.
Ledger (shared/state-management.md, namespace penpot-ai, RUN_ID such as bfc-2026-06-05-a):
{ runId, phase, boardId, created, sectionsBuilt, proposedTokens, exceptions, pendingReview };
storage.run.ds caches the design-system map. Resume: read the ledger, re-run
inspectDesignSystem.js, read the board's structure to see which sections exist, continue.
Related skills: penpot-build-screen (from a brief), penpot-foundations (when there are no tokens to
map onto), penpot-audit-accessibility (after the build).
01-discovery.md, 02-component-assembly.md, 03-token-binding.md,
04-incremental-transform.md, 05-anti-rationalization.md, 06-error-recovery.md.execute_code) — inspectDesignSystem.js (Phase 0, read-only),
createScreenWrapper.js (Phase 1), buildSection.js (one per section), validateScreen.js
(Phase 3, read-only).Doctrine paths. shared/… and policies/… resolve inside this bundle in native installs (vendored by the installer); in a Claude Code plugin install they live at the plugin root — ${CLAUDE_PLUGIN_ROOT}/shared/…, two directories up from this file.
references/01-discovery.md (opens in a new tab)references/02-component-assembly.md (opens in a new tab)references/03-token-binding.md (opens in a new tab)references/04-incremental-transform.md (opens in a new tab)references/05-anti-rationalization.md (opens in a new tab)references/06-error-recovery.md (opens in a new tab)scripts/buildSection.js (opens in a new tab)scripts/createScreenWrapper.js (opens in a new tab)scripts/inspectDesignSystem.js (opens in a new tab)scripts/validateScreen.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub penpot/penpot-ai-kit --plugin penpot-ai-kit15 skills in this plugin
/penpot-anti-slopOpt-in layer that keeps Penpot designs from looking generically AI-generated: a direction step before building, a scored 0–100 slop check of a screen or deck (tree probes + visual review), and reviewed fixes. Triggers: 'avoid the AI look', 'does this look AI-generated', 'anti-slop check', 'make it feel less generic', 'evitar estética IA', '¿parece hecho por IA?'./penpot-audit-accessibilityAudit a Penpot design against WCAG 2.1/2.2 AA (optionally AAA) and produce a structured severity report: color contrast, touch/target sizes, text alternatives, heading hierarchy, and keyboard/focus order. Proposes fixes — does not auto-apply. Also serves as the Evaluator in the brief-to-screen and brief-to-deck loops (scope:deck = slide contrast rules). Triggers: 'check accessibility', 'accessibility audit', 'WCAG check', 'contrast audit', 'a11y review', 'check color contrast', 'is this accessible'./penpot-audit-tokensAudit a Penpot design for design-system / token GOVERNANCE issues (distinct from accessibility): hardcoded colors where a token exists, off-grid spacing, orphan/unresolved/unused tokens, duplicated values, and detached parts that should be component instances. Produces a severity report and suggests semantic-token swaps. Triggers: 'audit tokens', 'find hardcoded colors', 'token governance', 'check design system consistency', 'find off-grid spacing', 'detect raw values', 'are we using tokens correctly'./penpot-build-deckDesign a presentation / slide deck in Penpot from a brief, as a senior presentation designer: 1920x1080 slide boards built one slide per call from an approved outline, a committed deck style, varied slide archetypes (cover, agenda, section, content, big-number, comparison, grid, bento, quote, timeline, image-bleed, closing), tokenized, wired into a playable View-mode flow and exportable to PDF. NOT for app screens (use penpot-build-screen). Triggers: 'create a presentation', 'build a slide deck', 'design slides in Penpot', 'pitch deck', 'keynote', 'make slides for this talk', 'turn this outline into slides'./penpot-build-screenDesign production-grade screens in Penpot from a brief, as a senior visual designer — reusing the existing design system (tokens + components) and assembling section by section, never one-shot. Use to create a screen/page/landing/dashboard from a description. NOT for translating existing code (use penpot-build-from-code). Triggers: 'design a dashboard', 'create a landing page', 'design this app screen', 'build a UI from this brief', 'design a settings page', 'mock up a screen in Penpot'./penpot-component-factoryBuild and maintain Penpot components with COMPLETE variant matrices — sizes, hierarchies, and all interactive states (default/hover/pressed/focus/disabled) — fully tokenized and correctly named. Use to create a new component with variants, fill in missing states, or normalize an existing component. Triggers: 'create a Button component with variants', 'build component variants', 'add hover/pressed/disabled states', 'make a variant matrix', 'turn this into a component with sizes', 'normalize this component'.Other plugins' skills for the same job