From 53b05f263b33ef3d23cdfff4eca274a694263b5a Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 9 Feb 2026 04:43:09 +0000 Subject: [PATCH] Add Playwright+Camoufox prerequisite checks to web-automation skill docs --- docs/install.md | 8 ++++++++ skills/web-automation/claude-code/SKILL.md | 14 +++++++++++++- skills/web-automation/codex/SKILL.md | 14 +++++++++++++- skills/web-automation/opencode/SKILL.md | 15 +++++++++++++-- 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/docs/install.md b/docs/install.md index fe6e8ed..a442e01 100644 --- a/docs/install.md +++ b/docs/install.md @@ -71,6 +71,14 @@ Requirements for `web-automation`: - Node.js 20+ - pnpm - Browser download/network access for Camoufox +- `playwright-core` and `camoufox-js` installed in the skill scripts workspace + +Dependency verification (run in your installed `scripts/` folder): + +```bash +node -e "require.resolve('playwright-core/package.json');require.resolve('camoufox-js/package.json');console.log('OK: playwright-core + camoufox-js installed')" +node -e "const fs=require('fs');const t=fs.readFileSync('browse.ts','utf8');if(!/camoufox-js/.test(t)){throw new Error('browse.ts is not configured for Camoufox')}console.log('OK: Camoufox integration detected in browse.ts')" +``` ## 4) Verify diff --git a/skills/web-automation/claude-code/SKILL.md b/skills/web-automation/claude-code/SKILL.md index c8ce50d..904d984 100644 --- a/skills/web-automation/claude-code/SKILL.md +++ b/skills/web-automation/claude-code/SKILL.md @@ -21,7 +21,19 @@ pnpm install npx camoufox-js fetch ``` -If native dependency build errors appear (e.g., better-sqlite3), rebuild from the reported package directory. +## Prerequisite Check (MANDATORY) + +Before running any automation, verify Playwright + Camoufox dependencies are installed and scripts are configured to use Camoufox. + +```bash +cd ~/.claude/skills/web-automation/scripts +node -e "require.resolve('playwright-core/package.json');require.resolve('camoufox-js/package.json');console.log('OK: playwright-core + camoufox-js installed')" +node -e "const fs=require('fs');const t=fs.readFileSync('browse.ts','utf8');if(!/camoufox-js/.test(t)){throw new Error('browse.ts is not configured for Camoufox')}console.log('OK: Camoufox integration detected in browse.ts')" +``` + +If any check fails, stop and return: + +"Missing dependency/config: web-automation requires `playwright-core` + `camoufox-js` and Camoufox-based scripts. Run setup in this skill, then retry." ## Quick Reference diff --git a/skills/web-automation/codex/SKILL.md b/skills/web-automation/codex/SKILL.md index 4198b03..bece8df 100644 --- a/skills/web-automation/codex/SKILL.md +++ b/skills/web-automation/codex/SKILL.md @@ -21,7 +21,19 @@ pnpm install npx camoufox-js fetch ``` -If native dependency build errors appear (e.g., better-sqlite3), rebuild from the reported package directory. +## Prerequisite Check (MANDATORY) + +Before running any automation, verify Playwright + Camoufox dependencies are installed and scripts are configured to use Camoufox. + +```bash +cd ~/.codex/skills/web-automation/scripts +node -e "require.resolve('playwright-core/package.json');require.resolve('camoufox-js/package.json');console.log('OK: playwright-core + camoufox-js installed')" +node -e "const fs=require('fs');const t=fs.readFileSync('browse.ts','utf8');if(!/camoufox-js/.test(t)){throw new Error('browse.ts is not configured for Camoufox')}console.log('OK: Camoufox integration detected in browse.ts')" +``` + +If any check fails, stop and return: + +"Missing dependency/config: web-automation requires `playwright-core` + `camoufox-js` and Camoufox-based scripts. Run setup in this skill, then retry." ## Quick Reference diff --git a/skills/web-automation/opencode/SKILL.md b/skills/web-automation/opencode/SKILL.md index 1523ce7..acbd687 100644 --- a/skills/web-automation/opencode/SKILL.md +++ b/skills/web-automation/opencode/SKILL.md @@ -16,13 +16,24 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio ## First-Time Setup ```bash -# Use your OpenCode skills path cd ~/.opencode/skills/web-automation/scripts pnpm install npx camoufox-js fetch ``` -If native dependency build errors appear (e.g., better-sqlite3), rebuild from the reported package directory. +## Prerequisite Check (MANDATORY) + +Before running any automation, verify Playwright + Camoufox dependencies are installed and scripts are configured to use Camoufox. + +```bash +cd ~/.opencode/skills/web-automation/scripts +node -e "require.resolve('playwright-core/package.json');require.resolve('camoufox-js/package.json');console.log('OK: playwright-core + camoufox-js installed')" +node -e "const fs=require('fs');const t=fs.readFileSync('browse.ts','utf8');if(!/camoufox-js/.test(t)){throw new Error('browse.ts is not configured for Camoufox')}console.log('OK: Camoufox integration detected in browse.ts')" +``` + +If any check fails, stop and return: + +"Missing dependency/config: web-automation requires `playwright-core` + `camoufox-js` and Camoufox-based scripts. Run setup in this skill, then retry." ## Quick Reference