Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add perniemann/pnCore --skill pn-figma-design-to-codegit clone --depth 1 https://github.com/perniemann/pnCoreWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/perniemann/pncore/pn-figma-design-to-code)<a href="https://agentmods.dev/skills/perniemann/pncore/pn-figma-design-to-code"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-figma-design-to-code/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-figma-design-to-code"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-figma-design-to-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.01103 |
| Opus 5 | $0.00020 | $0.00551 |
| Sonnet 5 | $0.00008 | $0.00221 |
| Haiku 4.5 | $0.00004 | $0.00110 |
Grade A, and why
pn-figma-design-to-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Figma design-to-code skill
When to use
- Implementing UI from Figma designs
- Extracting design tokens (colors, spacing, typography) from Figma
- Mapping Figma components to React, Astro, or Next components
- Reviewing implementation against design specs
- Setting up design-to-code workflows or tooling
Design-to-code workflow
- Inspect the design: Identify layout (auto-layout, constraints), spacing, typography, colors, and component structure. Use Figma's inspect panel or dev mode for exact values.
- Map to components: Match Figma frames/components to React, Astro, or Next components. One Figma component or frame typically maps to one component file.
- Extract tokens first: Before coding, extract colors, spacing, and typography into design tokens. Avoid hardcoding values from the design.
- Implement with tokens: Build components using tokens. Reference design for structure and hierarchy, not raw pixel values.
- Verify: Compare implementation to design (screenshots, overlay, or Figma embed). Check responsive behavior at breakpoints.
Token extraction from Figma
- Colors: Extract fill colors from styles or layers. Map to semantic tokens (e.g. primary, secondary, text, background). Include opacity variants. Use hex or RGB; convert to CSS variables.
- Typography: Extract font family, size, weight, line height, letter spacing. Map to type scale tokens (e.g.
--text-heading-lg,--text-body). Note font fallbacks. - Spacing: Extract padding, gap, and margin values. Normalize to spacing scale (e.g. 4, 8, 12, 16, 24, 32). Avoid one-off values; round to nearest scale step when reasonable.
- Radius, shadow: Extract border radius and shadows. Map to tokens (e.g.
--radius-md,--shadow-card). - Output format: Prefer CSS variables or design tokens JSON. Use pn-design-system skill for token structure and naming.
Implementation patterns
- Auto-layout → Flexbox/Grid: Figma auto-layout maps to
display: flexordisplay: grid. Usegapfor spacing;align-items,justify-contentfor alignment. Preserve direction (horizontal/vertical). - Constraints → Responsive: Figma constraints (left/right, top/bottom, scale) inform responsive behavior. Use
width: 100%,max-width, orclamp()as appropriate. - Variants → Props: Figma component variants map to component props (e.g.
variant="primary",size="lg"). Use consistent prop names. - Naming: Use Figma layer/component names as a guide for component and class names. Sanitize (PascalCase for components, kebab-case for CSS). Avoid spaces and special characters.
- Assets: Export images/icons from Figma; use SVG when possible. Optimize and use responsive
srcsetfor raster images.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 72 lines · 40 tokens per session scan A e42c2bd6020d
pn-figma-design-to-code is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 40 tokens to every session and 1,103 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
brand-landingpage
Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established…
wcag-audit-patterns
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
openkb-html-critic
Use to review a generated HTML deck or single-page artifact for visual quality and structural correctness. Especially good at catching CSS specificity bugs where slide-modifier classes (.divider, .center, .q, .flow etc.) accidentally override the base .slide{display:none} and cause one slide to stack on top of every…
decocms-ui
Build or style React UI with the decocms product design system (@decocms/ui). Use when creating interfaces, pages, or components in a project that should look like decocms products, when the user mentions "design system", "@decocms/ui", "decocms style", or asks to make UI consistent with Studio. Covers installation…
apply-mantel-styles
Provides guidelines for applying Mantel's brand styles to diagrams and frontend components. Use when asked to create visuals that need to align with Mantel's branding.
web-artifacts-builder-v2
Suite of tools for creating elaborate, multi-component claude.ai HTML artefacts using modern frontend web technologies (React 19, Tailwind CSS v4, shadcn/ui). Use for complex artefacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artefacts.