design-research

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

16 stars

Best use case

design-research is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using design-research should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/design-research/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/design/design-research/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/design-research/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How design-research Compares

Feature / Agentdesign-researchStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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:
```bash
# 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

### 2. Screenshot Capture Strategy

Use Playwright CLI to capture multiple views:

```bash
# Full page screenshot
npx playwright screenshot --full-page <URL> full-page.png

# Viewport screenshot (above the fold)
npx playwright screenshot <URL> viewport.png

# Mobile viewport
npx playwright screenshot --viewport-size=375,667 <URL> mobile.png

# Tablet viewport
npx playwright screenshot --viewport-size=768,1024 <URL> tablet.png

# Dark mode (if supported)
npx playwright screenshot --color-scheme=dark <URL> dark-mode.png
```

Save all screenshots to a `design-research-output/` directory.

### 2.5. Bot Protection Handling (Automatic)

The skill automatically detects and handles bot protection using a feedback loop:

**Detection:**
- Screenshot file size < 50KB
- HTML content contains "Cloudflare", "checking your browser", "captcha"
- Page redirects to `/cdn-cgi/challenge-platform/*`

**Automatic Retry Strategy:**

1. **Standard Playwright** (default, fast)
   - No stealth overhead
   - Works for most public sites
   - If blocked, automatically tries strategy 2

2. **Camoufox Stealth Mode** (if blocked)
   - Firefox-based anti-detect browser (0% detection score normally)
   - 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

3. **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:

```bash
# 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:

```bash
# 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
- **Shadows & effects**: Box shadows, border radius, transitions, animations
- **Layout patterns**: Flexbox, Grid, positioning strategies

### 5. Component Inventory

Identify reusable components:
- Navigation (header, sidebar, mobile menu)
- Buttons (primary, secondary, ghost, icon buttons)
- Forms (inputs, selects, checkboxes, validation states)
- Cards (content cards, product cards, feature cards)
- Modals/Dialogs
- Alerts/Notifications
- Loading states
- Icons (icon system/library used)

For each component, note:
- Visual appearance (from screenshots)
- HTML structure
- CSS patterns
- Interactive states (hover, active, focus, disabled)

### 6. Design System Detection

Check for design system indicators:
- CSS custom properties (CSS variables): `--color-primary`, `--spacing-md`
- Utility class patterns: Tailwind, UnoCSS, custom utilities
- Component library: Material UI, Chakra UI, Ant Design, shadcn/ui, etc.
- CSS framework: Bootstrap, Bulma, Foundation
- CSS-in-JS: Styled Components, Emotion, vanilla-extract

```bash
# Check for CSS custom properties
npx playwright evaluate <URL> --expression "
  Array.from(document.styleSheets)
    .flatMap(sheet => Array.from(sheet.cssRules))
    .filter(rule => rule.cssText.includes('--'))
    .map(rule => rule.cssText)
    .slice(0, 20)
"
```

### 7. Technology Stack Detection

Identify frontend technologies:

```bash
# Check for framework signatures
npx playwright evaluate <URL> --expression "
  ({
    react: !!document.querySelector('[data-reactroot], #root'),
    vue: !!window.Vue,
    angular: !!window.ng,
    svelte: !!document.querySelector('[data-svelte]'),
    nextjs: !!window.__NEXT_DATA__,
    gatsby: !!window.___gatsby,
    astro: !!document.querySelector('[data-astro-cid]')
  })
"
```

### 8. Performance & Optimization Notes

Observe:
- Image formats (WebP, AVIF, responsive images)
- Font loading strategies (FOUT, FOIT, preload)
- Code splitting / lazy loading patterns
- CSS delivery (critical CSS, async loading)

### 9. Generate Research Report

Create a markdown report (`design-research-report.md`) with:

```markdown
# Design Research Report: [Site Name]

**URL:** <target-url>
**Date:** <current-date>
**Purpose:** [Briefly state what the engineer wants to implement]

## Visual Overview

[Reference screenshots with brief descriptions]
- Full page: `full-page.png`
- Viewport: `viewport.png`
- Mobile: `mobile.png`
- Dark mode: `dark-mode.png` (if applicable)

## Design System

### Color Palette
- Primary: #XXXXXX
- Secondary: #XXXXXX
- Accent: #XXXXXX
- Neutral: #XXXXXX (shades: 50, 100, 200, ..., 900)
- Success/Error/Warning/Info states

### Typography
- Headings: [Font family, sizes, weights]
  - H1: ...
  - H2: ...
- Body: [Font family, size, line-height, weight]
- Code: [Monospace font]
- Font loading: [Strategy used]

### Spacing System
- Base unit: Xpx
- Scale: [e.g., 4, 8, 16, 24, 32, 48, 64]
- Grid: [If using grid system]

### Components
[For each major component:]
- **Component Name**
  - Visual: [Screenshot reference or description]
  - HTML structure: [Simplified markup]
  - Key styles: [Important CSS patterns]
  - States: [hover, active, disabled, etc.]
  - Accessibility: [ARIA attributes, keyboard navigation]

## Layout Patterns

- Page layout: [Flexbox/Grid/Float/etc.]
- Container widths: [max-width values, breakpoints]
- Responsive strategy: [Mobile-first, desktop-first, fluid]
- Breakpoints:
  - Mobile: Xpx
  - Tablet: Xpx
  - Desktop: Xpx
  - Wide: Xpx

## Technology Stack

- Framework: [React/Vue/Svelte/etc.]
- Meta-framework: [Next.js/Nuxt/SvelteKit/etc.]
- Component library: [Material UI/shadcn/etc.]
- CSS approach: [Tailwind/CSS Modules/Styled Components/etc.]
- Animation library: [Framer Motion/GSAP/etc.]
- Icons: [Heroicons/Lucide/Font Awesome/etc.]

## Implementation Recommendations

### Quick Start
[Recommended tools and libraries to replicate the design]

### Key Patterns to Replicate
1. [Pattern 1]: [Implementation approach]
2. [Pattern 2]: [Implementation approach]
3. [Pattern 3]: [Implementation approach]

### Suggested Component Structure
```
/components
  /ui
    Button.tsx
    Card.tsx
    Input.tsx
    ...
  /layout
    Header.tsx
    Footer.tsx
    Navigation.tsx
  /features
    ...
```

### Design Tokens (if applicable)
```css
/* colors.css */
:root {
  --color-primary: #XXXXXX;
  ...
}

