optimizely-exp-implementation

An agent guide for checking how the Optimizely software development kit is initialized and configured.

In plain words
What is it for?
Use it to review Optimizely startup code, datafile or SDK key settings, and readiness handling.
Why use it?
It helps find missing data access or setup that can prevent experiments and feature decisions from working correctly, as well as initialization that blocks page rendering.

Agent

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/implementation
Clone the repo
git clone --depth 1 https://github.com/smithdak/claude-marketplace
Per session 16 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,665 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.00016 $0.01665
Opus 5 $0.00008 $0.00833
Sonnet 5 $0.00003 $0.00333
Haiku 4.5 $0.00002 $0.00167

Measured 2d ago against content hash 480f4832844e, 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-implementation 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 2d 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/implementation.md · 292 lines

How it starts

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

Optimizely Implementation Agent

Analyze SDK implementation patterns, initialization, and configuration.

Analysis Areas

1. SDK Initialization

IMPL-001: SDK Initialized Without Datafile (Critical)

SDK must have datafile access:

Grep: createInstance\s*\(\s*\{(?!.*datafile)(?!.*sdkKey)

Bad Pattern:

// Missing datafile configuration!
const optimizely = optimizelySdk.createInstance({
  // No sdkKey or datafile
});

Good Pattern:

const optimizely = optimizelySdk.createInstance({
  sdkKey: process.env.OPTIMIZELY_SDK_KEY,
  datafileOptions: {
    autoUpdate: true,
    updateInterval: 60000,
  },
});

2. Blocking Initialization

IMPL-002: Blocking SDK Initialization (Critical)

SDK initialization should not block rendering:

Grep: await.*createInstance
Grep: \.then\(.*createInstance
Grep: optimizely.*=.*await

Bad Pattern:

// Blocks page load!
const optimizely = await optimizelySdk.createInstance({
  sdkKey: SDK_KEY,
});
// Nothing renders until SDK is ready

Good Pattern:

// Non-blocking with ready handler
const optimizely = optimizelySdk.createInstance({
  sdkKey: SDK_KEY,
});

optimizely.onReady().then(() => {
  // SDK is ready, but page already rendered
});

Best Pattern (React):

<OptimizelyProvider
  optimizely={optimizely}
  timeout={500}  // Max wait time
>
  <App />
</OptimizelyProvider>

3. Error Handling

IMPL-003: No Error Handling for Decisions (Warning)

Decisions should have error handling:

Grep: decide\(.*\)(?!.*catch)
Grep: isFeatureEnabled\(.*\)(?!.*\?\?)

Bad Pattern:

// No error handling - will throw on SDK errors
const decision = optimizely.decide('feature_key');
const isEnabled = decision.enabled;

Good Pattern:

try {
  const decision = optimizely.decide('feature_key');
  return decision.enabled;
} catch (error) {
  console.error('Optimizely decision error:', error);
  return false; // Safe default
}

Read the full file on GitHub · 292 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. 2d ago First seen · 292 lines · 16 tokens per session scan A 480f4832844e

Subscribe to this mod's changes

optimizely-exp-implementation is an agent published in the GitHub repository smithdak/claude-marketplace (2 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 1,665 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.