optimizely-exp-experiments

optimizely-exp-experiments is an agent for coding agents from smithdak/claude-marketplace. It costs 17 tokens per session (1,693 once invoked), scanned A, original, MIT.

A review guide for A/B tests, where different users see different versions of a page or feature. It checks how variations are selected and whether the page briefly shows the wrong version while loading.

In plain words
What is it for?
Reviewing A/B test code, variation selection, and loading behavior in web applications.
Why use it?
It helps find implementation patterns that cause visible flicker or apply an experiment variation too late. This makes experiment reviews more concrete.

Agent

Part of the optimizely-exp plugin — 2 skills, 4 agents 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 agents/smithdak/claude-marketplace/experiments
Clone the repo
git clone --depth 1 https://github.com/smithdak/claude-marketplace

Or install optimizely-exp, the plugin that ships this one along with the rest of its 2 skills, 4 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 optimizely-exp-experiments

README.md
[![agentmods](https://agentmods.dev/badge/agents/smithdak/claude-marketplace/experiments.svg)](https://agentmods.dev/agents/smithdak/claude-marketplace/experiments)
Your own site
<a href="https://agentmods.dev/agents/smithdak/claude-marketplace/experiments"><img src="https://agentmods.dev/badge/agents/smithdak/claude-marketplace/experiments.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,693 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 $0.00017 $0.01693
Opus 5 $0.00009 $0.00847
Sonnet 5 $0.00003 $0.00339
Haiku 4.5 $0.00002 $0.00169

Measured 4d ago against content hash e4d10a71abc8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimizely-exp-experiments 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 4d 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.

plugins/optimizely-experimentation-analyzer/agents/experiments.md · 295 lines

How it starts

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

Optimizely Experiments Agent

Analyze A/B test implementation, variation handling, and flicker prevention.

Analysis Areas

1. Flicker Prevention

EXP-001: Variation Applied After Render (Critical)

Variations must be applied before initial render to prevent flicker:

Grep: useEffect.*decide
Grep: componentDidMount.*getVariation
Grep: useState.*null.*setVariation

Bad Pattern (Causes flicker):

function ExperimentComponent() {
  const [variation, setVariation] = useState(null);

  useEffect(() => {
    // Decides AFTER initial render - causes flicker!
    const decision = optimizely.decide('experiment_key');
    setVariation(decision.variationKey);
  }, []);

  return <div className={variation}>{/* Content changes! */}</div>;
}

Good Pattern (No flicker):

function ExperimentComponent() {
  // Decision made during render, before paint
  const [decision, clientReady] = useDecision('experiment_key');

  if (!clientReady) {
    return <Skeleton />; // Placeholder while loading
  }

  return <div className={decision.variationKey}>{/* Stable */}</div>;
}

Alternative - Server-Side Rendering:

// pages/index.tsx (Next.js)
export async function getServerSideProps({ req }) {
  const userId = getUserId(req);
  const decision = optimizelyClient.decide('experiment_key', userId);

  return {
    props: {
      variation: decision.variationKey,
    },
  };
}

2. Missing Tracking

EXP-002: A/B Test Without Tracking Event (Warning)

Experiments should track conversion events:

Grep: decide\((?!.*track)
Grep: activate\((?!.*track)
Grep: getVariation\((?!.*track)

Bad Pattern:

// No conversion tracking!
const variation = optimizely.decide('checkout_experiment');
if (variation.variationKey === 'new_checkout') {
  showNewCheckout();
}
// User converts but we don't know which variation caused it

Good Pattern:

const variation = optimizely.decide('checkout_experiment');
if (variation.variationKey === 'new_checkout') {
  showNewCheckout();
}

// Track conversion
function onPurchase(revenue) {
  optimizely.track('purchase', {
    revenue,
    variation: variation.variationKey,
  });
}

Read the full file on GitHub · 295 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. 4d ago First seen · 295 lines · 17 tokens per session scan A e4d10a71abc8

Subscribe to this mod's changes

optimizely-exp-experiments is an agent published in the GitHub repository smithdak/claude-marketplace (3 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 1,693 once invoked, about $0.0001 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-31.