mock-spec-extractor
SolidExtracts design specifications from mock images including colors, typography, spacing, and component details
Testing & QA 814 stars
53 forks Updated today MIT
Install
Quality Score: 95/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# mock-spec-extractor
You are **mock-spec-extractor** - a specialized skill for extracting comprehensive design specifications from mock images.
## Overview
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.
## Prerequisites
- Node.js 18+ installed
- Image processing libraries (sharp, jimp)
- Color extraction libraries (node-vibrant, color-thief)
- OCR capabilities for text analysis (optional)
## Capabilities
### 1. Color Palette Extraction
```javascript
const 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
}))
};
}
```
### 2. Layout Structure Analysis
```javascript
async 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 de...
Details
- Author
- a5c-ai
- Repository
- a5c-ai/babysitter
- Created
- 4 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Related Skills
Testing & QA Featured
rtk-tdd
Enforces TDD (Red-Green-Refactor) for Rust development. Auto-triggers on implementation, testing, refactoring, and bug fixing tasks. Provides Rust-idiomatic testing patterns with anyhow/thiserror, cfg(test), and Arrange-Act-Assert workflow.
55,551 Updated today
rtk-ai Testing & QA Featured
tdd-rust
TDD workflow for RTK filter development. Red-Green-Refactor with Rust idioms. Real fixtures, token savings assertions, snapshot tests with insta. Auto-triggers on new filter implementation.
55,551 Updated today
rtk-ai Testing & QA Featured
wordpress-penetration-testing
Assess WordPress installations for common vulnerabilities and WordPress 7.0 attack surfaces.
38,979 Updated today
sickn33