code/capture-screens/SKILL.md
Automatically navigates a web app using Playwright MCP and captures context-aware named screenshots at each product feature state. Names each file semantically based on context (e.g., checkout-payment-form-filled.png). Outputs a manifest.json mapping filenames to descriptions and a summary report. Use when documenting product features, generating demo screenshots, building user guides, or creating visual test assets for any web application. Composable primitive — other skills (user-guide, demo-docs) consume its manifest.json output.
npx skillsauth add mostafa-drz/claude-skills capture-screensInstall 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.
On startup, use Read to load ~/.claude/skills/capture-screens/preferences.md. If missing, use defaults below.
Defaults:
url: http://localhost:3000output: screenshotsviewport: 1440x900highlight: truehighlight-color: #FF4B4Bwait-ms: 800On startup, use Bash to detect the current working directory. Use this for default output path resolution.
Check $ARGUMENTS:
help → show help, stopconfig → run config flow, stopreset → delete preferences file, confirm, stopcapture-screens — Automated contextual screenshot capture via Playwright
Usage:
/capture-screens [context] Interactive — prompts for missing inputs
/capture-screens [context] --url <url> App URL to capture
/capture-screens [context] --features <f1,f2,...> Comma-separated routes or feature names
/capture-screens [context] --output <dir> Output directory (default: screenshots/)
/capture-screens [context] --no-highlight Skip CSS highlight injection
/capture-screens [context] --viewport <WxH> Viewport size (default: 1440x900)
/capture-screens [context] --auth <instructions> How to authenticate, e.g. "login as [email protected] / pass123"
/capture-screens [context] --inject-js <file> Path to a JS file to evaluate before capturing (e.g. to seed state)
/capture-screens config Set persistent preferences
/capture-screens reset Clear preferences
/capture-screens help This help
Context argument:
Free-text description of what you're capturing. Used to generate semantic
filenames and manifest descriptions. Example:
"Checkout flow — cart summary, shipping form, payment step, confirmation"
Examples:
/capture-screens "Settings page — profile tab, notifications, billing"
/capture-screens "Onboarding flow" --url https://staging.myapp.com --auth "skip login, go to /onboarding"
/capture-screens "Admin dashboard" --url http://localhost:3000 --no-highlight --output docs/screenshots
/capture-screens "Product tour" --inject-js seed-demo-state.js
Output:
{output}/ ← semantically-named PNGs
{output}/manifest.json ← filename → description map (for downstream skills)
{output}/capture-report.md ← human-readable summary with descriptions
Current preferences:
(shown from preferences.md)
Use AskUserQuestion to collect:
http://localhost:3000)screenshots)1440x900)#FF4B4B)800)Save to ~/.claude/skills/capture-screens/preferences.md.
Delete ~/.claude/skills/capture-screens/preferences.md and confirm: "Preferences cleared. Using defaults."
If no preferences file exists, show:
First time using /capture-screens? Run
/capture-screens configto set your defaults, or continue — sensible defaults will be used.
Then proceed.
Parse $ARGUMENTS for:
--flag--url <url> — app URL (fallback: preferences → http://localhost:3000)--features <list> — comma-separated routes or feature names--output <dir> — output directory (fallback: preferences → screenshots)--no-highlight — skip CSS highlight injection--viewport <WxH> — e.g., 1440x900--auth <instructions> — how to authenticate (e.g., "login as [email protected] / password")--inject-js <file> — path to a JS file to evaluate before capturing (for any custom state setup: localStorage, cookies, mocked APIs, etc.)If context description is missing, ask:
What are you capturing? Describe the product area and key states to document. Example: "Checkout flow — cart, shipping, payment, confirmation page"
If features are missing, derive a capture plan from the context description. Ask to confirm:
Based on your description, I'll capture: [list of routes/states]. Anything to add or remove?
Create the output directory:
mkdir -p {output}
--url via browser_navigatebrowser_resize to {viewport}browser_snapshot to verify the page loadedAuthentication — if the page requires login:
--auth was provided, follow those instructions using browser_type and browser_clickIf --inject-js <file> was provided:
browser_evaluatebrowser_navigate to let the app pick up any injected stateThis is the escape hatch for any app-specific state seeding — localStorage, sessionStorage, cookies, API mocking, feature flags, etc. The skill itself has no opinion about what the JS does.
Inject once into the page via browser_evaluate:
const style = document.createElement('style');
style.id = '__capture-highlight-style';
style.textContent = `
[data-capture-highlight] {
outline: 3px solid {highlight-color} !important;
outline-offset: 3px !important;
border-radius: 4px !important;
box-shadow: 0 0 0 6px {highlight-color}22 !important;
}
`;
document.head.appendChild(style);
window.__captureHighlight = (selector) => {
document.querySelectorAll('[data-capture-highlight]')
.forEach(el => el.removeAttribute('data-capture-highlight'));
const el = selector ? document.querySelector(selector) : null;
if (el) {
el.setAttribute('data-capture-highlight', '');
el.scrollIntoView({ block: 'center', behavior: 'instant' });
}
};
window.__captureClearHighlight = () => {
document.querySelectorAll('[data-capture-highlight]')
.forEach(el => el.removeAttribute('data-capture-highlight'));
};
For each item in the capture plan:
browser_navigate (or browser_click for tabs/buttons within the same page)browser_wait_for — target a meaningful selector (main content area, data table, heading) or fall back to {wait-ms} msbrowser_snapshot to understand the current page structurebrowser_evaluate: window.__captureHighlight('{selector}')browser_take_screenshot{output}/{filename}.png{ filename, description, route, timestamp }browser_evaluate: window.__captureClearHighlight()Within-page states (tabs, modals, dropdowns, hover states):
browser_click to open the state, screenshot, then restore to neutral state before moving onOn failure: log the error and skip — never abort the full session for one bad step.
{output}/manifest.json:
{
"capturedAt": "{ISO timestamp}",
"url": "{app url}",
"viewport": "{WxH}",
"context": "{context description}",
"screenshots": [
{
"filename": "settings-profile-tab-overview.png",
"description": "Settings page — Profile tab showing name, avatar, and account details",
"route": "/settings/profile",
"selector": ".profile-form"
}
]
}
{output}/capture-report.md:
# Screenshot Capture Report
**Context:** {context description}
**URL:** {url}
**Captured:** {timestamp}
**Count:** {N} screenshots → `{output}/`
## Screenshots
### {Feature Area}
**File:** `{filename}.png`
**Route:** `{route}`
**Description:** {description}
---
Captured {N} screenshots → {output}/
✓ {filename1}.png — {description}
✓ {filename2}.png — ...
Manifest: {output}/manifest.json
Report: {output}/capture-report.md
List any skipped steps and their errors at the end.
{feature}-{sub-feature}-{state}.png (2-3 levels, kebab-case)checkout-payment-form-filled.png not checkout-3.png-open, -empty, -active, -selected, -error when the UI state matters-2.pngbrowser_snapshot first to understand page structure before deciding what to highlight and capture--inject-js is the escape hatch — any app-specific state setup (localStorage, cookies, API mocks) belongs in an external JS file the user provides; the skill doesn't know or care what it doesdevelopment
--- name: triage-board description: >- Generates a structured triage artifact from the current conversation's findings — a self-contained Desktop folder with a JSON Schema, schema-conformant report.json, prose markdown, and a single-file HTML viewer. Viewer ships with MD / CSV / JSON download buttons in the header and a per-finding "Copy as Markdown" action that produces a GitHub/Linear/Notion-ready ticket block. Stateless — triage state lives in the user's ticket system, not in the
development
Runs a beginner-mind end-to-end UI audit of any running app — local dev server, staging, production, or a specific URL. Drives Chrome through every interactive element on the target surface, collects structured findings (severity, category, where, symptom, impact, repro, triage), and hands the result off to `/triage-board` which produces the Desktop folder (schema + JSON + Markdown + single-file HTML viewer with MD/CSV/JSON exports and a per-finding Copy as Markdown button). Use when you want fresh-eyes verification of a feature, page, modal, flow, branch, or whole app — before shipping, before review, before a demo, or any time the UI deserves a careful poke.
development
Reviews the user's past Claude Code conversations from a wellbeing perspective — sentiment, tone, emotional arc, recurring patterns — and generates a supportive, science-grounded report in both Markdown and HTML. Default lookback is 48 hours across all projects. Uses recognised emotion frameworks (Plutchik, Ekman, Russell's circumplex, Pennebaker linguistic markers) and cites the science behind every observation. Learns the user's baseline tone over time so future reports flag genuine shifts, not noise. Use when the user asks for an emotional/wellbeing recap, mood check, sentiment review, or wants to understand their own ups and downs across recent work sessions.
development
--- name: workflow-advisor description: >- Analyzes recent Claude Code conversations and local Claude state (skills, settings, memory files, CLAUDE.md), researches the latest Claude Code features and best practices online, and suggests one workflow improvement at a time with reasoning and a concrete action item. Can save accepted suggestions to memory for tracking. Use when you want to discover underused Claude Code features, improve your development workflow, stay current with the lat