/design-data-agent:design-data-agentfrom design-data-agent
Validates, queries, resolves, diffs, and authors spec-conformant design tokens and components from local datasets using MCP tools. Useful for design system token lookup, spec-conformance checks, drift detection, and token authoring.
Ships in design-data-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
@adobe/design-data-agent-mcp provides in-process wasm tools for validating, querying,
resolving, diffing, and authoring spec-conformant tokens and components from any dataset
on the local filesystem.
Set two path variables once and reference them throughout:
export DESIGN_DATA_PATH=./packages/design-data/tokens
export DESIGN_DATA_SPEC_PATH=./packages/design-data
For Spectrum tokens with zero setup (embedded snapshot), use the design-data skill instead — this skill targets custom or repo-local datasets.
Add @adobe/design-data-agent-mcp to your .cursor/mcp.json:
{
"mcpServers": {
"design-data-agent": {
"command": "npx",
"args": ["-y", "@adobe/design-data-agent-mcp@latest"],
"env": {
"DESIGN_DATA_PATH": "./packages/tokens/src",
"DESIGN_DATA_COMPONENTS": "./packages/design-data/components",
"DESIGN_DATA_FIELDS": "./packages/design-data/fields"
}
}
}
}
Adjust paths to match your dataset layout. Pin @latest — the embedded Spectrum snapshot is
baked into the wasm at build time and travels with the package version, so there's no separate
data update to run, but plain npx -y <pkg> (no tag) can reuse a cached older build.
primer firstCall primer at the start of every session that touches design data. It returns the active
dimensions, component list, taxonomy fields, and token count — structural context that scopes
all subsequent lookups. No inputs required.
resolve_tokenRequired: property (string) — the bare name.property segment, e.g. "background-color"
or "corner-radius" (see primer().properties for the full list). Not a flattened
legacyKey like "accent-background-color-default" — that form never resolves.
Optional context: colorScheme ("light" or "dark"), scale ("desktop" or "mobile"),
contrast ("regular" or "high"). Optional narrowing: component, variant, state, and
colorRole. Set excludeDeprecated to omit tokens with lifecycle.deprecatedIn.
Gotcha: when several tokens share a property, use
variant,state, orcolorRoleto narrow the match, then checkambiguousanddeprecatedon the result.componentis sparsely populated in the current dataset, so prefer the other fields when available.resolve_tokenstill uses cascade ranking when multiple candidates remain; usequery_tokensto inspect the full candidate set.
query_tokensRequired: filter (string)
Valid filter keys: property, component, variant, state, colorScheme, scale,
contrast, uuid, $schema.
Filter syntax examples:
property=background-color
property=*background*
property=background-color|property=border-color
$schema=https://spectrum.adobe.com/page/design-token/
Gotcha:
component=<id>currently always returns[]— tokens aren't component-indexed in this dataset. Usedescribe_componentto see a component's known token bindings instead.
Exit codes:
0= matches found; empty array = no matches (not an error).
suggest_tokenRequired: intent (string) — a natural-language description of the design need,
such as "primary CTA button background color".
Optional: limit (number, default 5) — the maximum number of suggestions to return.
Results are ranked by confidence using token names, name-object fields, and description
text. Use this when the user describes what they need rather than knowing a token name.
describe_componentRequired: id (string) — kebab-case component ID, e.g. button, action-button
Returns the component contract: name, displayName, options, anatomy, states,
and tokenBindings.
validate_usageOptional inputs:
path — dataset path (defaults to DESIGN_DATA_PATH)strict (boolean) — treat warnings as errorsschema_path — override schemas directory (defaults to @adobe/spectrum-tokens schemas)Runs Layer-1 JSON-Schema structural validation and Layer-2 relational rules.
Returns { valid, errors, warnings }.
Note:
--exceptions-path(SPEC-007 naming allowlist) is not supported in the in-process path. Use thedesign-dataCLI directly if you need exceptions support.
diff_datasetsRequired: oldPath, newPath
Optional: filter (substring to narrow results by token name)
Returns { renamed, deprecated, reverted, added, deleted, updated }.
writeWrite or update the product context document in the dataset.
Optional inputs: output (defaults to $DESIGN_DATA_PATH/product-context.json),
rationale (string)
Use the following tools in sequence to create a new token through the wizard:
start_authoring_session — start a session (returns session_id)authoring_session_step_intent — provide natural-language intent; get token suggestionsauthoring_session_step_classification — set layer, property, name fieldsauthoring_session_step_values — set mode-specific value rowsauthoring_session_commit — validate and write the token to diskauthoring_session_cancel — cancel without writingHelper tools: authoring_session_get (inspect state), authoring_session_list (all active sessions).
authoring_session_commit accepts an optional schema_path to override the schemas directory
for Layer-1 JSON-Schema validation before writing.
Note: The standalone
suggest_tokentool calls the wasmsuggestAPI directly.authoring_session_step_intentstill delegates to thedesign-dataCLI for session-state-aware ranking within an authoring flow.
The design-data CLI draws a component's visual recipe. SVG needs no setup; PNG text uses
Adobe Clean Spectrum VF when it is installed.
design-data render button --format svg > button.svg
design-data render button --format png --output button.png # --pixel-ratio N, default 2
design-data fonts # exit 0: found; exit 1: the bundled fallback would be used
design-data fonts --json # { found, fallback, using, rejected, related, searched, help }
--font <file.ttf> (repeatable) or DESIGN_DATA_FONT=<file.ttf>. A chosen font also
sets the layout text widths, so SVG output changes when --font is passed.render --format png falls back to the bundled Source Sans 3 it prints a warning
with the install steps. Relay it: say the text may differ slightly from Adobe Clean
Spectrum VF and the image is not exact. Do not tell the user to download anything when
design-data fonts exits 0..ttf (not the .otf, which uses PostScript outlines and cannot be
read). Creative Cloud's "Adobe Clean" is a different font and is not used. Someone
outside Adobe cannot get it, so the fallback is the best result; say so.design-data fonts says it is not, ask for
the file's path and use --font or DESIGN_DATA_FONT. Never offer or attach the font file.desktop and mobile — not medium/large.regular and high — not standard/high.query_tokens returns [] when no tokens match — not an error.diff_datasets filter matches by token name substring (case-insensitive).Cursor Settings → Rules → Add Rule → Remote Rule (GitHub) → paste this URL:
https://github.com/adobe/spectrum-design-data/tree/main/tools/design-data-agent-mcp/skills/design-data
What SKILL.md sets; muted values are Claude Code's defaults
Trigger on: design system, design tokens, spec-conformant, drift, validate tokens, token authoring, custom dataset, DESIGN_DATA_PATH, design-data validate, design-data diff, design-data write, product-context.json.
npx claudepluginhub adobe/spectrum-design-data --plugin design-data-agentOther plugins' skills for the same job