southleft/skills-for-figma

check-design-parity-figma

Compare a Figma node's actual specs against a code spec (the values your component renders) and get a 0–100 parity score, a list of discrepancies, and fix suggestions.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/southleft/skills-for-figma --skill check-design-parity-figma

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

check-design-parity-figma — design vs code drift checker

Pull a Figma node's real specs and diff them against a codeSpec (what your implementation actually renders). Returns a weighted parity score, per-property discrepancies with severity, and suggested fixes. This is the inverse of code generation: get_design_context turns a design into code; this skill confirms the code didn't drift away from the design.

All design reads go through use_figma, so it works on any Figma plan.

Skill boundaries

  • `use_figma` rules — load the official `figma-use` skill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-level await + return (no IIFE, no figma.closePlugin(); console.log is not returned), inputs inlined as const at the top of each script, colors in 0–1 range, load fonts before any text op, await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).
  • Generating code from a design → that's the native get_design_context; this skill validates, not generates.
  • CODE-side a11y to feed `codeSpec.accessibility` → use scan-code-accessibility-figma

(--map-to-codespec emits exactly that object).

  • Design-side WCAG lint → use lint-design-figma.

Workflow

  1. Assemble the codeSpec. Gather the values your component renders into the codeSpec object

(references/parity-scoring.md has the full shape). You only need to fill the sections you want compared — visual, spacing, typography, accessibility. Tip: scan-code-accessibility-figma --map-to-codespec builds codeSpec.accessibility automatically.

  1. Read the design specs. Set NODE_ID and paste your codeSpec into

`scripts/check-parity.js`. Run it via use_figma (skillNames: "check-design-parity-figma"). It extracts the node's fills, strokes, corner radius, opacity, padding/gap, and text properties, then diffs them against the codeSpec.

  1. Read the scorecard. summary.parityScore is `max(0, 100 − (critical×15 + major×8 + minor×3 +

info×1)). discrepancies[] lists each mismatch with category, property, severity, designValue, codeValue, and a suggestion`.

  1. Decide which side to fix. Each discrepancy says what design has vs what code has. Update code to

match the design, or push the design to match an intentional code change (via manage-variables-figma / figma-use), then re-run to confirm the score rose.

Key rules

  • Colors are 0–1 in Figma; the script converts to hex and normalizes both sides before comparing.
  • Only filled codeSpec sections are compared. Omit a section to skip it — no false positives for

data you didn't provide.

  • Numeric tolerance: dimensions compare with a small epsilon (≈2px for width/height, 0.01 for

opacity) so sub-pixel rounding doesn't register as drift.

  • Severity drives the score: color/spacing mismatches are major (−8), radius/border-width/opacity

are minor (−3). See parity-scoring.md for the full weighting.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
southleft
커뮤니티

analyze-component-set-figma

Analyze a Figma COMPONENTSET as a state machine for code generation — extract variant axes (state/size/etc.), map state variants to CSS pseudo-classes (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), and compute per-variant visual diffs (only what changes per state). Use when generating an interactive component from a Figma variant set — triggers: 'analyze this component set', 'turn these variants into CSS states', 'generate a button/input/checkbox from Figma varia

설치 수
1
GitHub Stars
14
업데이트
6월 1일
southleft
커뮤니티

annotations-figma

Read and write designer annotations on Figma nodes — node-level design specs that pin properties (fills, width, fontSize, etc.) and carry plain or markdown notes. Use when the user wants to document or inspect interaction specs, animation timings, easing, accessibility requirements, or implementation notes attached directly to a node. Triggers: 'add an annotation', 'annotate this node/component', 'read the annotations on…', 'what specs are pinned to this element', 'list annotation categories', '

설치 수
1
GitHub Stars
14
업데이트
6월 1일
southleft
커뮤니티

audit-accessibility-figma

Deep accessibility scorecard for a single Figma component or component set — state coverage (default/hover/focus/disabled/error/active/loading), focus-indicator quality and contrast, non-color state differentiation, target size, annotation completeness, and color-blind simulation (protanopia/deuteranopia/tritanopia), all rolled into per-category 0–100 scores and prioritized recommendations. Use when the user wants to vet ONE component before shipping it: triggers 'audit this component', 'accessi

설치 수
1
GitHub Stars
14
업데이트
6월 1일
southleft
커뮤니티

component-properties-figma

Add, edit, and delete Figma component properties (TEXT, BOOLEAN, INSTANCESWAP, VARIANT) on a COMPONENT or COMPONENTSET, and instantiate a component then set its instance properties. Use when authoring or wiring up a component's API in Figma — triggers: 'add a component property', 'add a boolean prop to this component', 'make this text a component property', 'add an instance-swap slot', 'create a variant property', 'rename/delete a component property', 'place an instance of this component', 'inst

설치 수
1
GitHub Stars
14
업데이트
6월 1일