Research website design, styling, and frontend implementation using Playwright CLI to capture screenshots and analyze structure. Use when a software engineer wants to understand and implement a similar design. Keywords: design research, website design, frontend analysis, UI study, design system, screenshot, Playwright
Research website design, styling, and frontend implementation using Playwright CLI to capture screenshots and analyze structure. Use when a software engineer wants to understand and implement a similar design. Keywords: design research, website design, frontend analysis, UI study, design system, screenshot, Playwright
Design Research
Research and analyze website design, styling, and frontend implementation to help engineers understand and replicate design patterns.
Overview
This skill uses Playwright CLI to systematically capture screenshots, inspect HTML structure, analyze CSS styling, and document design systems. It produces a comprehensive report covering layout, typography, colors, spacing, components, and implementation recommendations.
Prerequisites
Playwright CLI must be available. If not installed:
# Check if available
npx playwright --version
# Install if needed (user should approve)
npm install -D playwright
npx playwright install chromium
Instructions
When this skill is activated, follow this research workflow:
1. Validate Target URL
Confirm the URL with the user if not provided
Check if the site is publicly accessible
Note: This skill works best with public websites; authentication flows require additional setup
Automatically installed via UV: uv run capture-stealth.py
Adds human-like behavior and realistic fingerprints
Modifies browser at C++ level (not patchable JS)
Success rate: ~70% against moderate Cloudflare protection
Manual Fallback (if stealth fails)
Provides clear instructions for manual browser capture
Includes DevTools extraction scripts (CSS, colors, typography)
Documents manual screenshot workflow
See MANUAL-FALLBACK.md for complete instructions
User Communication:
Clearly indicate which strategy is being used
Show progress and retry attempts
Provide actionable manual instructions if automated methods fail
Never silently fail - always explain what happened and why
Note: The capture script uses UV-based Python scripts with inline dependencies (no package.json needed). UV must be available (already in dotfiles Nix flake).
3. HTML Structure Analysis
Use Playwright to extract and analyze structure:
# Get full HTML
npx playwright open <URL> --save-trace=trace.zip
# Or use WebFetch to get HTML content
Analyze:
Semantic HTML usage (header, nav, main, article, section, footer)
Component hierarchy and nesting patterns
Class naming conventions (BEM, utility-first, CSS modules, etc.)
Data attributes and JavaScript hooks
Accessibility landmarks and ARIA attributes
4. CSS & Styling Analysis
Examine styling patterns:
# Extract stylesheets
npx playwright evaluate <URL> --expression "Array.from(document.styleSheets).map(s => s.href)"# Get computed styles for key elements
npx playwright evaluate <URL> --expression "
const nav = document.querySelector('nav');
window.getComputedStyle(nav);
"
Document:
Color palette: Primary, secondary, accent, neutral colors
Typography: Font families, sizes, weights, line heights, letter spacing
Spacing system: Margins, padding, gaps (check for consistent scale like 4px/8px grid)
Breakpoints: Media query values for responsive design
[Any unique patterns, gotchas, or interesting implementation details]
Next Steps
Set up project with recommended stack
Implement design tokens/theme configuration
Build core UI components
Implement layout structure
Apply responsive patterns
Add interactions and animations
Optimize for performance
Screenshots and detailed analysis available in:design-research-output/
## Output
The skill produces:
1. **`design-research-output/`** directory containing:
- `full-page.png` - Full page screenshot
- `viewport.png` - Above-the-fold screenshot
- `mobile.png` - Mobile viewport screenshot
- `tablet.png` - Tablet viewport screenshot
- `dark-mode.png` - Dark mode screenshot (if applicable)
- Any additional screenshots captured
2. **`design-research-report.md`** - Comprehensive markdown report covering:
- Visual overview with screenshot references
- Design system documentation (colors, typography, spacing)
- Component inventory with implementation details
- Layout patterns and responsive strategies
- Technology stack detection
- Implementation recommendations
3. **Summary to user** - Brief overview of findings with actionable next steps
## Tips
- For complex sites, focus on the specific page/section the user wants to replicate
- If a design system is detected, prioritize documenting the system over individual components
- Include code snippets for unique patterns worth replicating
- Cross-reference similar open-source component libraries that match the style
- Note any accessibility patterns worth adopting
- If authentication is required, guide the user to use Playwright's interactive mode
## Error Handling
- If Playwright is not installed, prompt user to install it
- If site requires authentication, note it in the report and suggest manual exploration
- If screenshots fail, continue with HTML/CSS analysis and note the limitation
- For rate-limited or blocked sites, use WebFetch as fallback for HTML analysis