abtesting-web
Purpose
This skill, abtesting-web, facilitates A/B testing for web applications by managing feature flags with tools like LaunchDarkly or Unleash, implementing cookie-based user segmentation, and routing traffic via Cloudflare Workers or header-based rules. It ensures controlled experimentation to optimize web features without downtime.
When to Use
Use this skill for dynamic feature rollouts in web apps, such as testing new UI elements, personalizing content via cookies, or splitting traffic for experiments. Apply it when you need scalable A/B testing with tools like LaunchDarkly for enterprise features or Unleash for cost-effective setups, especially in environments with Cloudflare.
Key Capabilities
- Feature flags: Integrate LaunchDarkly to toggle flags via API, e.g., check flag status with Unleash's
/api/featuresendpoint. - Cookie segmentation: Parse cookies in Cloudflare Workers to segment users, e.g., check for a specific cookie value like
document.cookie.includes('variant=A'). - Cloudflare Workers A/B: Route requests based on rules, such as using
fetch(event.request)with conditional logic for 50% traffic split. - Header routing: Evaluate request headers in code, e.g., if
event.request.headers.get('X-Experiment') === 'group1', route accordingly. - Specific configs: Use JSON format for flag definitions, e.g.,
{"name": "new-feature", "enabled": true, "variants": ["A", "B"]}.
Usage Patterns
To set up A/B testing, first initialize the skill with your API key, e.g., run openclaw abtesting-web init --provider launchdarkly --key $LAUNCHDARKLY_API_KEY. For ongoing use, query flags in your web app code: import the SDK and check status like ldClient.variation('feature-key', false). Pattern for segmentation: In Cloudflare Workers, add event handlers to evaluate cookies or headers before proxying requests. Always test locally first with a mock server, then deploy via openclaw abtesting-web deploy --env production.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
370humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
262macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
173tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
155clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102