frontend-from-generated-image

用于前端/UI 构建、重新设计、优化或扩展。先生成一张 UI 参考图,然后紧密参照该图在编写代码时实现,而不是另起炉灶。

仓库最近推送
GitHub Stars
158
Forks
3
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "frontend-from-generated-image":https://skillpi.com/zh/skills/deepskill-5baa5624cbf412068d47cbfebd26221cdd1bac420f19ccd36e32649ac8bfa92c。安装前核对上游来源和版本:https://github.com/adamholter/hive-mind-landing-page。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于前端/UI 构建、重新设计、优化或扩展。先生成一张 UI 参考图,然后紧密参照该图在编写代码时实现,而不是另起炉灶。

0 下载

介绍来源: third_party · adamholter · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: frontend-from-generated-image
description: "Use for frontend/UI builds, redesigns, polish, or extensions. Before coding, generate a UI reference image, then closely match it instead of inventing a new direction."

Frontend From Generated Image

Use this skill for any task that includes a frontend, screen, page, component set, dashboard, landing page, app shell, modal, chat UI, or other visible interface.

When the task is an iteration on an existing UI rather than a full redesign, treat the current UI as an important constraint.

This skill is intentionally strict: the generated or user-provided image is not a moodboard. It is the target. The implementation should look like a faithful translation of the image into working code.

Core rule

Before writing frontend code:

  1. Use the imagegen skill and the built-in OpenAI image generation tool.
  2. If iterating on an existing UI, first gather reference screenshots of the current experience unless the user explicitly wants a full redesign.
  3. Generate or accept at least one UI design reference image for the requested interface.
  4. Treat the reference image as the design source of truth, while preserving existing-product constraints when the task is iterative.
  5. Implement the frontend by copying the image's layout, hierarchy, spacing, typography, color relationships, asset placement, and overall composition as closely as practical in real code.
  6. Verify with screenshots and refine until the rendered result visibly matches the reference.

Do not skip the image-generation step unless the user explicitly tells you not to.

Workflow

  1. Read the product/task requirements and infer the key UI surfaces that need to exist.
  2. If the task is modifying an existing frontend, collect reference screenshots of the current UI first.
  3. Unless the user asked for a full redesign, use those screenshots as reference inputs and constraints for the design-generation prompt.
  4. Write a design-generation prompt for the interface.
  5. Generate the reference image with the built-in OpenAI image tool.
  6. Inspect the result and write a concrete visual brief before coding:
    • layout structure
    • alignment and spacing
    • type scale
    • component shapes
    • color palette
    • background treatment
    • visual density
    • major asset locations and dimensions
    • element ordering and z-index/layer relationships
    • motion cues implied by the composition
  7. Build the real frontend to match that image closely. Work one section or screen at a time when the reference contains multiple sections.
  8. Capture a screenshot of the implementation at the same viewport/aspect ratio as the reference.
  9. Compare screenshot to reference and fix mismatches in layout, spacing, scale, color, asset placement, and typography before moving on.
  10. If the generated image is weak, generate another one and use the stronger reference.

Prompting guidance for the image

When prompting the image model:

  • Describe the product type and exact screen to render.
  • Ask for a polished product UI mockup, not an abstract moodboard.
  • Specify the platform when relevant: desktop web app, mobile app, landing page, chat tool, admin panel, etc.
  • Include the desired tone and brand feel.
  • Ask for clear hierarchy, refined spacing, and realistic interface composition.
  • Request a full-screen UI screenshot/mockup perspective.
  • If the tool already has an established product direction, preserve it rather than reinventing it.
  • If iterating on an existing UI, provide the current UI screenshots as references whenever the image workflow supports that.
  • For iterative work, prompt for an improved version of the current design rather than a replacement design, unless the user explicitly asked for a full redesign.

Image-to-code translation rules

  • Do not rebuild illustrated/photo/3D assets with CSS, SVG primitives, gradients, or decorative divs. Use real image assets for those parts.
  • If the reference contains embedded product art, character art, photos, renderings, textures, icons, or abstract image panels, create explicit asset slots in the project and tell the user or future agent exactly where those files belong.
  • If the user supplied extracted assets, use those assets directly and clone the surrounding layout, components, typography, spacing, and effects.
  • If assets need transparent backgrounds, use the local fal-media-gen Pixelcut Background Remover workflow; do not send the user to external web tools, fake transparency with white boxes, or rebuild image assets in CSS.
  • For multi-section pages, translate one section at a time. Do not rough in all sections and hope the overall impression carries the design.
  • Preserve the exact visual hierarchy of the reference: what is biggest, what is quietest, what aligns to what, and where the eye lands first.
  • Measure proportions from the reference when possible: viewport coverage, section height, image aspect ratios, column widths, gutters, nav height, button height, and card density.
  • Use CSS variables or design tokens for colors, spacing, radii, and shadows that visibly repeat in the reference.
  • Avoid adding extra explanatory copy, extra cards, extra badges, or extra decoration that is not present in the reference.
  • When text in the generated image is unreadable or nonsensical, replace it with concise realistic copy while preserving the same line lengths, weight, hierarchy, and density.

Implementation guidance

  • Copy the generated image, do not merely "take inspiration from it."
  • For iterative work, preserve the recognizable product structure and only change what the task calls for.
  • Match the big decisions first: composition, scale, contrast, and layout rhythm.
  • Then match the smaller decisions: radii, borders, shadows, gaps, card proportions, and type treatment.
  • Preserve usability and accessibility while translating the image into production code.
  • If the generated image includes impossible or unclear details, infer the closest practical implementation without changing the visual direction more than necessary.

Fidelity checklist

Before calling the implementation done, check these against the reference image:

  • Same viewport framing: hero/section height, first-fold composition, and visible next-section hint when applicable.
  • Same macro layout: column count, alignment, negative space, overlap, asymmetry, and section rhythm.
  • Same visual weight: heading scale, supporting text scale, button prominence, image size, and card density.
  • Same color relationships: background, text contrast, accent amount, borders, shadows, and gradients.
  • Same component geometry: radii, stroke weights, padding, gaps, and icon/button sizes.
  • Same asset behavior: images use correct aspect ratio, cropping, object position, transparency, and layering.
  • Same responsive intent: mobile should feel like a faithful adaptation, not a different design.
  • No accidental additions: remove default nav text, generic feature cards, filler badges, random icons, and decorative effects that were not in the reference.

If the screenshot does not match, keep iterating. Name the top mismatches, patch them, and screenshot again.

Priority over default design behavior

If another frontend skill suggests inventing a fresh visual direction, this skill takes priority for UI direction. The generated image should anchor the design.

Deliverable behavior

For frontend tasks covered by this skill, the expected flow is:

  1. Generate the reference image.
  2. Extract or prepare any needed assets and define their project paths.
  3. Build the UI to match the reference section-by-section or screen-by-screen.
  4. Verify the implementation visually with screenshots.
  5. Refine toward the reference until the main mismatches are resolved.

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 提供完整的前端 UI 构建方法论,适用于高频刚需场景
  • 内容详实,逻辑闭环,具有显著的实际应用价值
触发精准90/100

亮点

  • description 明确描述使用场景和核心规则
  • 触发词覆盖合理,边界清晰
结构规范95/100

亮点

  • 文档结构清晰,章节划分明确
  • frontmatter 完整,执行流程详细
执行可靠90/100

亮点

  • 执行流程完整,覆盖主要异常情况
  • 工具来源明确,参数正确
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。