home-modules/shared/skills/screenshot/SKILL.md
Take a screenshot of a running web application using Playwright and Chromium. Offers to attach the screenshot as a PR comment.
npx skillsauth add mccurdyc/nixos-config screenshotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Take a screenshot of a locally running web application.
Ask if the local dev environment is already running.
http://localhost:3000).Install Playwright and Chromium to a temp directory.
npm install --prefix /tmp/pw playwright
npx --prefix /tmp/pw playwright install chromium
Take the screenshot with a Node.js script using the Playwright API.
Write a script (e.g., /tmp/pw/screenshot.mjs):
import { chromium } from '/tmp/pw/node_modules/playwright/index.mjs';
const url = process.argv[2] || 'http://localhost:3000';
const outputPath = process.argv[3] || 'screenshot.png';
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1600, height: 900 } });
await page.goto(url, { waitUntil: 'networkidle' });
await page.waitForTimeout(8000); // extra wait for JS-heavy apps (dashboards, SPAs)
await page.screenshot({ path: outputPath, fullPage: true });
await browser.close();
Run it:
node /tmp/pw/screenshot.mjs "<URL>" screenshot.png
Adjust wait time and viewport as needed:
waitForTimeout to 2000–3000ms.width/height.page.locator('selector').screenshot()
instead of full-page.Show the screenshot to the user using the read tool on the resulting PNG file so they can verify it.
Ask if the user wants the screenshot added as a comment on the current pull request.
gh pr view --json number -q .number
git add screenshot.png
git commit --no-gpg-sign -m "docs: add screenshot"
git push
gh pr comment <number> --body "## Screenshot\n\n"
waitUntil: 'networkidle' plus an additional timeout for
apps that render asynchronously after initial load./tmp/pw to avoid polluting the project directory.development
Goal-driven execution. Breaks a task into phases with verification, parallelizes via subagents, and iterates until the outcome is achieved. Triggers: 'go-do', 'goal-driven', 'achieve this', 'make it so'.
tools
Do work in an isolated git worktree instead of switching branches. Use when creating a branch and opening a PR so the user's working directory is never disturbed. Triggers: 'create a branch', 'open a PR', 'make a change on a new branch'.
development
Search the web, fetch web page content, or search GitHub issues/PRs/repos. Use when you need current information not available locally.
tools
Start an interactive questionnaire when there are more than 5 options or bullet points that need to be addressed. Uses the ask_user tool to walk through selections interactively instead of dumping a wall of text.