Capture and reconstruct website UI and scroll animations through systematic observation.
- Workflow over code - The process matters more than hardcoded scripts
- Observe, don't extract - Watch what changes, infer the cause
- Adapt, don't fail - When standard approaches don't work, try alternatives
- External vision - Use Gemini for screenshot analysis when needed
website-replicator/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── skills/
│ ├── start-mcp/ # MCP server startup helper
│ └── website-replicator/
│ └── SKILL.md # Core workflow logic (300+ lines)
├── scripts/
│ └── gemini_analyzer.py # Automated Gemini API integration
├── docs/
│ └── gemini-integration.md # Gemini integration guide
├── commands/
│ └── replicate.md # Entry point command
├── .gitignore
├── .skillforge-meta
├── CLAUDE.md # Project instructions for Claude Code
└── README.md
- Chrome DevTools MCP - Required for browser automation
- Google Gemini API - For automated screenshot analysis
- Python 3.x with
google-genaipackage
# 1. Install Python dependencies
pip install google-genai
# 2. Set Gemini API key
export GEMINI_API_KEY="your-api-key-here"
# 3. Install the plugin
# (Instructions depend on your marketplace setup)/replicate https://example.com
The workflow is fully automated:
- Load page and capture overview screenshot
- AUTOMATED: Gemini API analyzes layout and likely animated elements
- Analyze DOM and build watch list
- Capture scroll animation data
- AUTOMATED: Gemini API extracts design tokens
- Generate replication code
- OPTIONAL: Gemini API verifies output vs original
No manual copy-paste required - all Gemini analysis happens automatically via scripts/gemini_analyzer.py.
- Navigate to URL, wait for network idle
- Take full-page screenshot
- AUTOMATED: Gemini analyzes layout, design patterns, likely animated elements
- Try multiple strategies to find animated elements:
- Class/attribute heuristics (animate, fade, slide, aos, gsap, etc.)
- Transform/opacity detection
- Structural analysis (sections, cards, features)
- AUTOMATED: Visual comparison via Gemini (compare scroll positions)
- Manual specification (ask user)
- Inject monitoring script for watched elements
- Slow scroll through page, sampling properties
- Record transform, opacity, position changes
- Extract computed styles for key elements
- AUTOMATED: Gemini extracts design tokens (colors, typography, spacing)
- Test responsive behavior at multiple viewports
- List network requests for images, fonts, icons
- Extract inline SVGs
- Note external dependencies
- Analyze animation data to infer triggers and easing
- OPTIONAL: Gemini generates component hierarchy
- Generate code in preferred format (GSAP, CSS scroll-driven, Framer Motion, etc.)
- OPTIONAL: Gemini verifies output vs original
The brain of the operation. Contains:
- 6-phase workflow with detailed steps
- Decision points and fallback strategies
- Tool usage patterns and JavaScript snippets
- Adaptability guidelines for when automation fails
Automated Gemini API integration:
- 5 analysis functions (overview, compare, components, tokens, verify)
- Automatic retry logic with exponential backoff
- JSON response parsing with fallback handling
- CLI interface for testing
Comprehensive integration guide:
- Usage examples for each analysis function
- Workflow integration patterns
- Optimization tips and cost considerations
- Error handling strategies
Entry point command with options:
--quick- Skip responsive captures--animations-only- Focus only on scroll animations--static-only- Skip animation detection
The workflow is designed to adapt when automation fails:
- If heuristics fail → try structural analysis
- If structural fails → try visual comparison via Gemini
- If script injection blocked → use manual sampling
- If all automated approaches fail → ask user for hints
- Partial success is acceptable - capture what you can
- Chrome DevTools MCP - Browser automation and screenshot capture
- Google Gemini API - Automated screenshot analysis (requires API key)
- Python 3.x - For Gemini integration script
- google-genai package - Python SDK for Gemini API
navigate_page - Load target URL
wait_for - Allow page/animations to settle
take_screenshot - Visual capture for analysis
take_snapshot - Accessibility tree for structure
evaluate_script - DOM inspection and monitoring
resize_page - Responsive testing
list_network_requests - Find CSS/assets
./website-replication-{timestamp}/
├── capture/
│ ├── overview.png
│ └── responsive-*.png
├── data/
│ ├── animation-data.json
│ └── styles.json
└── generated/
└── [components, styles, animations]