unship – skill Thiết kế & UI cho agent AI
So sánh các biến thể UI do AI tạo ra trong ứng dụng thực tế chạy cục bộ, sau đó giữ lại một phương án và dọn dẹp mã tạm không dùng đến.
Cài skill unship bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/unship-43c7f.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /unship – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/unship-43c7f.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $unship – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/unship-43c7f.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /unship – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/unship-43c7f.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /unship – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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-checkOtherwise 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-checkIf setup is needed for the local picker, run:
./node_modules/.bin/unship setup --jsonPatch 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 --jsonDo 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.
- If a baseline build or typecheck already fails before Unship edits, report that baseline state and keep variant work isolated.
Common Pitfalls
- Problem: Hidden variants override
hiddenwith CSS.
Solution: Preserve [hidden] { display: none !important; } near variant-specific CSS when needed.
- Problem: The user says "keep the second one" after more changes.
Solution: Confirm the exact group and option label before editing source.
- Problem: The comparison grows into a broad redesign.
Solution: Reduce scope to the smallest section, state, or flow that can be judged in the running app.
Related Skills
@webapp-testing- Use for browser-based functional checks after frontend changes.@mobile-design- Use when comparing mobile-specific UI patterns and platform constraints.
Skill liên quan
- ux-audit – Kiểm tra giao diện để tìm vấn đề UX dựa trên nguyên tắc heuristic của Nielsen và các…
- ux-copy – Tạo microcopy UX (nhãn nút, thông báo lỗi, trạng thái trống, toast) theo giọng văn thân…
- ux-feedback – Thêm các trạng thái phản hồi phù hợp (đang tải, thành công, lỗi, trống) cho một…
- ux-flow – Thiết kế luồng người dùng và cấu trúc điều hướng theo các mẫu UX đã được kiểm chứng
- ux-persuasion-engineer – Kiểm tra độ khó khi ra quyết định và đề xuất luồng UX rõ ràng, dễ tiếp cận khi bố cục…
- uxui-principles – Đánh giá giao diện theo 168 nguyên tắc UX/UI có cơ sở nghiên cứu, phát hiện antipattern…
- vaporwave – Hướng dẫn triển khai phong cách Vaporwave cho Web và App. Kích hoạt khi người dùng muốn…
- vibecode-production-qa-validator – Kiểm tra QA production 13 giai đoạn cho ứng dụng fullstack Next.js: xác minh build, thẻ…