skills/experiment-mockup/SKILL.md
When the user wants to create a visual mockup of a proposed experiment change. Also use when the user mentions 'experiment mockup,' 'mockup hypothesis,' 'inject change,' 'DOM injection,' 'visual mockup,' 'mock up experiment,' 'show proposed change,' 'experiment preview,' or 'mockup for hypothesis N.' Takes a hypothesis from experiment-roadmap.md, navigates to the target page, injects the proposed change styled to match the site, iterates with the user, and captures the approved state as a standalone HTML artifact with CRO placement rationale. Three modes: live (Chrome DevTools MCP, interactive), playwright (Playwright MCP, screenshot-based iteration), and static (HTML extraction fallback, non-interactive).
npx skillsauth add FunnelEnvy/funnelenvy-skills experiment-mockupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the orchestrator for the experiment-mockup skill. You parse arguments, detect execution mode, and route to the appropriate phase sequence.
You do NOT execute phase logic directly. You spawn agents that read phase files.
/experiment-mockup <hypothesis-number> [--url <override-url>] [--static]
Arguments:
<hypothesis-number> (required): Which hypothesis from experiment-roadmap.md (e.g., "1" for hypothesis #1, matching the ### N. [Name] heading pattern)--url <override-url> (optional): Override target URL when hypothesis references multiple pages or you want to mock up the change on a different page--static (optional): Force static fallback mode even if Chrome DevTools MCP is availableExamples:
/experiment-mockup 1
/experiment-mockup 3 --url https://example.com/contact
/experiment-mockup 2 --static
| Condition | Type | What Happens If Missing |
|-----------|------|------------------------|
| .claude/deliverables/experiment-roadmap.md exists | Hard | STOP. Tell user: "No experiment roadmap found. Run /hypothesis-generator first." |
| Hypothesis number exists in roadmap | Hard | STOP. Tell user: "Hypothesis #N not found in experiment-roadmap.md. Available hypotheses: [list numbers and names]." |
| Target URL is reachable | Hard | Validated in Phase 1 (live) or static-build (static). If unreachable, STOP with error. |
| Chrome DevTools MCP connected | Recommended | Auto-detected. If unavailable, STOP and recommend setup. Static fallback only with explicit user consent (see Step 5.5). |
No dependency on L0/L1 context files. The hypothesis already contains synthesized context. Re-reading L0/L1 would risk the mockup contradicting the hypothesis. Exception: brand design files (brand-design-system.md, brand-components.html) in .claude/context/ are read if they exist. These are visual references, not positioning context.
| Agent Role | Model | |-----------|-------| | All phase agents | opus |
Parse <hypothesis-number> from arguments. Parse optional --url and --static flags.
If no hypothesis number provided, STOP: "Usage: /experiment-mockup <hypothesis-number> [--url <url>] [--static]"
Read .claude/deliverables/experiment-roadmap.md.
Find the hypothesis matching the provided number. Hypotheses are numbered sequentially with headings like ### 1. [Experiment Name]. Extract:
If the hypothesis number does not exist, STOP with the error from the Preconditions table.
Extract the URL or path from the hypothesis Page: field.
--url flag. If no --url flag, ask the user which page to mock up (list the URLs found)--url flag is set: use the override URL regardless of what the hypothesis saysDerive the hypothesis slug from the experiment name using modules/slugify.md rules:
Output directory: .claude/deliverables/experiments/<hypothesis-slug>/
Do NOT ask the user whether they have a browser MCP configured. Test it. But do NOT silently degrade to static mode -- browser-based mockups are dramatically better, and the user deserves to know that before proceeding with a lower-fidelity fallback.
If --static flag is set: use STATIC MODE. Skip detection. Briefly note: "Running in static mode as requested. Output will be lower fidelity (~60-80% CSS accuracy, no screenshots, no iteration). Remove --static to use Chrome DevTools MCP instead."
a. Detect environment:
test -d /mnt/c/ && echo "WSL2" || echo "NATIVE"
b. If WSL2, run pre-flight checks (silently fix what can be fixed, stop only when user action is required):
Check .wslconfig for mirrored networking:
cat /mnt/c/Users/$USER/.wslconfig 2>/dev/null
If networkingMode=mirrored is NOT present, tell the user:
WSL2 mirrored networking is required for Chrome DevTools to work across the WSL/Windows boundary. Run this in PowerShell, then restart WSL:
"[wsl2]`nnetworkingMode=mirrored" | Set-Content "$env:USERPROFILE\.wslconfig" wsl --shutdownRestart the session after WSL comes back up.
STOP here. Do not fall back to Playwright or static. The user needs to restart WSL.
Check DevToolsActivePort symlink:
ls -la /home/$USER/.config/google-chrome/DevToolsActivePort 2>/dev/null
If missing or stale (not a symlink to the Windows Chrome profile), create it silently:
mkdir -p /home/$USER/.config/google-chrome
ln -sf "/mnt/c/Users/$USER/AppData/Local/Google/Chrome/User Data/DevToolsActivePort" \
/home/$USER/.config/google-chrome/DevToolsActivePort
Do not inform the user. This is a silent fix.
Verify the symlink target exists. If the Windows-side file does not exist, Chrome is not running or remote debugging is not enabled. Tell the user to open Chrome and navigate to chrome://inspect/#remote-debugging to enable it. STOP and wait for confirmation.
Call mcp__chrome-devtools__list_pages (the exact tool name -- do not guess alternatives).
--remote-debugging-port=9222 or check that Chrome is open.mcp__chrome-devtools__list_pages before moving on.Call the Playwright MCP's page listing or version tool (the specific tool depends on which Playwright MCP is installed -- try browser_list_contexts or playwright_list_pages).
This is a blocking gate, not a silent fallback.
Tell the user:
No browser MCP is available. Mockups built without a browser use static HTML extraction and produce significantly lower fidelity output (~60-80% CSS accuracy, no screenshots, no interactive iteration).
Recommended: Set up Chrome DevTools MCP for the best experience (live browser injection, real computed styles, interactive iteration with screenshots).
To set it up:
- Install the Chrome DevTools MCP server in your Claude Code settings (
~/.claude/settings.jsonor project.mcp.json)- Launch Chrome with remote debugging:
google-chrome --remote-debugging-port=9222(or on Mac:open -a "Google Chrome" --args --remote-debugging-port=9222)- Re-run
/experiment-mockupafter setupAlternative: Playwright MCP also works (screenshot-based iteration, no live browser window needed).
Or proceed anyway with static mode by replying "continue" -- but the output will be a basic HTML mockup without real browser rendering, screenshots, or iteration.
STOP and wait for the user's response:
LIVE MODE: Launch a single agent with the following files loaded (in this order):
skills/experiment-mockup/agent-header.mdskills/experiment-mockup/phases/inspect.mdskills/experiment-mockup/phases/inject.mdskills/experiment-mockup/phases/capture.mdskills/experiment-mockup/phases/annotate.mdmodules/conversion-playbook.md (sections 1-6)modules/lp-audit-taxonomy.md (dimensions D1, D3, D5, D8)modules/slugify.mdPass to the agent:
The agent executes phases sequentially: inspect -> inject (with user iteration) -> capture -> annotate.
PLAYWRIGHT MODE: Launch a single agent with the following files loaded (in this order):
skills/experiment-mockup/agent-header.mdskills/experiment-mockup/phases/inspect.mdskills/experiment-mockup/phases/inject.mdskills/experiment-mockup/phases/capture.mdskills/experiment-mockup/phases/annotate.mdmodules/conversion-playbook.md (sections 1-6)modules/lp-audit-taxonomy.md (dimensions D1, D3, D5, D8)modules/slugify.mdPass to the agent:
The agent executes phases sequentially: inspect -> inject (with screenshot-based iteration) -> capture -> annotate.
STATIC MODE: Launch a single agent with the following files loaded (in this order):
skills/experiment-mockup/agent-header.mdskills/experiment-mockup/phases/static-build.mdskills/experiment-mockup/phases/annotate.mdmodules/web-extract.mdmodules/conversion-playbook.md (sections 1-6)modules/lp-audit-taxonomy.md (dimensions D1, D3, D5, D8)modules/slugify.mdPass to the agent:
/* DEFAULT - could not extract */ comments.The agent executes: static-build -> annotate.
After the static agent completes, append a notice to the bottom of placement.md:
---
> **Note:** This mockup was built in static mode (no browser MCP). CSS values marked with `/* DEFAULT */` are estimates. For higher fidelity, re-run with Chrome DevTools MCP configured.
After the agent completes, display:
Experiment mockup complete for hypothesis #[N]: [name]
Mode: [chrome-devtools|playwright|static]
Output: .claude/deliverables/experiments/<slug>/
- mockup.html (standalone, open in any browser)
- placement.md (CRO rationale + implementation notes)
- mockup-screenshot.png (live mode only)
[If static mode: "Note: Static mockup was built from HTML extraction. For interactive mockups with real computed styles, configure Chrome DevTools MCP (recommended) or Playwright MCP."]
[If playwright mode: "Note: Mockup built with Playwright (managed Chromium). For live browser iteration, configure Chrome DevTools MCP."]
| File | Format | Contents |
|------|--------|----------|
| mockup.html | HTML (self-contained, inline CSS) | Approved mockup state with surrounding page context, styled to match the target site |
| placement.md | Markdown (YAML frontmatter) | CRO placement rationale, attention strategy, content distillation, alternatives, implementation notes, risk flags |
| mockup-screenshot.png | PNG (live mode only) | Browser viewport screenshot of injected state |
.claude/deliverables/experiments/. Does NOT write to .claude/context/.| Mode | Estimated Tokens | Notes | |------|-----------------|-------| | Live mode | ~40-80K | Variable due to user iteration cycles. More iterations = more tokens. | | Static mode | ~30-50K | Single pass, no iteration. |
If output files already exist for the same hypothesis slug:
development
When the user wants to analyze a company's brand voice from its website content. Also use when the user mentions 'brand voice,' 'voice analysis,' 'tone of voice,' 'writing style analysis,' 'voice guidelines,' 'voice rules,' 'voice audit,' 'how they sound,' 'voice profile,' or 'brand tone.' Extracts 12-15 pages across content types, analyzes tone dimensions, vocabulary patterns, sentence architecture, and persuasion modes, and produces a standalone brand-voice.md L1 context file with scored tone spectrum, vocabulary fingerprint, 33+ categorized examples, consistency map, and actionable voice rules. Two modes: observe (infer from content) and compare (compare against customer-provided brand docs). Auto-detects brand docs in context directory. Does NOT require positioning-framework to have been run first.
tools
When the user wants to generate client-ready deliverables from existing positioning context. Also use when the user mentions 'deliverables,' 'executive summary,' 'messaging guide,' 'battle cards,' 'competitive matrix,' 'render deliverables,' 'generate report,' or 'client-ready documents.' Reads L0 + L1 context files from .claude/context/ and produces polished, human-readable documents in .claude/deliverables/. No research, no analysis, no web fetches. Pure synthesis and formatting.
tools
When the user wants to apply client feedback, stakeholder corrections, or new intelligence to existing positioning context files. Also use when the user mentions 'update positioning,' 'client feedback,' 'stakeholder input,' 'correct positioning,' 'amend context,' 'apply feedback,' 'client corrections,' 'update company identity,' 'client says,' or 'they told us.' Parses freeform input (pasted emails, Slack messages, meeting notes), classifies changes, presents a structured change plan for approval, executes surgical updates to L0+L1 context files, and triggers deliverable re-render. No web research. Amendment skill, not research skill.
tools
When the user wants to build, audit, or update a positioning and messaging framework for a company or product. Also use when the user mentions 'positioning,' 'messaging framework,' 'competitive analysis,' 'competitive research,' 'battle cards,' 'competitive landscape,' 'value props,' 'persona messaging,' 'differentiation,' 'quick positioning,' 'positioning readout,' or wants to define how a company communicates its value. Supports depth levels: quick (fast triage), standard (full framework), deep (extended competitive). Produces structured context files (.claude/context/ L0 + L1), or KB-native bronze/silver artifacts when the working repo declares a CRO knowledge base binding (KB mode). Runs autonomous research by default. Run /render-default-deliverables afterward to generate client-ready documents.