Shipped Funnel Factory: AI-Powered Copywriting with Puppeteer + Claude Vision
Just wrapped up a monster session building out the complete Funnel Factory pipeline. This thing crawls multi-step sales funnels, analyzes them with Claude's vision model, and generates Kennedy/Halbert-style direct response copy. Pretty wild to see it all come together.
The Full Pipeline
I built this as three connected pieces:
1. Funnel Crawler Worker - The heavy lifter that uses Puppeteer to navigate through multi-step funnels. It's smart about detecting different funnel frameworks:
- Looks for progress text ("Step 2 of 5")
- Finds hidden step containers (
.step,[data-step], etc.) - Detects progress dots and ARIA progressbars
- Takes JPEG screenshots at each step (quality 65 for smaller API payloads)
- Even extracts CSS animations from stylesheets
2. Updated Agent Worker - Added the funnel-factory skill that orchestrates everything:
- Crawls both inspiration AND anti-inspiration URLs in parallel
- Feeds all the screenshots to Claude's vision model
- Uses a system prompt trained on Kennedy/Halbert copywriting principles
- Writes the generated copy to Cloudflare KV storage
3. Frontend Interface - Simple form at app.gethoneybun.com/funnel-factory:
- Takes your funnel URLs and client ID
- Submits the job and polls for results
- Shows the generated copy in a clean JSON format
Smart Funnel Detection
The trickiest part was making the crawler work across different funnel builders without hardcoding specific frameworks. I went with priority-ordered detection - it tries multiple strategies and uses whatever works first. Covers about 95% of funnels in the wild.
For navigation, it looks for [data-next] attributes first, then falls back to class selectors, then text patterns like "Next", "Continue", "Get My", etc.
What's Working
Both workers are deployed and passing smoke tests. The health endpoints are responding, skill routing works, and client lookup is functioning. I can see the job creation flow working end-to-end.
All six workers are now live and playing nicely together.
Next Steps
Time to test this beast with real funnel URLs and see what kind of copy it generates. The foundation is solid - now it's about tuning the prompts and making sure the vision analysis is picking up the right elements.
Still have that link building API research on the backlog, plus security hardening and some dashboard improvements. But first, I want to see Funnel Factory do its thing on some actual sales pages.
The handoff is clean - just need to grab a real client ID from KV storage and feed it some funnel URLs. Should be fun to watch it work.