/penpot-ai-kit:penpot-rename-layersfrom penpot-ai-kit
Renames Penpot layers from auto-generated names (e.g. 'Rectangle 12') to semantic HTML element names or kebab-case role names. Useful for design-to-code handoff, accessibility audits, and design system maintenance.
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.
Give every layer the semantic HTML element name it represents (nav, header, main, section,
button, input, label, h1–h6, p, ul, li, img…) or, where no element fits, a
kebab-case role name (card-grid, button-group, field-row). Work as a design-systems engineer
who treats layer names as the contract between design and code. Semantic names are what the
accessibility audit reads heading order from, what design-to-code review maps onto elements, and what
makes a handoff legible.
A rename is a plain property write — shape.name = "button" — synchronous, and it touches no geometry.
The one rule: plan first, and only auto-apply renames of auto-named layers. Classify every layer, show the before → after plan, then rename in batches:
Rectangle 12, Group 4) → safe: renamed without asking (autofix).Hero copy v2) → review: never overwritten without approval.Tool surface: shared/penpot-mcp-tool-reference.md. API traps: shared/plugin-api-gotchas.md.
shared/naming-conventions.md.h1–h6; interactive containers are button / input / select / label; list containers are
ul / ol with li children; every changed meaningful name has a recorded reason; 0 main component
shapes renamed.Phase 0 — Discovery (read-only). high_level_overview, then scripts/inspectLayerStructure.js
(references/01-inspection.md): per shape its id, name, type, nameStatus
(auto-generated | semantic | custom), size and position hints, child types, text properties and
component flags. Keep the inventory in storage (data only). ✋ Show inventory + stats; confirm scope.
Phase 1 — Inference (no writes). Apply references/02-semantic-inference.md to the inventory and
build the rename map { shapeId: { old, new, bucket: "safe" | "review" | "ambiguous", reason, confidence } }. ✋ Present the full before → after table grouped by bucket; get approval for the
review and ambiguous rows (safe rows are shown, not asked).
Phase 2 — Renaming (batched). scripts/renameLayer.js with the approved RENAME_MAP
(references/03-renaming-strategy.md): top-down, at most 100 per call, skipping main component shapes
and layers already at their target name; it returns before/after pairs. Write the ledger after each
batch. ✋ Export the renamed board (not "page") with renamed / skipped / error counts.
auto-generated → semantic only. Any change to a meaningful name is review.isComponentMainInstance() — true for the main instance and
everything inside it; skip and report those. Copies (isComponentCopyInstance()) may be renamed.
Do not test isComponentInstance() === false: the main instance is an instance too.resize(), no reparenting, no "while I'm here" padding fix — note the
observation for another skill.h1 per region, then h2, h3 in
order. Several h1s defeat the audit this skill prepares for.ul / ol, children li — not a row of sections.
Siblings sharing an element get a descriptor: button-primary, li-pricing.More excuses and their countermeasures: references/04-anti-rationalization.md.
Mode autofix, narrowly (shared/modes-and-policies.md): only the safe bucket is applied without
asking; review and ambiguous rows wait for the Phase 1 approval; in suggest mode only the plan
is produced.
Ledger (shared/state-management.md, namespace penpot-ai, RUN_ID such as rename-2026-06-05-a):
{ runId, phase, scope, renameMap, decisions, assumptions, pendingReview }. Resume by reading the
ledger and re-reading the tree; idempotency makes re-running a batch safe.
references/01-inspection.md — traversal, name-status classification, component detection, scope.references/02-semantic-inference.md — inference rules, the output vocabulary, heading levels,
ambiguity handling.references/03-renaming-strategy.md — batching, idempotency, validation, ledger and resume.references/04-anti-rationalization.md — excuses and countermeasures.scripts/inspectLayerStructure.js (Phase 0, read-only) · scripts/renameLayer.js (Phase 2).Board.isComponentMainInstance / isComponentCopyInstance with penpot_api_info("Board").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-inspection.md (opens in a new tab)references/02-semantic-inference.md (opens in a new tab)references/03-renaming-strategy.md (opens in a new tab)references/04-anti-rationalization.md (opens in a new tab)scripts/inspectLayerStructure.js (opens in a new tab)scripts/renameLayer.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
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-from-codeTranslate an existing application page, view, or component code into a Penpot screen that is bound to the existing design system — mapping code styles onto semantic tokens and reusing library components instead of raw shapes. Use when the user has real code/markup and wants it reconstructed in Penpot, section by section, on-system. Triggers: 'build this in Penpot from code', 'turn this React/HTML/CSS into a Penpot screen', 'recreate this view in Penpot', 'port this page to Penpot', 'translate this component to Penpot bound to our tokens', 'code to Penpot'./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'.Other plugins' skills for the same job