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

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

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 ~/.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

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

View File

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