tdd-from-figma

tdd-from-figma is a skill for Claude Code from PMDevSolutions/Aurelius. It costs 92 tokens per session (5,624 once invoked), scanned A, original, MIT.

A test-first workflow for building interface components from Figma designs and locked design values. TDD, or test-driven development, means writing failing tests before writing the code that makes them pass.

In plain words
What is it for?
Use it to create tests for React components from a build specification and design-token file, including templates for browser extensions, progressive web apps, and web apps.
Why use it?
It catches differences in text, structure, accessibility labels, and design values before implementation is complete. This gives each component a concrete behavioral and visual target.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is const { handleMessage } = await import("../background/handler");.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 tdd-from-figma

README.md
[![agentmods](https://agentmods.dev/badge/skills/pmdevsolutions/aurelius/tdd-from-figma.svg)](https://agentmods.dev/skills/pmdevsolutions/aurelius/tdd-from-figma)
Your own site
<a href="https://agentmods.dev/skills/pmdevsolutions/aurelius/tdd-from-figma"><img src="https://agentmods.dev/badge/skills/pmdevsolutions/aurelius/tdd-from-figma.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,624 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00092 $0.05624
Opus 5 $0.00046 $0.02812
Sonnet 5 $0.00018 $0.01125
Haiku 4.5 $0.00009 $0.00562

Measured yesterday against content hash d90959ef57b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tdd-from-figma 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 yesterday.

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.

.claude/skills/tdd-from-figma/SKILL.md · 740 lines

How it starts

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

TDD from Figma — Tests Before Components

Purpose

Write comprehensive test files for every component BEFORE writing implementation code. Tests use exact values from design-tokens.lock.json — text content, ARIA roles, component structure — so the implementation is constrained to match the design precisely. This eliminates label drift, missing accessibility attributes, and structural deviations.

When to Use

  • Phase 3 of the /build-from-figma pipeline (after design-token-lock)
  • Any time you're about to generate React components from Figma and want TDD discipline
  • When adding new components to an existing Figma-derived codebase

Inputs

  • Required: src/styles/design-tokens.lock.json (from design-token-lock skill)
  • Required: .claude/plans/build-spec.json (from figma-intake skill)
  • Optional: Figma MCP access for additional structural context

TDD Cycle (Per Component)

Red Phase: Write Failing Tests

For each component in build-spec.json, write a test file BEFORE any implementation exists.

Test file location: Mirror the component path with .test.tsx suffix:

  • src/components/ui/Button.tsxsrc/components/ui/Button.test.tsx
  • src/components/sections/HeroSection.tsxsrc/components/sections/HeroSection.test.tsx

Test categories to cover:

1. Rendering Tests
import { render, screen } from "@testing-library/react";
import { describe, it, expect } from "vitest";
import { Button } from "./Button";

describe("Button", () => {
  it("renders without crashing", () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole("button")).toBeInTheDocument();
  });
});
2. Text Content Tests (from lockfile)
// Values pulled directly from design-tokens.lock.json textContent
it("displays correct heading text", () => {
  render(<HeroSection />);
  expect(screen.getByText("Build faster with AI")).toBeInTheDocument();
});

it("displays correct subheading", () => {
  render(<HeroSection />);
  expect(screen.getByText("Ship production apps in days, not months")).toBeInTheDocument();
});

it("displays correct CTA text", () => {
  render(<HeroSection />);
  expect(screen.getByRole("button", { name: "Get Started" })).toBeInTheDocument();
});

Read the full file on GitHub · 740 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. yesterday First seen · 740 lines · 0 tokens per session scan A d90959ef57b3

Subscribe to this mod's changes

tdd-from-figma is a skill published in the GitHub repository PMDevSolutions/Aurelius (8 stars, last pushed 21d ago), licensed MIT. It adds 92 tokens to every session and 5,624 once invoked, about $0.0005 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-04.

Related

Other skills, from other repositories

mcp-sdk-audit

Upgrade @modelcontextprotocol/server (the MCP TypeScript SDK v2) and prove the wire contract survived. The SDK is a runtime dependency whose breakage lands on the wire, not in the type checker — so this sorts each release by which SDK source files it touched (Figwright uses only the server + stdio slice of a…

awdr74100/figwright · 159 tokens

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens

figma-build

Build a Figma design from code or a description — the reverse of figma-codegen. Reuses the connected file's existing design system (components, variables, styles) instead of drawing primitives with hardcoded values. Triggers whenever the user wants something created or updated IN Figma from code or a spec — e.g.…

awdr74100/figwright · 180 tokens

figma-design-handoff

Figma-to-code design handoff patterns including Figma Variables to design tokens pipeline, component spec extraction, Dev Mode inspection, Auto Layout to CSS Flexbox/Grid mapping, and visual regression with Applitools. Use when converting Figma designs to code, documenting component specs, setting up design-dev…

yonatangross/orchestkit · 76 tokens

mk:figma

Read-first Figma gateway via Figma MCP: analyze designs, implement Figma-to-code for 1–3 screens, extract design tokens, produce a Figma Evidence Packet for planning handoff, screenshot fallback. Advanced operations (Code Connect, canvas writes, design-system/library patterns) are gated references loaded only on…

ngocsangyem/MeowKit · 99 tokens

design-qa

빌드된 앱 화면을 실기기/시뮬레이터에서 캡처해 Figma 원본과 오버레이(50% 블렌드 + diff 히트맵 + figma|real 나란히 크롭 + 픽셀색 비교)로 대조하고, 코드 오차로 확정된 항목을 Figma 선언값으로 되짚어 스스로 보정하는 검증 루프. 비교·측정 엔진은 플랫폼 중립이고 캡처 계층만 플랫폼별이다(Android·iOS·Web 지원). 두 진입: ① codegen Step 7c 위임 호출, ② 직접 호출(/design-qa) — 프롬프트로 검증/보정 모드를 판별하고 Figma 링크 해소·현재 브랜치 빌드·캡처까지 스스로 오케스트레이션. "오버레이…

naver/design-to-ui · 243 tokens