Skill library

Agent skill Web motion

Variant

Make interface behavior and feedback feel clear and intentional.

  • Microinteractions
  • Interaction design

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add jakubkrehel/skills --skill variant --agent claude-code --yes

Check this file in your project.claude/skills/variant/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add jakubkrehel/skills --skill variant

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring one component, its host route, the current project tokens, and realistic non-sensitive test data.

View operation manual

What this skill helps with

  • Make interface behavior and feedback feel clear and intentional.

Good for

  • Interaction and feedback
Skill name
variant
Workflow
Compare three densities for one metric card
Deliverable
Three working preview variants and a trade-off table for the user’s selection.
Skill name
variant

Keep the request tied to one real task

A broad request

Show three screenshots with different accent colors.

The screenshots do not show how a layout decision changes reading, interaction or realistic content fit.

A checkable workflow

  1. Choose one component and comparison axis
  2. Build linkable variants in the real preview
  3. Compare trade-offs and stop for a choice

Variant operation manual

Use one design axis, shared realistic data and a linkable picker in the actual local page.

Replace the bracketed details with the component, route, or source you want to use.

  1. Choose one component and comparison axis

    Name what the component must do and how the variants will differ.

    Prompt · Step 1
    Run /variant for [metric card and local host route]. Read the existing typography, spacing, tokens and component conventions. Use density as the single primary axis. Name three positions that make distinct trade-offs, and use the same realistic metrics, labels, actions and theme for all. Restate the task and expected behavior before editing.
  2. Build linkable variants in the real preview

    Use the host page and display one full-size card at a time.

    Prompt · Step 2
    Run /variant to build [the three agreed density options] on [local host route]. Keep fixtures inert and reuse the real page’s theme and neighboring elements. Use a grouped picker with ?__variant= links and one full-size card shown at a time. Keep variants isolated to the host and avoid exposing temporary experiment controls beyond the approved route. Verify control names, focus and narrow-width fit before presenting.
  3. Compare trade-offs and stop for a choice

    Verify each link and interaction, then give the user the decision.

    • The same content and task appear in all three variants.
    • The picker links open one full-size, working version each.
    Prompt · Step 3
    Run /variant to verify [three linked metric card variants] at the agreed narrow and wide widths. Follow each URL, exercise the same control and long label, and check the console on the local preview. Present the variant name, axis position, suitable context and cost. Share working links and observed widths. Wait for my choice before promoting a variant or removing the temporary picker.

Find the relevant rule

Provide the actual target and point to the installed reference.

Options differ only by colorReference
Command or reference
SKILL.md · Name the axis before writing code
Examples
Pick distinct positions on an agreed axis, such as information density.
A teammate needs a direct link to one optionReference
Command or reference
picker.md
Examples
Use the URL parameter so the exact option can be opened locally.

Variant troubleshooting

When does a variant become production UI?

After the user chooses, implement that version in its actual component and remove the temporary picker and unused variants.