extract-structure

Installation
SKILL.md

Extract Structure Data

Interpretation-only companion to create-structure. This skill does not extract data from Figma. It reads {cachePath}/{componentSlug}-_base.json (produced by the uSpec Extract Figma plugin), applies the same reasoning layer as create-structure, and writes the normalized StructureSpecData JSON to disk for the create-component-md orchestrator to consume.

Quality contract: every reasoning step (section planning, ownership resolution, override promotion, design-intent notes, anomaly detection) mirrors create-structure/SKILL.md. Any improvement to structure-extraction quality must be made in both places.

Batch-mode contract. This skill MUST NOT call AskQuestion, prompt for confirmation, or pause for user input. When a value cannot be resolved from _base.json (and a Step 3-delta doesn't recover it), emit a row with provenance: "not-measured" and values: ["—", …] instead of asking. No mid-interpretation clarifications.

Invocation Contract

The orchestrator calls this skill with these inputs (already resolved — do NOT re-parse URLs or re-read uspecs.config.json):

  • componentSlug — filename-safe slug
  • cachePath — cache directory, typically .uspec-cache/{componentSlug}/
  • optionalContext — free-form string from the user (may be "none")
  • mcpProviderfigma-console or figma-mcp (only needed if a Step 3-delta escape hatch fires AND a live Figma link was provided to the orchestrator)
  • deltaAvailable — boolean. When the orchestrator received only a baseJsonPath (no figmaLink), this is false and the Step 3-delta escape hatch must not fire; log the gap in data._deltaExtractions[] with unavailable: "no-figma-link" and continue with best-effort output.
  • apiDictionaryPath — absolute or workspace-relative path to {cachePath}/{componentSlug}-api-dictionary.json. Optional. When present, this file is the canonical vocabulary for axis/value/sub-component/state naming (see Step 2.5). When absent, the skill continues with _dictionaryUnavailable: true in its output envelope and the renderer treats the produced cache as lower-confidence.
Installs
8
GitHub Stars
232
First Seen
May 13, 2026
extract-structure — redongreen/uspec