ab-variants

ab-variants is a command for Claude Code from Adityaraj0421/naksha-studio. It costs 26 tokens per session (2,932 once invoked), scanned A, original, MIT.

A tool for creating alternative versions of an existing Figma screen. Variants can change the layout, call-to-action placement, colors, or wording.

In plain words
What is it for?
Use it to create test versions of important screens and compare different layouts, buttons, visual treatments, and copy.
Why use it?
It makes it easier to compare design options in an A/B test, where different versions are shown to users to see which performs better.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the naksha-studio plugin — 47 commands, 7 agents shipped together

Good fit Use it to create test versions of important screens and compare different layouts, buttons, visual treatments, and copy.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Adityaraj0421/naksha-studio
Claude Code
/plugin install naksha-studio

Made for: Claude Code.

Or install naksha-studio, the plugin that ships this one along with the rest of its 47 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ab-variants

README.md
[![agentmods](https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/ab-variants.svg)](https://agentmods.dev/commands/adityaraj0421/naksha-studio/ab-variants)
Your own site
<a href="https://agentmods.dev/commands/adityaraj0421/naksha-studio/ab-variants"><img src="https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/ab-variants.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,932 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.02932
Opus 5 $0.00013 $0.01466
Sonnet 5 $0.00005 $0.00586
Haiku 4.5 $0.00003 $0.00293

Measured 7d ago against content hash 5aca560a2c72, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ab-variants scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -L "[screenshot.downloadUrl]" -o variant-[A|B|C].png
commands/ab-variants.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/ab-variants

You are generating A/B test design variants from an existing Figma screen. This creates alternative versions of key design elements to enable data-driven design decisions.

Input: $ARGUMENTS

Read ${CLAUDE_PLUGIN_ROOT}/skills/design/references/figma-creation.md for Figma API patterns, ${CLAUDE_PLUGIN_ROOT}/skills/design/references/ux-researcher.md for testing methodology, and ${CLAUDE_PLUGIN_ROOT}/skills/design/references/content-designer.md for copy variation.

Process

1. Connect & Identify Source

figma_get_status → verify Desktop Bridge connection

Find the source frame and analyze its structure:

figma_execute: `
  const frame = await figma.getNodeByIdAsync('SOURCE_ID');
  const texts = frame.findAllWithCriteria({ types: ['TEXT'] });
  const instances = frame.findAllWithCriteria({ types: ['INSTANCE'] });

  return {
    name: frame.name,
    width: Math.round(frame.width),
    height: Math.round(frame.height),
    headings: texts.filter(t => t.fontSize >= 20).map(t => ({
      id: t.id, text: t.characters?.substring(0, 60), size: t.fontSize
    })),
    ctas: texts.filter(t => {
      const parent = t.parent;
      return parent?.name?.toLowerCase().includes('button') ||
             parent?.name?.toLowerCase().includes('cta');
    }).map(t => ({
      id: t.id, text: t.characters, parentId: t.parent?.id, parentName: t.parent?.name
    })),
    components: instances.map(i => ({
      id: i.id, name: i.name, mainComponent: i.mainComponent?.name
    })),
    sections: frame.children.map(c => ({
      id: c.id, name: c.name, type: c.type, height: Math.round(c.height)
    }))
  };
`

Screenshot for reference:

figma_capture_screenshot(sourceId) → original version

2. Determine What to Vary

Based on user input or auto-detection, select variation dimensions:

Dimension What Changes High-Impact Areas
Layout Section order, grid arrangement, visual hierarchy Hero area, feature section, pricing table
CTA Button text, color, size, position, quantity Primary action, sign-up, pricing selection
Color Primary accent, background, contrast treatment Hero background, CTA button, section accents
Copy Headlines, subheadings, value propositions, CTAs Hero headline, feature descriptions, button labels
Social Proof Testimonial placement, trust badges, stats Near CTA, hero area, pricing section

Read the full file on GitHub · 319 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 319 lines · 26 tokens per session scan A 5aca560a2c72

Subscribe to this mod's changes

ab-variants is a command published in the GitHub repository Adityaraj0421/naksha-studio (316 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 2,932 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.