From 11f5f003eef12bff9633ca8190e3c43c7dab6708 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 19 Apr 2026 15:16:46 -0500 Subject: feat: adopt lackeyjb/playwright-skill (MIT verbatim fork) + deps target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Makefile | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eed34ae..c78bad6 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ SKILLS_DIR := $(HOME)/.claude/skills RULES_DIR := $(HOME)/.claude/rules SKILLS := c4-analyze c4-diagram debug add-tests respond-to-review review-pr fix-issue security-check \ arch-design arch-decide arch-document arch-evaluate \ - brainstorm codify root-cause-trace five-whys prompt-engineering + brainstorm codify root-cause-trace five-whys prompt-engineering \ + playwright-skill RULES := $(wildcard claude-rules/*.md) LANGUAGES := $(notdir $(wildcard languages/*)) @@ -47,18 +48,32 @@ help: ## Show this help ##@ Dependencies -deps: ## Install required tools (claude, jq, fzf, ripgrep, emacs) +deps: ## Install required tools (claude, node, jq, fzf, ripgrep, emacs, playwright) @echo "Checking dependencies..." - @command -v claude >/dev/null 2>&1 && echo " claude: installed" || \ - { echo " claude: installing via npm..."; npm install -g @anthropic-ai/claude-code; } - @command -v jq >/dev/null 2>&1 && echo " jq: installed" || \ - { echo " jq: installing..."; $(call install_pkg,jq); } - @command -v fzf >/dev/null 2>&1 && echo " fzf: installed" || \ - { echo " fzf: installing..."; $(call install_pkg,fzf); } - @command -v rg >/dev/null 2>&1 && echo " ripgrep: installed" || \ - { echo " ripgrep: installing..."; $(call install_pkg,ripgrep); } - @command -v emacs >/dev/null 2>&1 && echo " emacs: installed" || \ - { echo " emacs: installing..."; $(call install_pkg,emacs); } + @command -v claude >/dev/null 2>&1 && echo " claude: installed" || \ + { echo " claude: installing via npm..."; npm install -g @anthropic-ai/claude-code; } + @command -v node >/dev/null 2>&1 && echo " node: installed ($$(node --version))" || \ + { echo " node: installing..."; $(call install_pkg,nodejs); } + @command -v npm >/dev/null 2>&1 && echo " npm: installed" || \ + { echo " npm: installing..."; $(call install_pkg,npm); } + @command -v jq >/dev/null 2>&1 && echo " jq: installed" || \ + { echo " jq: installing..."; $(call install_pkg,jq); } + @command -v fzf >/dev/null 2>&1 && echo " fzf: installed" || \ + { echo " fzf: installing..."; $(call install_pkg,fzf); } + @command -v rg >/dev/null 2>&1 && echo " ripgrep: installed" || \ + { echo " ripgrep: installing..."; $(call install_pkg,ripgrep); } + @command -v emacs >/dev/null 2>&1 && echo " emacs: installed" || \ + { echo " emacs: installing..."; $(call install_pkg,emacs); } + @if [ -d "$(CURDIR)/playwright-skill" ]; then \ + if [ -d "$(CURDIR)/playwright-skill/node_modules/playwright" ]; then \ + echo " playwright: installed (skill node_modules present)"; \ + else \ + echo " playwright: running skill setup (npm install + chromium download ~300 MB)..."; \ + (cd "$(CURDIR)/playwright-skill" && npm run setup); \ + fi \ + else \ + echo " playwright: skipped (playwright-skill/ not present in this repo)"; \ + fi @echo "Done." ##@ Global install (symlinks into ~/.claude/) -- cgit v1.2.3