Skip to content

Add generate-screenshot skill#502

Open
SingHar wants to merge 1 commit intoanthropics:mainfrom
SingHar:add-generate-screenshot-skill
Open

Add generate-screenshot skill#502
SingHar wants to merge 1 commit intoanthropics:mainfrom
SingHar:add-generate-screenshot-skill

Conversation

@SingHar
Copy link

@SingHar SingHar commented Mar 3, 2026

Summary

Adds a new generate-screenshot skill that captures web app screenshots across multiple viewports and colour modes using Playwright.

  • Auto-detects running dev servers on common ports (3000, 5173, 8080, etc.)
  • Multi-viewport — Desktop (1920x1080), Tablet (768x1024), Mobile (375x812)
  • Dark & Light mode — Captures both prefers-color-scheme variants
  • Route scanning — Auto-discovers routes from Next.js, Nuxt, SvelteKit, Remix, React Router, Vue Router, and Angular
  • Authenticated pages — Logs in first, then captures protected routes
  • Configurable — Override viewports, colour modes, output directory, and base URL

Files

skills/generate-screenshot/
├── SKILL.md                              # Skill definition and workflow
├── run.js                                # Universal Playwright script runner
├── lib/helpers.js                        # Dev server detection, viewport configs, utilities
├── package.json                          # Dependencies (playwright)
├── LICENSE.txt                           # MIT
└── examples/
    ├── basic_single_page.js              # All viewports + modes for home page
    ├── multi_route.js                    # Multiple routes with env var config
    ├── single_viewport.js                # One viewport + one mode
    ├── authenticated_pages.js            # Login-then-capture for protected routes
    └── OUTPUT.md                         # Example output trees and naming convention

Usage

/generate-screenshot                                          # Auto-detect server & routes
/generate-screenshot /login /dashboard /settings              # Specific routes
/generate-screenshot / --viewports desktop --modes dark       # Desktop dark mode only
/generate-screenshot / --url http://localhost:4000             # Explicit URL

Source repository

https://github.com/Akaal-Creatives/generate-screenshot

Licence

MIT

Playwright-based skill that captures web app screenshots across
desktop, tablet, and mobile viewports in both light and dark mode.

Features:
- Auto-detects running dev servers on common ports
- Scans framework routes (Next.js, Nuxt, SvelteKit, Remix, etc.)
- Supports authenticated page capture
- Configurable viewports, colour modes, and output directory
- Includes 4 example scripts and output reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant