wayfinder
MAmattpocock/skills338k5,008 new stars in the last 7 days
Reproduce a web UI 1:1 (Reference Website) or extract a measured Design System spec (design.md) from Screenshots (single or multi-state), Live Links, or Screen Recordings. Runs Step 0 preflight readiness checks first, adapts keyframes to cover long scrolls cleanly, keeps debug artifacts in .antislop-pixel/, and enforces calibrated pixel, structural, and zoom gates.
Give an input (Screenshot(s), Live Link, or Screen Recording) and choose Reference Website (default) or
design.md. No manual DPI/zoom/OCR setup required.
| Input Mode (auto-detected) | Output A: Reference Website (index.html + styles.css) | Output B: design.md |
|---|---|---|
| Screenshot (1 or more PNG/JPG) | Inspect screenshots directly + optional lightweight shots.py (PREFLIGHT: WARN non-blocking) → build real HTML/CSS → visual + zoom verify (1-2 quick passes) | Inspect screenshots directly (optional measure.py --json + spec.py) → refined design.md |
| Screen Recording (.mp4/.mov/.mkv) | record.py (Step 0 Preflight + adaptive scroll/state keyframes) → build scrolling HTML/CSS + motion → gate.py --batch | record.py + measure.py → spec.py (includes scroll & motion specs) |
Live Link (https://...) | capture.py (1×) → freeze.py --states (1×) → gate.py --link (max 3 passes/state) | capture.py → spec.py (exact computed CSS tokens & interactive diffs) |
index.html + styles.css) or Output B (design.md). Never generate both outputs at once unless the user explicitly asks for both.scripts/ folder next to this SKILL.md (resolve <skill_dir> via ${CLAUDE_SKILL_DIR} when available, or point directly at the installed antislop-pixel skill folder; use python3 on macOS/Linux and python on Windows). Run <skill_dir>/scripts/doctor.py once per machine to check local tools; if anything listed in requirements.txt or doctor.py is missing, show the missing items and get the user's approval before installing them.read_file) first; shots.py is a lightweight helper that cleans OS scrollbars and emits PASS / WARN (never blocking on scroll gaps).
FAIL (corrupt/unreadable/tiny <320px image) blocks execution.WARN): describe simply in plain human words (NO file-index codes, NO pixel offsets, NO rename instructions) which visible section appears incomplete/gapped and the tradeoff if proceeding as-is, and ask once whether the user wants to add another screenshot OR proceed immediately (accepting that the small gap's vertical spacing/details will be estimated). If all page copy/sections are already clear (e.g. a minor photo gap inside the same card) or the user says go ahead, build directly!record.py), OCR/layout analysis, and multi-pass system checks run heavy local processing and typically take a very long time (30 minutes to 2 hours or more) plus moderate-to-high quota. Wait for confirmation before starting.PREFLIGHT: printed by record.py (PASS -> proceed silently; FAIL exit 3 -> stop cleanly before building and report which video segment is frozen/corrupt/skipped).dom.html, dump.json, stylesheets.json, before.png, kf*.png, ref*.png, shots.json, recording.json, targets.json, out*.png, diff*.png, masks.json, spec_data.json) inside <target>/.antislop-pixel/. The target folder itself receives only:
index.html and styles.cssdesign.md): design.mdAppliedDPI / 96.0, fallback 1.25) and assume 100% browser zoom. If layout boxes clearly contradict that pair, test candidate CSS viewports (100%, 110%, 125%, 150%) against measure.py block bounds and record the verified assumption under Deviations.pytesseract when installed or built-in Windows OCR (Windows.Media.Ocr) via Python WinRT bindings on Windows; only skip if neither works on the host OS, and record that under Deviations.LOGO, and replace photos/illustrations/videos with #e5e5e5 blocks at measured size. Mask all of them in masks.json (in device px).<svg> (or icon font) at its measured box. Never mask icons. Visually check reproduced icons at 4× (Image.NEAREST) for silhouette, holes, and stroke weight.<header>, <nav>, <main>, <a href="#">, <button>, <input>, <ul>, <h1>.flex and grid (max-width + auto margins). Never fix width/height on html/body or put overflow: hidden on them; hide scrollbars visually (scrollbar-width: none, ::-webkit-scrollbar { display: none; }) while staying scrollable.--states, multi-screenshot, or recording interactions), keep inline JS strictly thin (<= 15 lines) for ?state=N query switching plus real click / mouseenter / focus triggers.antislop: do not apply antislop during a Reference Website clone. Offer the antislop audit once after the gate passes.In all commands below, replace
<skill_dir>with this skill's installed folder (for example${CLAUDE_SKILL_DIR}), and usepython3on macOS/Linux orpythonon Windows.
Goal: fast turnaround with clean visual fidelity: do not run exhaustive millimeter measure.py OCR loops or slow multi-pass pixel tuning by default (save heavy structural/OCR measurement for --exact-pixel or Mode 2/3).
read_file) to capture every section top-to-bottom, colors, hierarchy, layout rhythm, interactive cues, and exact copy. Optionally run shots.py once to auto-strip scrollbars and check PASS/WARN (exit 0 unless image is corrupt):
python "<skill_dir>/scripts/shots.py" <folder_or_img1> [img2 ...] --work <target>/.antislop-pixel
(If WARN shows a real missing page section like an uncaptured footer, describe the visible gap in 1-2 plain non-technical sentences and let the user choose: add 1 more shot OR proceed accepting estimated gap.)<target>/index.html and <target>/styles.css (or <target>/design.md only when Output B was requested) with proportional grid/flex layout, exact UI copy, LOGO + #e5e5e5 placeholder rectangles for photos/mockups/portraits, crisp inline <svg> icons, and thin interactive ?state=N / click/hover handlers where multiple states exist. Only sample exact hex colors selectively when needed; never burn turns measuring every text line with OCR. If building from a single partial screenshot, attach the partial-input note in your final summary.<target>/index.html cleanly with render.py (zoom check at 110% & 90% plus viewport / full-page PNG), inspect rendered PNGs side-by-side (read_file, plus 4× zoom on any custom SVG icons), and fix any visible spacing, wrap, or alignment flaws cleanly. (Only invoke gate.py --batch ... if the user explicitly asks for strict automated pixel-diff scoring.)python "<skill_dir>/scripts/record.py" <video> <target>/.antislop-pixel
record.py tracks continuous frame-by-frame vertical scroll across the whole recording, adaptively selects overlapping keyframes (--max-kf 0 default covers <= 0.72× viewport height per step up to 20 frames + state pauses so no middle section becomes an empty gap), auto-crops OS scrollbars, writes .antislop-pixel/ref*.png, recording.json, and targets.json, and runs PREFLIGHT: PASS/FAIL (exits 3 if tracking broke or scroll gaps > 1× viewport remain). Mask any transient browser status bar (#d2e2fc URL preview at bottom-left) in that keyframe's masks if present.<skill_dir>/scripts/measure.py on each .antislop-pixel/ref*.png.<target>/index.html and <target>/styles.css containing all visible sections top-to-bottom cleanly (no blind white spacer blocks), interactive states (body.state-N triggered on hover/click/focus + ?state=N), and observed CSS @keyframes/transition durations.--batch (cap = 5 fix passes):
python "<skill_dir>/scripts/gate.py" --batch .antislop-pixel/targets.json --work .antislop-pixel
Zoom check (110% & 90%) is a hard fail (zoom check: clean required on every keyframe).Budget: 1 capture, 1 freeze, at most 3 fix passes per state. 0. Confirm time & quota (unless already approved): let the user know (in their chat language) that Live Link capture + freeze + gate checks take noticeably longer (~20-30 minutes) and use moderate-to-high quota/limit, then proceed once confirmed.
states.json: click, hover, focus only; never enter text or credentials):
python "<skill_dir>/scripts/capture.py" <url> <target>/.antislop-pixel [--states .antislop-pixel/states.json]
If blocked by CAPTCHA, slider, or bot wall (exit code 2), stop immediately. Never bypass anti-bot challenges; offer the 3 manual routes:
--headed --pause), user passes check manually;python "<skill_dir>/scripts/freeze.py" <target>/.antislop-pixel --out <target> [--states state2.json state3.json ...]
Produces clean <target>/index.html and <target>/styles.css (plus interactive ?state=N & click/hover/focus wiring, normalized font URLs via urljoin, LOGO boxes, and #e5e5e5 media blocks). Keep <target>/.antislop-pixel/masks.json.--link, max 3 fix passes/state):
python "<skill_dir>/scripts/gate.py" --batch .antislop-pixel/targets.json --work .antislop-pixel --link
In Link mode, render.py zoom warnings are informational (freeze.py locks pixel coordinates to the captured viewport). Never exceed 3 fix passes per state; if still failing at cap, report Gate: FAIL with numbers and worst regions.design.mdAfter capturing (capture.py), extracting keyframes (record.py), or preparing screenshots (measure.py) into <target>/.antislop-pixel/:
python "<skill_dir>/scripts/spec.py" <target>/.antislop-pixel --out <target>/design.md
Review .antislop-pixel/spec_data.json and refine <target>/design.md so every color token, contrast pair, font family, type scale row, radius, shadow, grid container, component pattern, state delta, and motion duration traces directly to measured evidence. Clean up any unverified guesses.
Reference Website passes gate.py only when all checks for its mode pass:
--link) & --exact-pixel:
diff.py reports PASS (masked <= 1.0% at --scale 1.0 --tol 12).measure.py --compare --strict reports block_outliers=0 (<= 1px) and text_outliers=0 (0.98-1.02 width ratio, dx/dy <= 1px).render.py zoom check (110% & 90%) is informational under --link (or HARD FAIL under --exact-pixel).render.py zoom check: clean at 110% & 90%.--offline, default for Mode 2):
render.py --strict prints zoom check: clean at 110% and 90% (HARD FAIL).measure.py --compare --strict --offline reports structural_block=0 (no unmatched blocks or drift > 3px) and structural_text=0 (no missing UI text lines, median_ratio within 0.96-1.04, line drift <= 4px) while still reporting raw 1px counts (HARD FAIL).diff.py --scale 1.0 --tol 16 --target 6.0 reports PASS, separating real structural gaps from unavoidable system-font glyph anti-aliasing differences (add --exact-pixel when proprietary fonts match locally).Image.NEAREST) match silhouette, inner holes, and stroke weight.| Field | Value |
|---|---|
| Preflight | PASS or FAIL (skipped sections / crop gaps, if any) |
| Canvas | device px, machine DSF, browser zoom, CSS viewport |
| Gate | PASS or FAIL (exact mode: link / offline-structural / exact-pixel) |
| Mismatch | masked % (gate), raw %, worst cells (--scale 1.0 & --scale 0.5) |
| Text & Blocks | OCR backend, median ratio, structural & 1px outliers, unmatched blocks |
| Zoom check | clean at 110% & 90%, or exact warnings |
| Real page | real inputs, buttons, links, state triggers |
| Placeholders | count & coordinates of masked LOGO / media rects |
| Fonts | loaded families and any system fallback substitution |
| Deviations | none, or exact detected assumptions / fallback-font pixel note |
| antislop | not applied |
For Reference Website, ask once at the end (in the user's chat language):
Would you like me to audit this result with antislop? (yes / no)
MAmattpocock/skills338k5,008 new stars in the last 7 days
MAmattpocock/skills338k5,008 new stars in the last 7 days
MAmattpocock/skills338k5,008 new stars in the last 7 days
MAmattpocock/skills338k5,008 new stars in the last 7 days
MAmattpocock/skills338k5,008 new stars in the last 7 days
MAmattpocock/skills338k5,008 new stars in the last 7 days