/* spacing.css */
:root {
  --spacing-xs: 4px;
  ...
}
```

## Additional Notes

[Any unique patterns, gotchas, or interesting implementation details]

## Next Steps

1. Set up project with recommended stack
2. Implement design tokens/theme configuration
3. Build core UI components
4. Implement layout structure
5. Apply responsive patterns
6. Add interactions and animations
7. 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

Related Skills

game-design

16
from diegosouzapw/awesome-omni-skill

Game design principles. GDD structure, balancing, player psychology, progression.

frontend-design

16
from diegosouzapw/awesome-omni-skill

Create distinctive, bold UI designs that avoid generic AI aesthetics. This skill should be used when users want frontend components with strong visual identity, creative typography, intentional color palettes, and production-grade animations - specifically to avoid the bland, safe, homogeneous "AI slop" that plagues most generated interfaces.

figma-design

16
from diegosouzapw/awesome-omni-skill

Access Figma designs, extract design systems, and retrieve component specifications. Use when implementing UI from Figma mockups, extracting design tokens, or analyzing design files.

faion-ui-designer

16
from diegosouzapw/awesome-omni-skill

UI design: wireframes, prototypes, design systems, visual design.

event-store-design

16
from diegosouzapw/awesome-omni-skill

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

detect-design

16
from diegosouzapw/awesome-omni-skill

Design system detection with drift findings and evidence blocks. Use when auditing design system consistency.

design_responsive

16
from diegosouzapw/awesome-omni-skill

Breakpoints, fluid typography, container queries ve modern CSS features.

design

16
from diegosouzapw/awesome-omni-skill

Design consistency and visual styling for the Svelte client UI. Use when creating or modifying visual elements, colors, typography, buttons, inputs, or cards.

Design Undo/Redo Systems

16
from diegosouzapw/awesome-omni-skill

CREATE comprehensive undo/redo systems with Command Pattern. Design state management for complex applications with canvas interactions, multiple stores, and user actions. Use when building new undo/redo functionality from scratch.

design-system

16
from diegosouzapw/awesome-omni-skill

design system with Tailwind v4.0, accessibility patterns, and project-specific UI/UX rules. Use for all KKOOKK frontend development.

design-system-starter

16
from diegosouzapw/awesome-omni-skill

Create and evolve design systems with design tokens, component architecture, accessibility guidelines, and documentation templates. Ensures consistent, scalable, and accessible UI across products.

design-system-guard

16
from diegosouzapw/awesome-omni-skill

Validate UI screens against Lucid Labs design system rules. Use after implementing UI components to verify adherence to brand colors, typography, layout patterns, and service board logic.