Add Playwright+Camoufox prerequisite checks to web-automation skill docs
This commit is contained in:
@@ -71,6 +71,14 @@ Requirements for `web-automation`:
|
|||||||
- Node.js 20+
|
- Node.js 20+
|
||||||
- pnpm
|
- pnpm
|
||||||
- Browser download/network access for Camoufox
|
- 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
|
## 4) Verify
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,19 @@ pnpm install
|
|||||||
npx camoufox-js fetch
|
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
|
## Quick Reference
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,19 @@ pnpm install
|
|||||||
npx camoufox-js fetch
|
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
|
## Quick Reference
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,24 @@ Automated web browsing and scraping using Playwright with Camoufox anti-detectio
|
|||||||
## First-Time Setup
|
## First-Time Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Use your OpenCode skills path
|
|
||||||
cd ~/.opencode/skills/web-automation/scripts
|
cd ~/.opencode/skills/web-automation/scripts
|
||||||
pnpm install
|
pnpm install
|
||||||
npx camoufox-js fetch
|
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
|
## Quick Reference
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user