| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename `playwright-skill/` → `playwright-js/` and add `playwright-py/`
as a verbatim fork of Anthropic's official `webapp-testing` skill
(Apache-2.0). Cross-pollinate: each skill gains patterns and helpers
inspired by the other's strengths, with upstream semantics preserved.
## playwright-js (JS/TS stack)
Renamed from playwright-skill; upstream lackeyjb MIT content untouched.
New sections added (clearly marked, preserving upstream semantics):
- Static HTML vs Dynamic Webapp decision tree (core Anthropic methodology)
- Reconnaissance-Then-Action pattern (navigate → networkidle → inspect → act)
- Console Log Capture snippet (page.on console/pageerror/requestfailed)
Description updated to clarify JS/TS stack fit (React/Next/Vue/Svelte/Node)
and reference `/playwright-py` as the Python sibling.
## playwright-py (Python stack)
Verbatim fork of anthropics/skills/skills/webapp-testing; upstream SKILL.md
and bundled `scripts/with_server.py` + examples kept intact. New scripts
and examples added (all lackeyjb-style conveniences in Python):
Scripts:
scripts/detect_dev_servers.py Probe common localhost ports for HTTP
servers; outputs JSON of found services.
scripts/safe_actions.py safe_click, safe_type (retry-wrapped),
handle_cookie_banner (common selectors),
build_context_with_headers (env-var-
driven: PW_HEADER_NAME / PW_HEADER_VALUE /
PW_EXTRA_HEADERS='{…json…}').
Examples:
examples/login_flow.py Login form + wait_for_url.
examples/broken_links.py Scan visible external hrefs via HEAD.
examples/responsive_sweep.py Multi-viewport screenshots to /tmp.
SKILL.md gains 5 "Added:" sections documenting the new scripts, retry
helpers, env-header injection, and /tmp script discipline. Attribution
notes explicitly mark upstream vs local additions.
## Makefile
SKILLS: playwright-skill → playwright-js + playwright-py
deps target: extended Playwright step to install Python package +
Chromium via `python3 -m pip install --user playwright && python3 -m
playwright install chromium` when playwright-py/ is present. Idempotent
(detected via `python3 -c "import playwright"`).
## Usage
Both skills symlinked globally via `make install`. Invoke whichever
matches the project stack — cross-references in descriptions route you
to the right one. Run `make deps` once to install both runtimes.
|
|
|
Browser automation + UI testing skill forked verbatim from
github.com/lackeyjb/playwright-skill (MIT, 2458 stars, active through
Dec 2025). LICENSE preserved in skill dir with attribution footer added
to SKILL.md.
Bundle contents (from upstream):
playwright-skill/SKILL.md
playwright-skill/API_REFERENCE.md
playwright-skill/run.js (universal executor with module resolution)
playwright-skill/package.json
playwright-skill/lib/helpers.js (detectDevServers, safeClick, safeType,
takeScreenshot, handleCookieBanner,
extractTableData, createContext with
env-driven header injection)
playwright-skill/LICENSE (MIT, lackeyjb)
Makefile updates:
- SKILLS extended with playwright-skill; make install symlinks it
globally into ~/.claude/skills/
- deps target extended to check node + npm, and to run the skill's
own `npm run setup` (installs Playwright + Chromium ~300 MB on
first run). Idempotent: skipped if node_modules/playwright
already exists.
Stack fit: JavaScript Playwright aligns with Craig's TypeScript/React
frontend work. Python-side (Django) browser tests would be better served
by Anthropic's official webapp-testing skill (Python Playwright bindings),
noted in the evaluation memory but not adopted here — minimal overlap,
easy to add later if the need arises.
|