Uniapp Ui Replica Skill logo

Uniapp Ui Replica Skill

Community
jiushiwon
uniapp-ui-replica-skill

把 UI 原型图/截图高还原地复刻成可运行代码。触发词:复刻这张图、把原型图转成代码、图片转 HTML/Vue/React、Figma 转代码、Stitch 转代码、照着设计稿写页面、截图转代码、仿照这个页面。

Overview

Publisherjiushiwon
Repositorywg-skills
Skill nameuniapp-ui-replica-skill
Stars
123
Forks
38
Bundled files
14
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 14 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jiushiwon on GitHub. Read the source before you install it.

Installation

Install the Uniapp Ui Replica Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/uniapp/uniapp-ui-replica-skill
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiushiwon/wg-skills.git /tmp/wg-skills
mkdir -p .claude/skills
cp -r /tmp/wg-skills/vibeCoding/frontend/uniapp/uniapp-ui-replica-skill .claude/skills/uniapp-ui-replica-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Uniapp Ui Replica Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Uniapp Ui Replica Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Uniapp Ui Replica Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

UI Replica Skill

把 UI 原型图/截图高还原地复刻成可运行代码。

核心原则:先看到像原图的页面,再谈规范和收敛。第一稿目标是把可见部分还原到 80% 以上;样式收敛、组件沉淀、设计系统治理交给 frontend-style-harmonizer-skill 或 uniapp-base-skill 后续处理。

适用场景

  • 用户发来一张 UI 原型图或截图,要求复刻成代码
  • 图片来源是 AI UI 生成器(Stitch、v0、Galileo AI、Uizard、Figma/AI 等)
  • 用户之前复刻效果差,需要系统化方法提升还原度

不适用场景

  • 用户只有文字需求,没有图片 —— 用 frontend-ui-foundry
  • 用户想从零设计一个新页面 —— 用 frontend-ui-foundry 或 ui-ux-pro-max
  • 用户只想改某个已有组件 —— 用 uniapp-base-skill

两种执行模式

模式触发方式输出
快速模式用户只发图,未指定框架直接输出单文件 HTML,一句话结构说明,Token 表折叠或后置
完整模式用户指定技术栈、要求接入项目、或发来多图走完整 0-6 阶段流程,输出结构分析 + Token 表 + 代码

默认走快速模式。只有用户明确说“我要 Vue/React/uniapp 版本”或“接入项目”时,才进入完整模式。

核心流程

0.0. 读图准备
   └── 读取本地路径或 URL,失败时要求用户重新提供
   └── 评估图片清晰度、完整性、是否长图/多图
   └── 质量不足时,先告知用户再估算

1. 结构化读图
   └── 识别页面类型(中后台/营销/官网/移动端/文档)
   └── 拆结构:页面  区块  卡片  元素
   └── 标记颜色、字号、间距、圆角、阴影、图标
   └── 识别特殊元素:二维码、图表、头像、地图

2. 收敛 Token
   └── 提取主色、中性色、文字色、背景色
   └── 收敛间距、圆角、阴影、字号阶梯
   └── Token 用于快速保持一致,不强求与项目设计系统对齐

3. 代码生成
   └── 先搭骨架(layout),再填血肉(components)
   └── 默认单文件 HTML + Tailwind CDN(可直接浏览器打开)
   └── 指定框架时生成对应骨架并填充页面
   └── 复杂元素优先用代码模拟,无法模拟再占位

4. 验证与交付
   └── 检查关键状态(hover/active/disabled)
   └── 说明未在浏览器实测
   └── 给出还原度自评和待确认项

输出规范

快速模式

  1. 一句话结构分析:页面类型 + 主要区块
  2. 完整代码:单文件 HTML,可直接打开
  3. Token 表:可选,用户追问时再给
  4. 验证提醒:说明未实测,请用户打开查看并指出差异

完整模式

  1. 结构分析:页面类型 + 结构树
  2. 图质量评估:清晰度、完整性、遮挡情况
  3. Token 表:颜色、间距、圆角、阴影
  4. 完整代码:按指定技术栈输出
  5. 验证提醒与还原度自评:说明未实测,列出待确认项

