Skill

Compare AI-generated UI variants in your running app

Compares AI-generated UI variants live in a real app via a local picker, then cleans up the losing temporary code.

Works with npm

Maintainer of this project? Claim this page to edit the listing.


91
Spark score
out of 100
Updated 2 days ago
Version 15.5.1

Add to Favorites

Why it matters

Enable frontend developers and coding agents to generate multiple UI alternatives as temporary source code variants, preview them side-by-side in the local running application, select the best option, and automatically clean up unused code before shipping.

Outcomes

What it gets done

01

Generate 2-4 temporary UI variants with data-unship markup in component source code

02

Render all alternatives in the local development preview with a picker interface

03

Remove losing variant code and cleanup attributes after user selection

04

Verify comparison safety and run final checks before production release

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-unship | bash

Overview

Unship

This skill lets a coding agent add temporary UI variants into an app's real source, show them via a local browser picker using data-unship-pick/data-unship-option markup, and clean up the losing options once the user picks a winner in chat. Use it when comparing multiple AI-generated UI alternatives in a running local app. Not for production A/B testing, analytics, or feature flagging, and not without user authorization for local source edits.

What it does

This skill lets a coding agent add temporary UI variants directly into an app's real source code, show them via a local browser picker, and clean up the losing options once the user picks a winner. It uses data-unship-pick/data-unship-option markup to mark a comparison group and its labeled alternatives - for example "Current", "Proof-led", "Visual" - with exactly one option visible at a time and the rest hidden. The workflow runs in five steps: install or reuse the project-local unship CLI, create the temporary variants in source, verify comparison readiness (the pick group exists, options are direct children, exactly one starts visible), let the user choose a winner by naming its label in chat, and then remove the losing options plus all temporary data-unship-* attributes, confirmed clean via unship check --json.

When to use - and when NOT to

Use it when comparing multiple UI, layout, copy, state, flow, or design-system alternatives that a coding agent generated, letting the user judge real options in the running local app rather than accepting one generated version at a time. It's explicitly not production A/B testing, analytics, feature flagging, or a hosted experiment service - and it shouldn't be used if the app can't safely render inactive hidden variants (duplicate active IDs, global scripts, analytics triggers, focus traps, destructive actions, autoplay side effects) or if the user hasn't authorized local source edits.

Inputs and outputs

Input is a page, component, route, or rendered artifact needing a UI comparison. Output is temporary source-level variant markup and, after the user's choice, cleaned-up source with the losing options and all Unship attributes removed. Setup:

./node_modules/.bin/unship doctor --json --no-update-check

with the CLI installed as a pinned, reviewed dev dependency (npm install --save-dev @unship/cli@<reviewed-version>) rather than run unpinned via npx.

Integrations

Built as a local CLI (@unship/cli) supported across coding-agent tools including Claude Code, Antigravity, Cursor, Gemini CLI, Codex CLI, and OpenCode, with a local browser-based picker for viewing variants in the running app.

Who it's for

Developers using a coding agent to generate and compare multiple real UI options in-app before committing to one, who want the losing variants reliably cleaned up rather than left as dead code. This is flagged as a critical-risk skill since it edits real source and performs destructive cleanup, so confirming the user's choice before deleting code and never running an unpinned remote CLI version are both explicit safety requirements.

Source README

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-pick group 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@latest or 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 hidden with 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.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.