ab-test

ab-test is a command for Claude Code from ncklrs/claude-chrome-user-testing. It costs 32 tokens per session (2,344 once invoked), scanned A, original, MIT.

A browser-based comparison of two versions of a webpage, using the same made-up user type and tasks on each version. It reports which version gives that user a better experience.

In plain words
What is it for?
Use it to test two URLs with one or more user types, selected tasks, and desktop, tablet, or mobile layouts. It can also save replayable browser-session recordings and produce Markdown or JSON reports.
Why use it?
It helps you compare a current page with a redesign, feature-flag version, staging site, or production site using consistent user behavior.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the user-testing-agent plugin — 14 skills, 10 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ncklrs/claude-chrome-user-testing/ab-test
Clone the repo
git clone --depth 1 https://github.com/ncklrs/claude-chrome-user-testing

Made for: Claude Code.

Or install user-testing-agent, the plugin that ships this one along with the rest of its 14 skills, 10 commands.

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-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/ncklrs/claude-chrome-user-testing/ab-test.svg)](https://agentmods.dev/commands/ncklrs/claude-chrome-user-testing/ab-test)
Your own site
<a href="https://agentmods.dev/commands/ncklrs/claude-chrome-user-testing/ab-test"><img src="https://agentmods.dev/badge/commands/ncklrs/claude-chrome-user-testing/ab-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 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,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00032 $0.02344
Opus 5 $0.00016 $0.01172
Sonnet 5 $0.00006 $0.00469
Haiku 4.5 $0.00003 $0.00234

Measured 6d ago against content hash 8e57d71cd87a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ab-test scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/ab-test.md · 312 lines

How it starts

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

A/B Testing Command

Compare two URL variants with the same persona to determine which version provides a better user experience. Useful for testing redesigns, feature flags, staging vs production, or any design variations.

Arguments

Parse the following from $ARGUMENTS:

  • --url-a <url> (required): Variant A URL (typically control/current version)
  • --url-b <url> (required): Variant B URL (typically test/new version)
  • --persona <id> (required unless --personas used): Single persona to test with
  • --personas <ids> (optional): Comma-separated persona IDs for multi-persona A/B testing
  • --tasks <tasks> (optional): Comma-separated tasks to perform on each variant
  • --gender <m|f|n> (optional): Gender variant (male/female/neutral)
  • --quiet (optional): Disable narration, show only comparison summary
  • --record (optional): Record sessions as Playwright Traces
  • --record-path <path> (optional): Custom output path for trace files (default: recordings/)
  • --viewport <mobile|tablet|desktop> (optional): Device viewport size (default: desktop)
  • --output <markdown|json> (optional): Report output format (default: markdown)
  • --network <slow-3g|fast-3g|offline> (optional): Network throttling preset
  • --pr <number> (optional): Post results as GitHub PR comment

Pre-Flight Checklist

Before beginning the test, verify:

  1. Chrome Integration: Confirm Claude is running with --chrome flag
  2. Both URLs Accessible: Navigate to both URLs and verify they load
  3. Persona Loading: Load the specified persona configuration
  4. Variant Labels: Identify Variant A as "Control" and Variant B as "Test"

A/B Testing Flow

Phase 1: Setup

"I'm going to test two versions of this site as [Persona Name].
- Variant A (Control): [URL A]
- Variant B (Test): [URL B]

Let me start with Variant A..."

Phase 2: Test Variant A

  1. Navigate to Variant A URL
  2. Perform all specified tasks (or free exploration)
  3. Collect:
    • Task completion status
    • Issues found (critical/major/minor)
    • Confusion events
    • Frustration trigger matches
    • Screenshots at key moments
  4. Generate internal results for Variant A

Read the full file on GitHub · 312 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. 6d ago First seen · 312 lines · 32 tokens per session scan A 8e57d71cd87a

Subscribe to this mod's changes

ab-test is a command published in the GitHub repository ncklrs/claude-chrome-user-testing (19 stars, last pushed 8mo ago), licensed MIT. It adds 32 tokens to every session and 2,344 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.