.claude/skills/mock-analysis/SKILL.md
Patterns for analyzing HTML/CSS mocks from Stitch, Figma, or similar tools. Covers section identification, component detection, and Tailwind config extraction. Use this skill when parsing mocks for block conversion.
npx skillsauth add NextSpark-js/nextspark mock-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Patterns for parsing and analyzing HTML/CSS mocks to prepare for block conversion.
Standard export structure (flexible detection):
mock-folder/
├── code.html # Main HTML markup (or *.html)
├── screen.png # Visual screenshot (or *.png, *.jpg)
├── assets/ # Images, fonts (optional)
│ ├── images/
│ └── fonts/
└── tailwind.config.js # Sometimes included inline in HTML
Flexible File Detection:
| File Type | Detection Pattern | Required |
|-----------|-------------------|----------|
| HTML | code.html, index.html, *.html | Recommended |
| Screenshot | screen.png, *.png, *.jpg, *.jpeg | Required |
| Tailwind Config | tailwind.config.js, inline in HTML | Optional |
| Assets | assets/, images/ | Optional |
| PDF | *.pdf (for Figma exports) | Alternative |
Detection Priority:
code.html → Primary HTML fileindex.html → Alternative name*.html → Fallbackscreen.png → Primary screenshotscreenshot.png, screen.jpg → Alternatives*.png, *.jpg → FallbackWorkflow Integration:
mocks/ folder<!-- Indicators -->
<section class="...min-h-[500px]..."> <!-- Large min-height -->
<section class="...h-screen..."> <!-- Full viewport -->
<div class="...bg-cover..."> <!-- Background image -->
<h1>...</h1> <!-- Main heading -->
Classification: type: "hero"
<header>...</header>
<nav>...</nav>
<div class="...fixed...top-0...">
Classification: type: "navigation"
<div class="...grid...grid-cols-3...">
<div>...</div> <!-- Repeated pattern -->
<div>...</div>
<div>...</div>
</div>
Classification: type: "features"
<section class="...text-center...py-16...">
<h2>...</h2>
<p>...</p>
<button>...</button> <!-- 1-2 buttons -->
</section>
Classification: type: "cta"
<footer>...</footer>
<div class="...mt-auto..."> <!-- At bottom -->
Classification: type: "footer"
<button class="...">Text</button>
<a href="..." class="...btn...">Text</a>
<a href="..." class="...rounded...bg-...">Text</a>
<form>...</form>
<input type="...">
<div class="...flex...gap-...">
<input>
<button>Submit</button>
</div>
<div class="...rounded...border...shadow...">
<img>
<h3>...</h3>
<p>...</p>
</div>
<svg>...</svg>
<i class="...icon...">
<span class="...lucide-...">
Look for inline config in HTML:
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#137fec',
'background-dark': '#101922',
},
fontFamily: {
sans: ['Inter', 'sans-serif'],
}
}
}
}
</script>
Extract:
colors → For ds-mappingfontFamily → For typography mappingspacing → If customizedborderRadius → If customized{
"mockPath": "_tmp/mocks/stitch/landing-page",
"htmlFile": "code.html",
"screenshotFile": "screen.png",
"analyzedAt": "2025-01-09T12:00:00Z",
"tailwindConfig": {
"found": true,
"colors": {
"primary": "#137fec",
"background-dark": "#101922",
"accent": "#00d4ff"
},
"fonts": {
"sans": ["Inter", "sans-serif"],
"mono": ["JetBrains Mono", "monospace"]
}
},
"sections": [
{
"id": "section-1",
"type": "hero",
"selector": "section:first-of-type",
"htmlSnippet": "<section class=\"relative min-h-[600px]...\">",
"components": [
{"type": "heading", "level": 1, "text": "Build faster..."},
{"type": "paragraph", "text": "The complete..."},
{"type": "button", "text": "Get Started", "variant": "primary"},
{"type": "custom", "name": "terminal-animation"}
],
"layout": {
"type": "centered-flex",
"minHeight": "600px",
"hasBackground": true,
"backgroundType": "gradient"
},
"estimatedComplexity": "high",
"notes": "Contains animated terminal component"
},
{
"id": "section-2",
"type": "features",
"selector": "section:nth-of-type(2)",
"components": [
{"type": "heading", "level": 2},
{"type": "grid", "columns": 3, "items": 6}
],
"layout": {
"type": "grid",
"columns": "3",
"gap": "6"
},
"estimatedComplexity": "low"
}
],
"componentInventory": {
"headings": {"h1": 1, "h2": 4, "h3": 12},
"buttons": 8,
"links": 24,
"images": 6,
"icons": 18,
"forms": 1,
"customComponents": [
{"name": "terminal-animation", "section": "section-1"},
{"name": "tabs-preview", "section": "section-4"},
{"name": "chat-widget", "section": "section-5"}
]
},
"summary": {
"totalSections": 7,
"complexity": "medium-high",
"customComponentsCount": 3,
"estimatedBlocks": {
"new": 3,
"existing": 4
}
}
}
design-system - For token mapping after analysispage-builder-blocks - For understanding target block structureshadcn-components - For component pattern matchingdevelopment
Zod validation patterns for this Next.js application. Covers schema definition, API validation, form integration, error formatting, and type inference. Use this skill when implementing validation for APIs, forms, or entity schemas.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
testing
Test coverage metrics and registry system for this Next.js application. Covers FEATURE_REGISTRY, FLOW_REGISTRY, TAGS_REGISTRY, and coverage metrics interpretation. Use this skill when evaluating test coverage, identifying gaps, or planning testing priorities.
development
TanStack Query (React Query) patterns for data fetching in this Next.js application. Covers useQuery, useMutation, optimistic updates, cache invalidation, and anti-patterns. Use this skill when implementing data fetching or state management with server data.