复杂元素策略

按“能模拟就模拟,不能模拟再占位”处理:

元素优先方案降级方案
通用图标Iconify / 内联 SVG语义文字标签
二维码QRCode.js 真实生成占位 div
图表ECharts / Recharts 渲染 mock 数据占位 div
地图CSS 色块 + 标注点模拟占位 div
Banner/头像Unsplash 直接 URLCSS gradient 占位
日历原生 <input type="date"> 或组件库 DatePicker占位 div
文件上传拖拽上传 UI占位 div

禁止直接使用 Emoji 作为正式图标。

技术栈默认策略

用户输入工作目录输出形态
只发图,未指定框架任意单文件 HTML + Tailwind CDN
指定 uniapp/Vue/React/HTML任意按指定框架生成
要求“接入项目”目标项目询问确认后按项目技术栈生成
多图/原型图集任意先梳理页面关系,再逐个生成

项目检测规则:看到 manifest.json + pages.json 提示可能是 uniapp,看到 vue 依赖提示可能是 Vue,看到 react 依赖提示可能是 React/Next。但不自动决定输出形态,只作为提示询问用户是否接入项目。

长页面与滚动截图

若图片高度明显大于宽度 2 倍以上,视为长页面:

  1. 按视觉断点拆成若干屏(如首屏、列表区、表单区、底部区)
  2. 先复刻当前可见区域
  3. 询问用户是否继续复刻下方内容,或合并为同一页面的滚动区块

增量精调

用户拿到第一稿后通常会提出局部修改:

  1. 只改被指出的元素,不重写整页
  2. 记录已确认的视觉参数
  3. 直接输出局部 diff 或修改后的完整文件
  4. 不重复输出整份 Token 表

与其他 skill 的关系

  • 复刻完成后,如需收敛样式、提取公共变量 → frontend-style-harmonizer-skill
  • 复刻完成后,如需沉淀可复用组件 → uniapp-base-skill
  • 无图纯文字需求 → frontend-ui-foundry

本 skill 默认独立运行,专注复刻,不中途调用其他 skill。

还原度目标

  • 第一稿目标:整体布局、主色、关键组件形态与原图一致,达到 80% 以上还原度即可交付。
  • 精调目标:修复用户指出的差异点。
  • 不追求:100% 像素级还原、全部交互状态、完整响应式。

常见错误

  • ❌ 直接让模型“复刻这张图”,不先拆结构
  • ❌ 每个元素各写一套颜色/间距/圆角
  • ❌ 只还原静态图,漏掉 hover、focus 等关键状态
  • ❌ 对图表/地图直接给占位 div,不尝试模拟
  • ❌ 不说明技术栈假设,直接输出代码
  • ❌ 对模糊/局部图片直接硬猜,不询问用户补充

参考资料

文件用途
references/workflow.md详细复刻流程
references/checklist.md逐项自检
references/token-template.md设计 Token 模板
references/structure-template.md页面结构拆解模板
references/complex-components.md图表/表单/动画/地图等复杂组件处理
references/integration-guide.md把产出代码集成到真实项目
references/multi-mockups.md多原型图梳理与复刻计划
examples/复刻样例

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Uniapp Ui Replica Skill AI skill do?

把 UI 原型图/截图高还原地复刻成可运行代码。触发词:复刻这张图、把原型图转成代码、图片转 HTML/Vue/React、Figma 转代码、Stitch 转代码、照着设计稿写页面、截图转代码、仿照这个页面。

Why use Uniapp Ui Replica Skill on TypingMind?

Because you install it once and use it with any model. Uniapp Ui Replica Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Uniapp Ui Replica Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jiushiwon/wg-skills/tree/main/vibeCoding/frontend/uniapp/uniapp-ui-replica-skill. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Uniapp Ui Replica Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Uniapp Ui Replica Skill?

As many as you like. As long as a model supports skills, you can use Uniapp Ui Replica Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Uniapp Ui Replica Skill AI skill free?

Yes. It is published on GitHub by jiushiwon under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