visual-diff
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "visual-diff":https://skillpi.com/zh/skills/deepskill-04e00345c94545fad543dde80795a597248ae33b9c65e210d8267c7d1f6b4722。安装前核对上游来源和版本:https://github.com/Houseofmvps/ultraship。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
视觉回归测试工具,用于在变更前后对界面截图进行像素或区域比对,适合检查视觉回归、比较 UI 变更,或验证 CSS/布局调整未破坏页面显示。
介绍来源: third_party · Houseofmvps · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: visual-diff
description: Capture and compare visual screenshots between a public reference URL and a local or deployed candidate URL. Use when cloning an existing site pixel-for-pixel, validating responsive similarity, generating screenshot heatmaps, comparing public-vs-local pages, auditing exactness across desktop/mobile/tablet screen sizes, or showing the user visual diff artifacts.Visual Diff
Overview
Use this skill when a site or app must look exactly like an existing public URL. It captures matched reference/candidate screenshots, generates heatmaps and overlay diffs, reports mismatch metrics, and saves preview-ready artifacts for user inspection.
Standard Workflow
-
Define the reference URL and candidate URL.
- Reference is usually the public site, such as
https://vincentdunn.com/. - Candidate is usually the local dev server, such as
http://127.0.0.1:3000/.
- Reference is usually the public site, such as
-
Normalize the capture environment.
- Use the same browser, viewport, device scale, color scheme, locale, waits, and scroll behavior for both URLs.
- Dismiss or mask popups, cookie banners, carousels, embedded videos, timestamps, and other unstable regions.
- Prefer
domcontentloadedplus a fixed wait for sites that never reachnetworkidle.
-
Run the bundled comparer.
/Users/Henry/.codex/skills/visual-diff/scripts/compare-page.sh \
--reference "https://example.com/" \
--candidate "http://127.0.0.1:3000/" \
--viewport "desktop:1280x720" \
--viewport "mobile:390x844" \
--dismiss-text "ACCEPT" \
--dismiss 'svg[id$="-close-icon"]'
-
Inspect the artifacts directly.
- Open
side-by-side.png,heatmap.png, andoverlay.pngwithview_image. - Show the user the most useful images inline with Markdown image tags using absolute paths.
- Do not claim exactness from metrics alone; visually inspect the screenshots.
- Open
-
Iterate the candidate implementation until the unmasked differences are intentionally small.
- For an exact clone, treat layout, typography, image assets, spacing, scroll height, colors, and responsive breakpoints as first-class requirements.
- If the local app differs because of missing assets or fonts, fetch or recreate those assets before tuning CSS.
Output Contract
The comparer writes into this skill by default:
visual-diff/repos/<repo-key>/runs/<timestamp>/
report.html
report.md
report.json
<viewport>-reference.png
<viewport>-candidate.png
<viewport>-reference-unmasked.png
<viewport>-candidate-unmasked.png
<viewport>-heatmap.png
<viewport>-overlay.png
<viewport>-side-by-side.png
<viewport>-reference-dom.json
<viewport>-candidate-dom.json
<viewport>-reference-content.json
<viewport>-candidate-content.json
<viewport>-reference-text.txt
<viewport>-candidate-text.txt
<viewport>-reference.html
<viewport>-candidate.html
When reporting results, include:
- Reference URL, candidate URL, and all viewport specs checked.
- The run directory and report path.
- Inline preview images for side-by-side and heatmap/overlay artifacts.
- Mismatch percentage, SSIM estimate, screenshot dimensions, and any masks/dismissals used.
- When masks are used, use
*-unmasked.pngfor human-facing screenshots of the real pages and maskedside-by-side/heatmapartifacts for diagnostic comparison. - A clear callout for remaining uncertainty, such as third-party iframes, animations, late-loading assets, auth, or network variance.
CLI Notes
scripts/compare-page.sh passes arguments to scripts/compare_page.py.
Useful options:
--viewport "name:WIDTHxHEIGHT"or--viewport "name:WIDTHxHEIGHT@DPR".--device "iPhone 13"for a Playwright device profile.--viewport-onlyto compare only the first viewport instead of full-page screenshots.--reference-image-dir path/to/runto use pre-captured<viewport>-reference.pngscreenshots instead of navigating the reference URL.--candidate-image-dir path/to/runto use pre-captured<viewport>-candidate.pngscreenshots instead of navigating the candidate URL.--dismiss SELECTORto click a selector on both pages before capture.--dismiss-text TEXTto click visible text on both pages before capture.--dismiss-cycles 5and--dismiss-wait-ms 700to repeat dismissals when closing one overlay reveals another, such as a promo modal followed by a cookie banner.--wait-for SELECTORand--wait-for-text TEXTto require route-specific hydrated content before capture, such as a product title inside a late-loading store widget.- Use
--reference-wait-for-text TEXTor--reference-wait-for SELECTORwhen only the public reference needs a hydration wait, especially when the candidate is a screenshot-backed static clone whose text is inside an image rather than DOM. - Add
--fail-on-wait-timeoutfor exact clone checks so missing hydration targets abort the run instead of producing screenshots of loading states. --hover SELECTOR,--reference-hover SELECTOR, or--candidate-hover SELECTORto move the cursor over a matching element before capture; use--hover-wait-mswhen hover animations need extra settle time.--hover-stability-probe SELECTOR --hover-stability-ms 700to record whether a hovered animated element kept the same position and transform before the screenshot.--scroll-y 160,--reference-scroll-y 160, or--candidate-scroll-y 160to compare a page after scrolling; use--scroll-wait-msto let sticky headers or scroll-triggered transitions settle.--lazy-scrollto scroll through a full page before screenshot capture, trigger lazy-loaded images/iframes, wait for image completion/decode, and return to the top. Use this for exact clone checks unless the page is intentionally viewport-only.--mask SELECTORto fill selector bounding boxes with a neutral color before comparison.--mask-rect x,y,w,hto mask a fixed screenshot rectangle.--zoom-rect label:x,y,w,hto write magnified reference/candidate/heatmap/overlay crop artifacts for a specific screenshot rectangle; repeatable. Pair with--zoom-scale 6or similar when inspecting small details such as icons, star ratings, and text anti-aliasing.--color-pick label:x,y[,radius]to sample exact reference/candidate colors at a screenshot point, optionally averaging a square radius around it. Repeatable.--color-pick-rect label:x,y,w,hto sample a screenshot rectangle and report sorted dominant color bins, mean/median RGB/hex values, and a swatch artifact. Tune--color-pick-topand--color-pick-quantumwhen matching small assets.--clip-selector SELECTORto compare only one component region after all waits, dismissals, hovers, and lazy-load preparation; use role-specific--reference-clip-selectoror--candidate-clip-selectorwhen selectors differ.--freeze-animationsto pause CSS animations/transitions and make marquees, tickers, and other animated surfaces deterministic.--storage-state state.jsonto reuse one Playwright storage state for both pages.--reference-storage-state state.jsonand--candidate-storage-state state.jsonwhen the two sides need different sessions.--wait-until domcontentloaded --wait-ms 2000for deterministic public-site captures.--navigation-retries 2to retry transient public-site timeouts before failing.- Navigation failures are fatal by default; use
--allow-navigation-erroronly when intentionally inspecting an error state. - Use
--capture-retries Nwith--fail-on-wait-timeoutwhen a public widget intermittently hydrates into a loading state before eventually rendering the required content. --max-mismatch 0.5to return a non-zero exit code when mismatch exceeds the threshold.
Use --reference-image-dir after a successful live reference capture when a public site starts throttling or timing out during iterative clone work. Refresh the live reference again before making final claims whenever the public URL is reachable.
Repo-local helpers may exist under visual-diff/repos/<repo-key>/ for repeated capture work. For the Vincent Dunn clone repo, capture-reference-pages.sh captures named public pages once per viewport, and compare-vincentdunn-route.sh ROUTE RUN_NAME --viewport desktop:1440x900 compares a route with the right popup dismissal, lazy-load, route-specific waits, and iframe masks.
Relationship To Check
Keep $check and $visual-diff separate but symbiotic.
- Use
$checkto prove a page is reachable from the correct account/session, seed or refresh auth, and capture a single visual proof. - Use
$visual-diffto compare two page renders, retrieve clone content, generate heatmaps, and iterate toward pixel exactness. - When a diff requires authentication, let
$checkproduce or verify the Playwright storage-state JSON, then pass it to$visual-diffwith--storage-state,--reference-storage-state, or--candidate-storage-state. - Do not copy
$checkaccount-selection, Henry-account safety, or auth-refresh logic into this skill. Visual diff may consume browser state, but$checkshould own how that state is created safely.
Page Content Retrieval
Every capture writes page content artifacts for clone work:
*-content.json: title, URL, canonical URL, language, meta tags, headings, links, images, media/iframes, stylesheets, scripts, and body text.*-text.txt: rendered body text for quick reading or copy reconstruction.*.html: post-load HTML snapshot from Playwright.
Use these artifacts to reconstruct copy, image inventories, link targets, embedded media, and stylesheet/script dependencies. Treat screenshots as the visual truth and content snapshots as the inventory that helps build the clone.
Similarity Standards
For clone work, use metrics as gates and screenshots as proof:
- Pixel mismatch: useful for exactness, but sensitive to fonts, anti-aliasing, video, animations, and browser differences.
- SSIM estimate: useful for broad perceptual similarity, but it can hide small layout errors.
- Screenshot size: different width/height or scroll height is a serious clone mismatch unless intentionally masked.
- DOM audit: use generated
*-dom.jsonfiles to compare visible text, fonts, colors, and element boxes.
Read references/clone-quality.md when setting pass/fail thresholds or diagnosing difficult mismatches.
Self-Healing Rule
Treat this skill like $check: every real use is a chance to improve it.
If a run requires repeated manual setup, a missing normalization option, a fragile dismissal pattern, a better report format, a new dependency fallback, or a repo-specific workflow, patch this skill or add a minimal helper under visual-diff/repos/<repo-key>/. Prefer improving the global scripts when the lesson is reusable.
After using the skill, state whether you changed the skill or repo-local helpers so future visual-diff runs are faster and more exact.
版本历史
-
v2.5.0
GitHub ↗
原版更新说明
## Elite SEO Intelligence — Top 1% Operator Patterns Based on real top 1% SEO operator methodology. Every feature is designed to provide technical foundation to ruthlessly help rank sites and get cited in AI search (ChatGPT, Perplexity, Copilot, Gemini, AI Overviews). ### New Commands **keyword-intelligence.mjs** (12 commands, was 10) - `anomalies` — Detects low-position high-CTR keywords (Google flags these as strongest opportunities) + high-position low-CTR underperformers - `cross-reference` — Joins GSC page data with GA4 conversions to find 4 critical buckets: converting-but-underexposed (highest ROI), ranking-but-not-converting (funnel problem), scalable pages (double down), CTR problems - `--brand=term1,term2` — Separates brand vs non-brand queries across ALL commands. Non-brand is all that matters for SEO growth. - Position band % distribution (1-3, 4-10, 11-20, 21+) in analyze output **ga4-client.mjs** (12 commands, was 10) - `ai-traffic` — Tracks ChatGPT (utm_source=chatgpt.com), Perplexity, Microsoft Copilot, Gemini, Claude, and You.com referral traffic with conversion rates - `organic` — Organic-only overview with key event rates per landing page - `--organic` flag — Filters top-pages and landing-pages to organic search only - Key event rate per session + average engagement time per page **bing-webmaster.mjs** (11 commands, was 6) - `indexnow` — Instant IndexNow push for changed URLs (Bing + Yandex + partners) - `keyword-research` — Keyword suggestions from Bing - `backlinks` — Backlink counts and sample link data - `site-scan` — Bing's technical SEO scan - `url-inspection` — Crawl/index status from Bing **seo-scanner.mjs** - Snippet restriction detection: `nosnippet`, `max-snippet`, `data-nosnippet` — Google says restrictive preview controls limit AI feature eligibility ### Updated SEO Strategy SKILL - AI Traffic Measurement phase - CTR Anomaly Analysis framework - Non-Brand Position Band Tracking (weekly KPIs) - GSC ↔ GA4 Cross-Reference (the "money move") - IndexNow for instant Bing/Copilot discovery - AI Slop Prevention guardrails - Ruthless weekly KPI stack (14 metrics, not 50) ### Install ``` npm install -g ultraship ```
-
v2.3.2
GitHub ↗
原版更新说明
## Security Fixes ### CRITICAL — IPv6-Mapped IPv4 SSRF Bypass `validateUrl()` in `tools/lib/security.mjs` only matched IPv4 dotted-decimal patterns. Addresses like `::ffff:127.0.0.1` and `::ffff:169.254.169.254` bypassed all SSRF protection. Now detects and blocks IPv6-mapped IPv4 addresses in both dotted and hex formats. ### HIGH — Redirect-Based SSRF in health-check.mjs `health-check.mjs` followed HTTP redirects without re-validating the target URL. A public URL redirecting to an internal IP would bypass SSRF protection. Now validates every redirect hop. ### MEDIUM — Guard Hook Bypass Hardening `guard-bash.sh` now blocks additional evasion techniques: - Base64-encoded commands piped to shell (`base64 -d | bash`) - Remote scripts piped to shell (`curl ... | sh`, `wget ... | sh`) - Python/Perl destructive one-liners (`python3 -c "shutil.rmtree(...)"`) - xargs chaining destructive commands (`xargs rm -rf`, `xargs git push --force`) ### LOW — MCP Server Version Pinning Pinned `@upstash/[email protected]` and `@playwright/[email protected]` (previously `@latest`), eliminating supply chain risk from automatic upgrades. ## Stats - 180 tests passing - 0 dependencies with known vulnerabilities - All IPv6 SSRF bypass vectors verified blocked (9/9 test cases) **Full install:** `npm install -g [email protected]`
-
v2.3.0
GitHub ↗
原版更新说明
## What's New 6 new features inspired by analyzing [gstack](https://github.com/garrytan/gstack) and adapting the best patterns for indie SaaS builders. ### New Skills (6) | Skill | Command | Description | |---|---|---| | **Sprint Workflow** | `/sprint` | Structured pipeline: plan → build → test → review → ship → verify. Skills chain into each other with artifacts. | | **Safety Guardrails** | `/guard` | PreToolUse hooks block destructive commands (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`). Optional directory freeze restricts edits. | | **Investigation** | `/investigate` | Root cause debugging with module freeze. Iron law: no fixes without investigation. Scoped analysis, evidence-based hypotheses. | | **Project Learnings** | `/learn` | Save, search, prune, export structured knowledge that compounds across sessions. Debugging insights, deployment gotchas, architecture decisions. | | **Sprint Retrospective** | `/retro` | Analyzes git velocity, commit patterns (features vs fixes), test health, hot files, shipping cadence. Generates insights and recommendations. | | **Canary Monitoring** | `/canary` | Post-deploy health verification. Checks HTTP status, response time, error patterns. Compares against baseline for regression detection. | ### New Tools (3) - `learnings-manager.mjs` — CRUD for project learnings (save/search/list/prune/export) - `canary-monitor.mjs` — Post-deploy canary with baseline regression detection - `retro-analyzer.mjs` — Sprint retrospective analyzer (git velocity, patterns, test health) ### New Agent (1) - `canary-monitor` — Dispatched by `/canary` for post-deploy verification ### New Hooks (2) - `guard-bash.sh` — PreToolUse hook for blocking destructive Bash commands - `guard-edit.sh` — PreToolUse hook for directory freeze enforcement ### Numbers | | Before | After | |---|---|---| | Skills | 33 | **39** | | Tools | 30 | **33** | | Agents | 10 | **11** | | Commands | 28 | **34** | | Tests | 155 | **180** | All 180 tests passing. 1 dependency. Node.js ESM. MIT. ```bash claude plugin install ultraship # or npm install -g ultraship ```
-
v2.1.2
GitHub ↗
原版更新说明
README rewritten as standard developer tool documentation. Removed: narrative "your week without Ultraship" section, marketing taglines, pitch framing, dramatic copy. Added: structured tool reference tables (29 tools in 7 categories), full command reference (27), skill categorization (32), architecture section with directory layout, inline security summary. Motivated by PR feedback on awesome-claude-code-toolkit: "comes across as marketing-heavy rather than a grounded technical tool." The README now reads like ESLint or Turborepo documentation — what it is, how to install, what every tool/command/skill does, how it's built, how to contribute.
-
v2.1.1
GitHub ↗
原版更新说明
## Frontend Design Skill Upgraded to Product Designer + UI/UX Expert Level The `frontend-design` skill now combines three disciplines: ### Product Design Thinking (new) - User intent analysis (what is the ONE primary action?) - Information hierarchy (5-second test) - Conversion design (CTA placement, social proof, value proposition above fold) - User psychology (cognitive load, loss aversion, anchoring, social proof, progress indication) ### UX Discipline (new) - Interaction design (4 states for every element: default, hover, active, disabled) - Form design (single column, labels above fields, inline validation on blur, descriptive submit buttons) - Accessibility (WCAG AA contrast, keyboard nav, screen readers, 44px touch targets, prefers-reduced-motion) - Responsive design (mobile-first, 4 breakpoints, touch vs hover, fluid typography) - Performance as UX (1s = instant, 3s = slow, skeleton screens, lazy loading) - Navigation patterns (breadcrumbs, max 7 items, mobile thumb zone) ### Industry-Specific Design Rules (new) 10 product types with specific tone guidance and anti-patterns: - SaaS/DevTools, Fintech/Banking, Healthcare, E-commerce, Education, Creative/Portfolio, Enterprise/B2B, Social/Community, Legal/Government, Kids/Gaming - Example: banking apps get "trust, stability, clarity" — NEVER playful design or AI purple gradients ### Design System Specifics (new) - Complete 14-token color architecture (primary through destructive, with on-* contrast pairs) - Animation timing: 200-300ms enter, 120-200ms exit, 30-50ms stagger, spring physics over cubic-bezier - GPU-composited properties only (opacity + transform — never animate width/height/margin) - 8px spacing grid for all margins, padding, and gaps - Line height rules: 1.5 body, 1.2-1.3 headings ### Expanded Quality Checklist 25 items across 5 categories (Functionality, Accessibility, Responsiveness, Visual Consistency, Production Readiness) — up from 10 items. ### Page-Specific UX Patterns Landing pages, dashboards, settings pages, onboarding flows, pricing pages — each with specific design rules a top product designer would apply. All knowledge is inline in the skill file. No Python scripts. No CSV databases. No new dependencies. Pure design expertise, zero bloat.
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 高价值/高频刚需,直接解决用户明确的核心任务痛点
- 显著提升日常高频场景的效率,如自动化任务、信息聚合、内容生成等
亮点
- 触发词精准完整,覆盖多种变体,边界清晰
亮点
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,单文件≤500行
亮点
- 工具来源明确,参数正确,覆盖主要异常
- 不可逆操作有确认机制,可靠性良好
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- 127.0.0.1
- example.com
- vincentdunn.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。