Add Playwright+Camoufox prerequisite checks to web-automation skill docs

This commit is contained in:
2026-02-09 04:43:09 +00:00
parent 4c60c00391
commit 53b05f263b
4 changed files with 47 additions and 4 deletions

View File

@@ -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