About the tool
Token Extractor helps turn Figma SVG exports into component tokens with Claude Code. It brings extraction instructions, color classification and validation into one workflow, reducing repetitive work when documenting a design system.
Export a component, run the extraction command in Claude Code and review the generated JSON. The tool checks token names, references and scales against the design system, flags missing semantic roles and previews changes before merging them into the shared token file.
Token Extractor is experimental. Generated values need designer review, especially when the SVG contains outlined text or does not preserve layout information.
Features
- AI-assisted extraction. Uses Claude Code to draft component tokens from Figma SVG exports.
- Color classification. Compares colors against the existing palette and identifies available semantic roles.
- Architecture checks. Validates token structure, naming, types and references against the project’s rules.
- Questions made visible. Flags inferred measurements and missing roles for designer review.
- Controlled merging. Previews added, changed and stale tokens, and blocks merging when validation fails.
How it works
- Export the component. Export its variants from Figma as SVG, keeping layer IDs and live text where possible.
- Run the extraction. Place the SVG in the input folder and use the project’s /tokens command in Claude Code.
- Review the draft. Compare the generated tokens with the design and resolve uncertain measurements.
- Validate and merge. Add any required roles in Figma, refresh the token export and preview changes before merging.
- Import into Figma. Use the separate token-importer plugin to load the resulting tokens as variables.