跳到正文
Skillpedia
界面(UI/UX)34k · #8428

visual-ralph

它能做什么

这个技能让网页或应用界面与你批准的视觉目标保持一致。适合需要经过测量的匹配效果和可复用组件的设计师与前端开发者。

适用场景

  • ✓当你希望网页或应用界面按照设计稿或在线网站来构建的时候。
  • ✓当你希望通过逐像素比较来检查匹配程度,而不只是凭肉眼判断的时候。
  • ✓当你不只需要截图匹配,还需要留下可复用的设计令牌和组件的时候。

技能链接

https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/visual-ralph/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Yeachan-Heo/oh-my-codex/blob/main/plugins/oh-my-codex/skills/visual-ralph/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请按照这张设计稿图片重新构建这个落地页,并逐像素检查差异,直到足够接近为止。”

每周 5 个新技能,1 分钟读完。

工作原理

它会检查代码仓库使用的框架和样式,然后通过 ultragoal 工作流对照参考进行实现。它会比较截图,给出附有像素差异证据的结论,并反复进行,直到匹配程度可以接受。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Visual Ralph Skill

Use $visual-ralph for measured frontend implementation from an approved generated reference, static image, or live-URL baseline. The loop is:

description / URL -> approved reference -> $ultragoal implementation -> Visual Ralph verdict + pixel diff -> reusable design system.

For URL cloning, this skill owns the migrated $web-clone use case; preserve URL, viewport, fidelity, and interaction notes here. Do not invoke standalone $web-clone.

Shared operating, delegation, state, hook, team, cancellation, and verification invariants live in templates/AGENTS.md. Follow that source instead of duplicating its rules here.

Use when

  • The user wants a web/app UI built or restyled against a visual target.
  • A live URL or generated raster mockup needs measured implementation and pixel-level iteration.
  • The result must leave reusable repo-native tokens/components, not only a matching screenshot.

Do not use it for a durable DESIGN.md brief ($design), non-visual backend work, comparison-only fixes that can be executed directly, or deterministic SVG/code-native assets.

Workflow

1. Ground the repository

Inspect package manager/scripts, frontend framework and routes, styling/token conventions, screenshot tooling, and reusable components. Choose stack-specific commands only when repository evidence supports them.

2. Establish a reference

For a live URL, capture or document an artifact containing source URL and permission/scope, viewport(s), route/state, seed/login assumptions, baseline screenshot path or capture command, visible-control parity notes, and exclusions (backend/API/auth, personalized data, crawling, third-party widgets).

For a generated concept, use $imagegen with classification ui-mockup, viewport/aspect ratio, surface, layout hierarchy, typography, color mood, exact text, no logos/watermarks/unrequested marks, and readable/feasible UI details. In OMX runtime, queue the continuation checkpoint before the built-in image tool:

omx imagegen continuation <session-id> --artifact <slug-or-filename> --generated-dir "$CODEX_HOME/generated_images/<session>" --work-dir ".omx/artifacts/visual-ralph/<slug>"

Copy the approved reference into .omx/artifacts/visual-ralph/<slug>/reference.png; do not leave it only under $CODEX_HOME/generated_images.

3. Approval gate

Stop after generation or URL capture and obtain approval of one reference image/state (or a targeted regeneration/capture adjustment). Before approval, do not implement or invoke $ultragoal. After approval, the image/baseline is the visual source of truth; major pivots require an explicit user request.

4. Hand off to $ultragoal

Pass the approved reference/baseline, URL and permission note when applicable, viewport/content state, interaction parity and exclusions, user description, detected frontend context, screenshot command/viewport, and the completion checklist. The active Ultragoal execution lane edits, runs, captures, and iterates after approval until matched or blocked.

5. Verdict before every edit

For each iteration, capture the current screenshot with viewport/state, run Visual Ralph verdict (using vision when needed), and treat its JSON as authoritative. If score < 90, turn differences[] and suggestions[] into the next edit plan and rerun before editing. Required verdict keys: score, verdict, category_match, differences[], suggestions[], reasoning.

6. Secondary diff evidence

Use pixel diff/pixelmatch overlays only to locate hotspots and translate them into edits; they never replace the verdict. Record final reference, screenshot, and diff artifacts for auditability.

7. Reusable design system

Encode the match in existing repo-native CSS variables, theme tokens, config, component variants, stories, or DESIGN.md updates. Capture applicable colors, spacing, typography/weights, radii, shadows/elevation, and important variants/states. Extend existing patterns rather than adding a parallel layer.

Completion evidence and stop conditions

Do not declare done until the approved reference/baseline and reproduction command (viewport, route, state, output path) are saved; final verdict is >= 90; secondary diff evidence is recorded; reusable tokens/components exist; equivalent build/lint/test verification passes; no unapproved pivot occurred; and remaining differences are documented. Stop at the approval gate or

常见问题

它会编写设计简报吗?

不会。那是另一个维护 DESIGN.md 文件的设计技能。

可以用在线网站作为目标吗?

可以。在线网址可以作为基准,技能会记录网址和视口的信息。

它只匹配截图吗?

不是。它还会留下一套可复用的设计系统,包括令牌和组件。

详情

作者的原始描述

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

repo: Yeachan-Heo/oh-my-codex

热度

GitHub 星标
34k
排名
#8428
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能