unship
它能做什么
帮助你在应用程序内直接比较 AI 生成的不同用户界面版本。你可以并排查看各个选项,在删除未使用的代码之前选出最好的一个。
适用场景
- ✓当你想为某个页面查看多种设计方案时。
- ✓当你想比较按钮或标题的不同文案时。
- ✓当你想测试某个板块的替代布局时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/unship/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“对比一下这两个版本的首页,你更喜欢哪一个?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会在你的代码中添加特殊标记,以生成临时的界面版本。你可以在浏览器中看到它们,并选择你喜欢的那一个。之后,AI 会删除没有被选中的版本以及这些标记。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Unship
Overview
Unship is a local workflow for comparing AI-generated UI alternatives in the real application instead of accepting one generated version at a time. It adds temporary source-level variants, shows a local browser picker, and then cleans up the unused options after the user chooses.
This skill is for frontend iteration with coding agents. It is not production A/B testing, analytics, feature flagging, or a hosted experiment service.
When to Use This Skill
- Use when the user wants to compare multiple UI, layout, copy, state, flow, or design-system alternatives.
- Use when a coding agent should create several temporary options in real source code and let the user judge them in the running local app.
- Use when the user chooses a visible option and wants the losing temporary code removed before shipping.
Do Not Use This Skill When
- The user needs production experiments, traffic splitting, analytics, or feature flags.
- The app cannot safely render inactive hidden variants because of duplicate active IDs, global scripts, analytics triggers, focus traps, destructive actions, or autoplay side effects.
- The user has not authorized local source edits.
How It Works
1. Install or reuse Unship
Prefer the project-local binary when it exists:
./node_modules/.bin/unship doctor --json --no-update-check
Otherwise install a reviewed, exact CLI version into the project and then run the local binary:
npm install --save-dev @unship/cli@<reviewed-version>
./node_modules/.bin/unship doctor --json --no-update-check
If setup is needed for the local picker, run:
./node_modules/.bin/unship setup --json
Patch only the smallest development-only mount point required to load the picker in the local preview.
2. Create temporary variants
Inspect the relevant page, component, route, or rendered artifact. Add the smallest source-level comparison that lets the user judge real options in context.
Use Unship markup:
<section data-unship-pick="Hero">
<div data-unship-option="Current">...</div>
<div data-unship-option="Proof-led" hidden>...</div>
<div data-unship-option="Visual" hidden>...</div>
</section>
Keep option labels short and visible. Prefer 2-4 meaningful alternatives unless the user asked for a specific count.
3. Verify comparison readiness
Before handing off to the user, check that:
- the expected
data-unship-pickgroup exists; - the expected option labels exist;
- options are direct children of the group;
- exactly one option is initially visible;
- hidden inactive options remain hidden.
4. Let the user choose
Tell the user the group label, option labels, setup status, and any detected local preview server hints. The user chooses by naming a visible option label in chat.
5. Clean up after selection
When the user picks a winner, keep that option's real source and remove losing options for that group. Remove temporary data-unship-* attributes from settled source.
For final cleanup before shipping, remove all Unship artifacts and run:
./node_modules/.bin/unship check --json
Do not claim cleanup is complete until the check reports clean.
Best Practices
- Keep Unship work local and temporary.
- Preserve the existing app design language unless the user explicitly asks for a different direction.
- Avoid unrelated refactors while variants are temporary.
- Do not put custom tabs, app preferences, or permanent switchers into product UI for Unship comparisons.
- Keep inactive options safe: avoid duplicate active IDs, submit controls, global scripts, analytics triggers, focus traps, destructive side effects, and stateful providers.
Limitations
- Unship does not decide which variant wins; the human chooses.
- Unship does not replace design review, browser QA, accessibility checks, or production release validation.
- Unship is not intended for production traffic, remote analytics, or persistent product experiments.
Security & Safety Notes
- Run commands only in a local project the user has authorized you to modify.
- Do not run
npx @unship/cli@latestor any unpinned remote CLI in automated agent workflows. Pin and review the package version first, then execute the project-local binary. - Treat generated variants as temporary code that must be cleaned before release.
- Before destructive cleanup, confirm the selected option label when the user's choice is ambiguous.
…
常见问题
这个功能适用于线上 A/B 测试吗?
不适用。它是用来在你的电脑上、上线前本地比较各个选项的,不用于收集真实用户的数据来衡量效果。
AI 会未经许可就修改我的代码吗?
会修改,但仅限于创建你可以查看并确认的临时版本。你需要授权本地修改,之后 AI 会移除多余的代码。
如果我一个选项都不喜欢呢?
你可以让 AI 生成新的选项,或者保留原始版本。关键在于由你决定最终保留哪个版本。
详情
作者的原始描述
Compare AI agent-made UI variants locally in a real app, then keep one and clean up unused temporary code.
热度
- GitHub 星标
- 48k
- 排名
- #6305
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。