From adhd
Convert design tokens between code (CSS) and Figma (MCP variable defs) representations and the canonical DTCG (Design Token Community Group) JSON shape. Used by /adhd:export-for-figma, /adhd:check, and /adhd:sync-from-figma. Wraps the deterministic Node converter at plugins/adhd/lib/to-dtcg/cli.js.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adhd:to-dtcgThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are converting design tokens to DTCG JSON. There are two procedures; the caller's invocation prompt will indicate which one to run.
You are converting design tokens to DTCG JSON. There are two procedures; the caller's invocation prompt will indicate which one to run.
Authoritative spec: docs/superpowers/specs/2026-05-09-adhd-restructure-design.md (Component 2).
The skill body is intentionally thin — actual conversion logic lives in plugins/adhd/lib/to-dtcg/cli.js. Your job here is orchestration: run the right command, return the right output.
Inputs: a CSS file path (e.g., app/globals.css), passed by the caller.
Steps:
Determine the Tailwind theme path. Default: node_modules/tailwindcss/theme.css. Use Bash to check if the file exists:
[ -f node_modules/tailwindcss/theme.css ] && echo present || echo absent
If present, set THEME_ARG=node_modules/tailwindcss/theme.css. If absent, set THEME_ARG=none.
Run the converter via Bash:
node plugins/adhd/lib/to-dtcg/cli.js --source css --input <CALLER-PATH> --tailwind-theme <THEME_ARG>
The command's stdout is DTCG JSON. Return that to the caller verbatim. Include trailing newline.
On non-zero exit (1 = parse error, 2 = bad arguments), surface the stderr message to the caller as the failure reason.
Inputs: a Figma file URL or file key, passed by the caller.
Steps:
Call mcp__figma__get_variable_defs with the file URL/key. Capture the full response (variable definitions for both Primitives and Semantic collections).
Write the response JSON to a temp file:
TMPFILE=$(mktemp /tmp/adhd-figma-response.XXXXXX.json)
Use Write to put the JSON content into $TMPFILE.
Run the converter via Bash:
node plugins/adhd/lib/to-dtcg/cli.js --source figma --input "$TMPFILE"
The command's stdout is DTCG JSON. Return that to the caller verbatim.
Clean up the temp file:
rm -f "$TMPFILE"
On non-zero exit, surface stderr to the caller. Common failures:
Figma file missing Primitives collection — the Figma file's structure is non-compliant.Unresolved alias: <id> — a Semantic variable references a Primitive that doesn't exist (corrupt Figma state).Full CLI surface (see plugins/adhd/lib/to-dtcg/cli.js for the source of truth):
node cli.js --source <css|figma> --input <path> [--tailwind-theme <path|none>]
--source css reads CSS text, parses ADHD-managed @theme {}, :root {}, @media dark blocks, and (optionally) merges Tailwind v4 defaults from --tailwind-theme.--source figma reads a Figma MCP get_variable_defs response JSON, identifies Primitives and Semantic collections, resolves aliases, and emits DTCG with mode metadata under $extensions.com.figma.modes.--tailwind-theme none (css mode) skips merging defaults — useful for tests where the user globals.css is the only source of truth.Output: DTCG JSON to stdout. Keys sorted alphabetically. 2-space indent. Trailing newline.
Exit codes: 0 = success; 1 = parse error; 2 = bad arguments.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub sanctuarycomputer/adhd --plugin adhd