Skip to main content
Run this skill to migrate from Optimizely to Confidence:
npx skills add spotify/confidence-ai-plugins --skill migrate-optimizely
The installer works with Claude Code, Cursor, Codex, Gemini CLI, and other AI assistants, and asks which one to install to. You can also install the full Confidence plugin with your assistant’s own plugin manager. The kit moves your flags, rules, and audiences from Optimizely Feature Experimentation to Confidence, then rewrites your application code from the Optimizely SDK to the Confidence SDK. See the migrations overview for how migration kits work.

Before You Begin

To run this migration kit, you need:
  • The Confidence plugin installed in your AI assistant
  • An Optimizely personal access token or service account token with read access to flags, rules, and audiences, stored in the OPTIMIZELY_API_TOKEN environment variable. You can create one under Account Settings > API Access in the Optimizely app.
  • The Confidence Flags MCP server, authenticated with your account
  • The Confidence Documentation MCP server, used during code transformation
  • Optional: a Confidence REST API token stored in the CONFIDENCE_TOKEN environment variable, required for partial traffic allocation, reusable audiences as segments, and exclusion groups

Run the Migration

Invoke the kit with the /confidence:migrate-optimizely command in your AI assistant.
1

Plan the flag migration

Run /confidence:migrate-optimizely plan flag. The kit scans your Optimizely flags, rulesets, and audiences and writes a migration plan file.
2

Review the plan

The plan lists every flag with its rules and traffic allocation, and marks anything that can’t migrate automatically. Plan files are resumable, so you can pause and continue later.
3

Execute the flag migration

Run /confidence:migrate-optimizely execute <plan-file>. The kit recreates your flags in Confidence with their variations, audiences, and rules in priority order.
4

Plan and execute the code migration

Run /confidence:migrate-optimizely plan code, review the plan, then execute it. If your app already uses OpenFeature, the kit swaps the registered provider and leaves call sites unchanged. Otherwise it rewrites each Optimizely SDK call to the Confidence SDK, creating one pull request per flag.
The kit migrates stable flags only. It excludes live A/B tests because Confidence uses a different bucketing hash, so migrating a running test would reshuffle its users. Conclude running experiments before migrating, or restart them in Confidence.

What Gets Migrated

OptimizelyConfidence
FlagFlag
Variation with variable valuesVariant with a payload
Targeted delivery or A/B ruleTargeting rule, one per Optimizely rule in priority order
AudienceSegment with the REST API token, or criteria copied into rules
Traffic allocation and variation splitVariant allocations inside the rule
Default variationFinal catch-all targeting rule
Bucketing IDEntity field of your choice, such as user_id

Known Limitations

The kit flags these Optimizely features for manual review because Confidence doesn’t support them:
  • Substring and general regular expression matching
  • Presence conditions that check whether an attribute exists
  • Audience conditions based on browser, device, query parameter, cookie, or location
  • Multi-armed bandits, because Confidence allocations are static
  • Partial rollouts with fall-through and exclusion groups, unless you use the REST API token

Analyze Historical Experiments

The migration kit moves your flags and code, not your historical experiment results. To re-analyze experiments that ran on Optimizely, export your decision events to your data warehouse and follow the assignment table from Optimizely decision events guide. The analysis workflow page explains the process in more depth.

Migrations Overview

How migration kits work and how to install the plugin

Use AI with Confidence

Set up the Confidence MCP servers for your AI assistant

Analyze a Past Experiment

Re-analyze experiments that ran on another platform

SDK Integration

Integrate Confidence SDKs into your application