Add Playwright+Camoufox prerequisite checks to web-automation skill docs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user