Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extracts design specifications from mock images including colors, typography, spacing, and component details
.claude/skills/a5c-ai-mock-spec-extractor/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 27% | 0% |
You are mock-spec-extractor - a specialized skill for extracting comprehensive design specifications from mock images.
This skill analyzes design mock images to extract structured specifications including colors, typography, spacing patterns, and component details that serve as the source of truth for pixel-perfect implementation.
javascriptconst Vibrant = require('node-vibrant'); async function extractColors(mockPath) { const palette = await Vibrant.from(mockPath).getPalette(); return { primary: palette.Vibrant?.hex, secondary: palette.Muted?.hex, accent: palette.DarkVibrant?.hex, background: palette.LightMuted?.hex, text: palette.DarkMuted?.hex, allColors: Object.entries(palette) .filter(([_, swatch]) => swatch) .map(([name, swatch]) => ({ name, hex: swatch.hex, rgb: swatch.rgb, population: swatch.population })) }; }
javascriptasync function analyzeLayout(mockPath) { const image = await sharp(mockPath).metadata(); // Detect major sections through edge detection const edges = await detectEdges(mockPath); // Identify grid patterns const gridAnalysis = await detectGridPattern(edges); return { dimensions: { width: image.width, height: image.height }, sections: identifySections(edges), grid: gridAnalysis, hierarchy: buildHierarchy(sections) }; }
javascriptasync function detectTypography(mockPath, regions) { const textStyles = []; for (const region of regions) { // Extract text regions const textAreas = await findTextAreas(mockPath, region); for (const area of textAreas) { textStyles.push({ region: region.name, estimatedSize: estimateFontSize(area), estimatedWeight: estimateWeight(area), color: extractDominantColor(area), position: area.bounds }); } } return deduplicateStyles(textStyles); }
javascriptasync function analyzeSpacing(mockPath, elements) { const spacingValues = []; // Analyze gaps between elements for (let i = 0; i < elements.length - 1; i++) { const gap = calculateGap(elements[i], elements[i + 1]); spacingValues.push(gap); } // Identify spacing scale const scale = identifySpacingScale(spacingValues); return { scale, patterns: groupByPattern(spacingValues), recommendations: suggestCSSVariables(scale) }; }
javascriptasync function detectComponents(mockPath) { const components = []; // Detect buttons const buttons = await detectButtons(mockPath); components.push(...buttons.map(b => ({ type: 'button', ...b }))); // Detect cards const cards = await detectCards(mockPath); components.push(...cards.map(c => ({ type: 'card', ...c }))); // Detect inputs const inputs = await detectInputs(mockPath); components.push(...inputs.map(i => ({ type: 'input', ...i }))); return components; }
json{ "type": "object", "required": ["mockSource"], "properties": { "mockSource": { "type": "object", "properties": { "type": { "type": "string", "enum": ["image", "figma", "url"] }, "path": { "type": "string" } } }, "analysisDepth": { "type": "string", "enum": ["basic", "detailed", "comprehensive"], "default": "detailed" }, "focusAreas": { "type": "array", "items": { "type": "string" } } } }
json{ "type": "object", "properties": { "success": { "type": "boolean" }, "designSpec": { "type": "object", "properties": { "layout": { "type": "object" }, "typography": { "type": "object" }, "colorPalette": { "type": "object" }, "spacing": { "type": "object" }, "components": { "type": "array" }, "decorativeElements": { "type": "array" } } }, "cssVariables": { "type": "object" }, "implementationNotes": { "type": "array" } } }
This skill integrates with:
pixel-perfect-implementation.js - Provides mock analysis for convergencedesign-system.js - Extracts design tokenscomponent-library.js - Identifies component patternsbash/skill mock-spec-extractor \ --mock designs/dashboard-mock.png \ --depth comprehensive \ --focus "header,sidebar,cards"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 32,273 | 28,564 | -11% | 1 | 1 | 0% | 7,268 | 6,512 | -10% | 0 | 0 | — |
case-02 | fail→fail | 27,969 | 32,595 | +17% | 1 | 1 | 0% | 4,898 | 7,245 | +48% | 0 | 0 | — |
case-03 | fail→pass | 26,159 | 28,299 | +8% | 1 | 1 | 0% | 4,875 | 6,578 | +35% | 0 | 0 | — |
case-04 | fail→pass | 15,370 | 9,785 | -36% | 1 | 1 | 0% | 1,831 | 2,356 | +29% | 0 | 0 | — |
case-05 | fail→pass | 14,526 | 8,632 | -41% | 1 | 1 | 0% | 1,628 | 2,075 | +27% | 0 | 0 | — |
case-06 | fail→pass | 19,288 | 7,045 | -63% | 1 | 1 | 0% | 2,149 | 1,728 | -20% | 0 | 0 | — |
case-07 | fail→pass | 14,309 | 9,050 | -37% | 1 | 1 | 0% | 1,504 | 1,915 | +27% | 0 | 0 | — |
case-12 | fail→pass | 12,392 | 7,285 | -41% | 1 | 1 | 0% | 969 | 1,823 | +88% | 0 | 0 | — |
case-08 | pass→pass | 11,460 | 15,856 | +38% | 1 | 1 | 0% | 1,087 | 1,931 | +78% | 0 | 0 | — |
case-09 | fail→pass | 24,460 | 10,100 | -59% | 1 | 1 | 0% | 1,214 | 2,255 | +86% | 0 | 0 | — |
case-10 | fail→pass | 13,836 | 7,089 | -49% | 1 | 1 | 0% | 1,345 | 1,788 | +33% | 0 | 0 | — |
case-11 | fail→pass | 13,192 | 8,485 | -36% | 1 | 1 | 0% | 1,341 | 2,033 | +52% | 0 | 0 | — |
case-13 | fail→pass | 15,286 | 7,412 | -52% | 1 | 1 | 0% | 1,647 | 1,911 | +16% | 0 | 0 | — |
case-14 | fail→pass | 12,340 | 9,161 | -26% | 1 | 1 | 0% | 1,243 | 2,210 | +78% | 0 | 0 | — |
case-15 | fail→pass | 18,673 | 11,910 | -36% | 1 | 1 | 0% | 2,460 | 2,801 | +14% | 0 | 0 | — |
case-16 | pass→pass | 18,598 | 10,153 | -45% | 1 | 1 | 0% | 2,054 | 2,963 | +44% | 0 | 0 | — |
case-17 | pass→pass | 16,001 | 8,449 | -47% | 1 | 1 | 0% | 1,940 | 2,644 | +36% | 0 | 0 | — |
case-18 | fail→pass | 19,475 | 3,462 | -82% | 1 | 1 | 0% | 995 | 1,712 | +72% | 0 | 0 | — |
case-19 | fail→pass | 6,082 | 7,640 | +26% | 1 | 1 | 0% | 878 | 1,698 | +93% | 0 | 0 | — |
case-20 | fail→pass | 8,624 | 2,193 | -75% | 1 | 1 | 0% | 1,222 | 1,693 | +39% | 0 | 0 | — |
case-21 | pass→fail | 51,968 | 41,212 | -21% | 1 | 1 | 0% | 8,219 | 9,625 | +17% | 0 | 0 | — |
case-22 | fail→fail | 5,674 | 15,302 | +170% | 1 | 1 | 0% | 679 | 4,041 | +495% | 0 | 0 | — |
case-23 | fail→fail | 25,327 | 22,442 | -11% | 1 | 1 | 0% | 3,861 | 4,079 | +6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +61 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.