Skip to content

feat: add Playwright UI browser skill for Claude Code#4579

Open
robertsLando wants to merge 3 commits intomasterfrom
feat/playwright-screenshot-tooling
Open

feat: add Playwright UI browser skill for Claude Code#4579
robertsLando wants to merge 3 commits intomasterfrom
feat/playwright-screenshot-tooling

Conversation

@robertsLando
Copy link
Member

@robertsLando robertsLando commented Mar 5, 2026

Summary

  • Add .mcp.json with Playwright MCP server for interactive headless browser control
  • Add .claude/skills/ui-browser/skill.md — comprehensive guide for Claude to browse, inspect, and verify the UI:
    • Full route reference and app layout structure
    • Auth flow with exact form selectors
    • Interactive browsing patterns (navigate, click, fill, inspect, screenshot)
    • Common verification workflows (component edits, layout changes, dialogs, dark mode)
    • Troubleshooting guide
  • Add .claude/skills/ui-browser/screenshot-template.js — batch screenshot script with CLI args for URL, output path, viewport size, auto auth handling, and dark mode

This gives Claude Code the ability to independently verify UI changes after editing components, debug layout issues interactively, and capture screenshots for PRs and documentation.

Test plan

  • Start dev servers (npm run fake-stick, npm run dev:server, npm run dev)
  • Run node .claude/skills/ui-browser/screenshot-template.js "http://localhost:8092/#/settings" /tmp/screenshots/settings.png
  • Verify PNG is generated at 1280x720
  • Restart Claude Code and verify Playwright MCP tools are available
  • Use Playwright MCP to interactively navigate to a page and take a snapshot

🤖 Generated with Claude Code

robertsLando and others added 2 commits March 5, 2026 18:10
Add browser screenshot automation so Claude Code can visually verify UI
changes, attach screenshots to PRs, and update documentation images.

- Add Playwright MCP server config (.mcp.json) for interactive browser control
- Add screenshot skill with reusable template script
- Supports dark mode, auth handling, configurable viewport
- Includes route-to-screenshot mapping for documentation updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename .claude/skills/screenshot/ to .claude/skills/ui-browser/ and rewrite
skill.md as a comprehensive UI browsing guide. Now covers:

- Interactive browsing via Playwright MCP (navigation, inspection, interaction)
- Full route reference with descriptions
- App layout structure (nav drawer, app bar, content area)
- Auth flow details with exact selectors
- Common verification patterns (component edits, layout changes, dialogs)
- Batch screenshot template (kept as sub-tool)
- Troubleshooting guide

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@robertsLando robertsLando changed the title feat: add Playwright screenshot tooling for Claude Code feat: add Playwright UI browser skill for Claude Code Mar 5, 2026
- Rename skill.md to SKILL.md (required uppercase convention)
- Add YAML frontmatter with name, description (third-person trigger
  phrases), and version fields
- Rewrite body in imperative form instead of second person
- Move route-to-doc mapping and troubleshooting to references/screenshots.md
  for progressive disclosure (keep SKILL.md lean, load details as needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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