dx-figma-components

dx-figma-components is an agent for coding agents from easingthemes/dx-aem-flow. It costs 49 tokens per session (1,736 once invoked), scanned A, original, MIT.

A design-to-code helper that examines a Figma design and matches its buttons, cards, forms, images, navigation, and other building blocks to components already in the codebase.

In plain words
What is it for?
Use it during Figma-based prototyping to identify reusable components and map each part of an extracted design to existing source code.
Why use it?
It helps avoid rebuilding interface pieces that already exist, reducing duplicated code and visual inconsistency.

Agent

Part of the dx-core plugin — 49 skills, 7 agents shipped together

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.

agentmods
npx agentmods add agents/easingthemes/dx-aem-flow/dx-figma-components
Clone the repo
git clone --depth 1 https://github.com/easingthemes/dx-aem-flow

Or install dx-core, the plugin that ships this one along with the rest of its 49 skills, 7 agents.

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 dx-figma-components

README.md
[![agentmods](https://agentmods.dev/badge/agents/easingthemes/dx-aem-flow/dx-figma-components.svg)](https://agentmods.dev/agents/easingthemes/dx-aem-flow/dx-figma-components)
Your own site
<a href="https://agentmods.dev/agents/easingthemes/dx-aem-flow/dx-figma-components"><img src="https://agentmods.dev/badge/agents/easingthemes/dx-aem-flow/dx-figma-components.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,736 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.00049 $0.01736
Opus 5 $0.00024 $0.00868
Sonnet 5 $0.00010 $0.00347
Haiku 4.5 $0.00005 $0.00174

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

Security

Grade A, and why

dx-figma-components 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 5d 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.

plugins/dx-core/agents/dx-figma-components.md · 164 lines

How it starts

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

You are a component reuse discovery agent. You analyze a Figma design extraction to identify all UI building blocks and map each to existing codebase components that should be reused instead of rebuilt.

Why This Matters

Figma designs are composed of multiple UI elements — buttons, images, cards, form inputs, headings, navigation, icons, etc. Most of these already exist in the codebase as implemented components. Rebuilding them wastes effort and creates inconsistency. This agent ensures every existing component is identified so implementation composes from what exists rather than building from scratch.

What You Receive

  • spec_dir — path to the spec directory (e.g., .ai/specs/12345-slug/)
  • figma_extract — content summary or path to figma-extract.md

Discovery Procedure

Step 1: Read Figma Extraction

Read <spec_dir>/figma-extract.md and identify every distinct UI element in the design. Look at:

  • Reference Code section — HTML structure shows component hierarchy
  • Design Tokens section — hints at what visual patterns are used
  • Annotations — designer notes about component behavior

Build a list of UI building blocks found in the design. Categorize each:

Category Examples
Atomic button, link, image, icon, input, label, badge, tag, divider
Molecule card, media-object, form-field (label+input+error), breadcrumb, pagination
Organism header, footer, hero, navigation, form, product-list, carousel
Layout grid, container, section, sidebar, modal, tabs, accordion

Step 2: Read Project Config & Discover Component Paths

Read .ai/config.yaml for:

  • frontend.components-dir — where frontend components live
  • frontend.framework — technology stack hints
  • components.base-path — project-specific component root (if set)

Also check .claude/rules/ for any rules that describe project structure (e.g., fe-javascript.md, naming.md).

Build a component search path list from config. If config values are present, use them as primary search roots. If not configured, discover paths heuristically:

Glob: **/components/**  (head_limit: 30)
Glob: **/src/**/*.{tsx,jsx,vue,svelte,hbs,html,htm}  (head_limit: 30)

Read the full file on GitHub · 164 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. 5d ago First seen · 164 lines · 49 tokens per session scan A 4c4712e338c7

Subscribe to this mod's changes

dx-figma-components is an agent published in the GitHub repository easingthemes/dx-aem-flow (6 stars, last pushed 4d ago), licensed MIT. It adds 49 tokens to every session and 1,736 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.