design-spec-rules

design-spec-rules is a skill for Claude Code from artivilla/agents-config. It costs 33 tokens per session (786 once invoked), scanned A, original, MIT.

A set of rules for turning Figma designs, mockups, or other design specifications into matching interface code.

In plain words
What is it for?
Use it to review or build interfaces with accurate spacing, grids, breakpoints, borders, shadows, and component hierarchy.
Why use it?
It reduces invented layouts and approximate styling by requiring the implementation to follow the supplied design’s structure, measurements, colors, and typography.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to review or build interfaces with accurate spacing, grids, breakpoints, borders, shadows, and component hierarchy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/artivilla/agents-config/design-spec-rules
Install

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.

Any agent
npx skills add artivilla/agents-config --skill design-spec-rules
Clone the repo
git clone --depth 1 https://github.com/artivilla/agents-config

Made for: Claude Code.

Wrote 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.

agentmods badge for design-spec-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/artivilla/agents-config/design-spec-rules/github.svg)](https://agentmods.dev/skills/artivilla/agents-config/design-spec-rules)
Your own site
<a href="https://agentmods.dev/skills/artivilla/agents-config/design-spec-rules"><img src="https://agentmods.dev/badge/skills/artivilla/agents-config/design-spec-rules/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.

agentmods 80×15 button for design-spec-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/artivilla/agents-config/design-spec-rules"><img src="https://agentmods.dev/badge/skills/artivilla/agents-config/design-spec-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00786
Opus 5 $0.00016 $0.00393
Sonnet 5 $0.00007 $0.00157
Haiku 4.5 $0.00003 $0.00079

Measured 8d ago against content hash e4f151ea453e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

design-spec-rules 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.

skills/design-spec-rules/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design Implementation Rules

You are a design engineer enforcing strict design-to-code fidelity. Review code to ensure it faithfully implements the provided design specifications.

Mode

If $ARGUMENTS is provided, analyze that specific file or pattern. If $ARGUMENTS is empty, ask the user which file(s) to review.


Rules

1. NEVER Assume Designs

  • Do NOT create or invent UI elements, layouts, or styling
  • Do NOT use generic templates or boilerplate designs
  • If design specifications are unclear, ASK before proceeding
  • Wait for explicit design files, mockups, or detailed descriptions

2. Use Styling from Figma

  • Extract ALL styles directly from Figma (colors, typography, spacing, shadows, borders)
  • Use Figma's Inspect panel for precise values
  • Copy CSS properties verbatim when provided
  • Maintain exact hex/RGB values — do NOT approximate colors

3. Stick to the Layout

  • Implement the exact layout structure shown in designs
  • Preserve grid systems, column counts, and breakpoints
  • Do NOT rearrange elements for "better UX" without approval
  • Match component hierarchy exactly as designed

4. Respect Spacing, Outlines & Layout

  • Use exact padding, margin, and gap values from Figma
  • Maintain precise alignment (use Figma's spacing indicators)
  • Preserve border-radius, stroke widths, and outline styles
  • Pay attention to optical alignment adjustments (+1px tweaks)

5. Always Download Icons as SVG

  • Extract icons as SVG from Figma (unless explicitly told otherwise)
  • Preserve viewBox, stroke-width, and path data
  • Maintain icon dimensions and styling properties
  • Use inline SVG or optimize with SVGO when appropriate

Output Format

═══════════════════════════════════════════════════
IMPLEMENTATION FIDELITY: [filename]
═══════════════════════════════════════════════════

ASSUMED DESIGNS (X issues)
──────────────────────────
[ASSUMED] Line 12: Invented a dropdown menu not in the design spec
  Fix: Remove or confirm with designer before implementing

STYLING (X issues)
──────────────────
[COLOR] Line 34: Color #333333 doesn't match Figma value #2D2D2D
  Fix: Use exact value from Figma inspect panel

LAYOUT (X issues)
─────────────────
[LAYOUT] Line 56: Grid changed from 3-column to 2-column
  Fix: Restore original 3-column grid from design

SPACING (X issues)
──────────────────
[SPACING] Line 78: Gap is 16px but Figma shows 24px
  Fix: Update gap to 24px

ICONS (X issues)
────────────────
[ICON] Line 90: Icon imported as PNG instead of SVG
  Fix: Re-export from Figma as SVG with preserved viewBox

═══════════════════════════════════════════════════
SUMMARY: X assumed, X styling, X layout, X spacing, X icon issues
Score: XX/100
═══════════════════════════════════════════════════

Read the full file on GitHub · 103 lines

Changes

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.

  1. 8d ago First seen · 103 lines · 33 tokens per session scan A e4f151ea453e

Subscribe to this mod's changes

design-spec-rules is a skill published in the GitHub repository artivilla/agents-config (0 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 786 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-08-31.

Related

Other skills, from other repositories

aksel-spacing

Lag responsive layouts med Aksel Design System (v8+) - spacing tokens, layout primitives (Box, HStack, VStack, HGrid, Page, Bleed) og ResponsiveProp.

navikt/copilot · 41 tokens

web-design-reviewer

Visuell inspeksjon av nettsider for å identifisere og fikse designproblemer. Trigges av forespørsler som "sjekk designet", "gå gjennom UI-en", "fiks layouten", "finn designfeil". Finner problemer med responsivt design, tilgjengelighet, visuell konsistens og layout, og fikser dem i kildekoden.

navikt/copilot · 89 tokens

design-shiny-ui

Design Shiny application UIs using bslib for theming, layoutcolumns for responsive grids, value boxes, cards, and custom CSS/SCSS. Covers page layouts, accessibility, and brand consistency. Use when building a new Shiny app UI from scratch, modernizing an existing app from fluidPage to bslib, applying brand theming…

pjt222/agent-almanac · 96 tokens

pw-admin-ui

Use when designing, structuring, or rendering HTML for ProcessWire Admin interfaces, custom Process modules, or Inputfields.

trk/processwire-boost · 28 tokens

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

lingxling/awesome-skills-cn · 64 tokens

design-system

DaisyUI + Tailwind CDN design system spec. Preloaded into design-related agents and referenced by design skills.

pcatattacks/solopreneur-plugin · 26 tokens