itamarzand88/cli-anything-web/capture
Claude Code and agent skill by itamarzand88/cli-anything-web
- community
Checking that the SKILL.md file is still in the repository.
Captures HTTP traffic from a web app using playwright-cli — site fingerprinting (framework, protections, auth, API discovery) plus full traffic recording into raw-traffic.json. Use as Phase 1 of CLI generation whenever a target URL needs its API surface recorded or assessed.
Install
npx vskill@latest install itamarzand88/cli-anything-web/captureSKILL.md
Traffic Capture (Phase 1)
Assess the site, then capture comprehensive HTTP traffic. This skill combines site assessment with full traffic recording in a single browser session.
Copy this checklist and check off items as you complete them:
CRITICAL EXECUTION RULES
NEVER use `run_in_background: true` for ANY playwright-cli command.All playwright-cli commands must run in the foreground with appropriate timeouts.Background execution causes task ID tracking failures — the command completesbefore you can read the output. Seereferences/playwright-cli-commands.mdfor the timeout table.
NEVER use `eval` for complex expressions.evalfails silently on ternaries,comma operators, and multi-branch logic with "not well-serializable" errors.Userun-codeinstead. Seereferences/framework-detection.mdfor details.
ESM context — no `require()`.run-codeuses ESM. Useawait import('fs')instead ofrequire('fs'). Seereferences/playwright-cli-commands.md.
Prerequisites (Hard Gate)
Do NOT start unless:
- [ ] playwright-cli is available (
npx @playwright/cli@latest --version) - [ ] Target URL is known
Default capture method: playwright-cli tracing (standard workflow below).
Optional --mitmproxy mode
When the --mitmproxy flag was passed to /cli-anything-web (or the capture needs untruncated bodies / enhanced metadata), follow this workflow with the step substitutions in references/mitmproxy-mode.md — Steps 1, 3, and 4 differ; everything else is identical. When playwright-cli itself is unavailable (e.g., no Node), fall back to chrome-devtools-mcp via launch-chrome-debug.sh — see HARNESS.md Tool Hierarchy.
Public API Shortcut
If the target site has a documented public REST/JSON API (e.g., Hacker News Firebase API, Dev.to API, Reddit API, Wikipedia API), browser capture is optional:
- Probe the API endpoints directly with
httpxorcurl - Save responses as
<app>/traffic-capture/raw-traffic.json - Skip to Phase 2 (methodology)
This applies when:
- API docs exist (OpenAPI/Swagger, developer docs page,
/api/prefix) - The API is publicly accessible without browser-specific auth
- Endpoints return JSON (not HTML)
If unsure whether a public API exists, proceed with browser capture as normal.
Resume from Checkpoint
Before starting, check if a previous capture session exists:
If a checkpoint exists, read the guidance field and resume from the last completed step instead of starting over. This prevents duplicate work when sessions are interrupted.
Step 1: Setup
`--mitmproxy` mode: use the Step 1 substitution inreferences/mitmproxy-mode.md(start the proxy, then open through it).
Do NOT ask the user to log in yet — Step 2 will determine if auth is needed.
Step 2: Site Fingerprint (Single Command)
Run the all-in-one site fingerprint command instead of individual eval calls. This is faster, more reliable, and detects framework + protection + iframes + auth requirements in one shot.
Use the script file — multi-line JS with arrow functions and optional chaining fails in playwright-cli's single-line command parser. The script file approach has been tested and works reliably:
IMPORTANT: Thesite-fingerprint.jsscript must be loaded via the commandabove. Do NOT copy-paste the JS inline — it will fail with SyntaxError.Thegrep -vstrips comments andtrjoins lines for single-line execution.
Interpret fingerprint results
The fingerprint returns four groups: framework, protection, auth, iframes. Map each true flag to the next action:
| Group | Action | |
|---|---|---|
| framework | See references/framework-detection.md for the full protocol table (googleBatch / nextPages / nextApp / nuxt / spaRoot). | |
| protection | See references/protection-detection.md — always start at the escalation ladder at the top (plain httpx → curl_cffi → curl_cffi + cookies → camoufox → hybrid). | |
| auth | Table below (Auth detection section). | |
| iframes | If iframeCount > 0, see references/playwright-cli-advanced.md for the in-iframe re-run snippet. |
Claude-facing shortcuts:
googleBatch: true→ generaterpc/subpackage (batchexecute protocol).cloudflareManagedChallenge: true→ tier 4 (camoufox) is required;curl_cffialone will fail.awsWaf: true→ captureaws-waf-tokencookie; usecurl_cffifor GraphQL, cookie-only for SSR.akamai: trueordatadome: true→ 1–2 s delays between requests are mandatory.serviceWorker: true→ note in assessment.md; generated CLI usesservice_workers="block".iframeCount > 0→ re-run the fingerprint inside the iframe. Google Labs apps (Stitch / MusicFX / ImageFX) follow this pattern — parent hasWIZ_global_data, iframe has the real app.
Note: snapshot and click <ref> auto-resolve iframes. Only drop down to run-code for iframe interaction when built-in commands fail.
Auth detection (BEFORE exploration)
Check the fingerprint auth fields:
| Condition | Meaning | Action | |
|---|---|---|---|
hasLoginButton && !hasUserMenu | Login required, not logged in | Ask user to log in NOW | |
hasUserMenu | Already logged in | Proceed to capture | |
!hasLoginButton && !hasUserMenu | No auth needed (public site) | Skip auth, proceed |
If auth is needed:
- Tell the user: "This site requires login. Please log in in the browser window."
- Wait for user confirmation
- Save auth state and tighten permissions (CLAUDE.md mandates
chmod 600):
If NO auth is needed: Skip directly to Step 2b.
2b. Classify Site Profile
Based on fingerprint results AND what you see in the UI, classify the site:
| Profile | Auth? | Operations | Exploration Focus | |
|---|---|---|---|---|
| Auth + CRUD | Yes | Create, Read, Update, Delete | Full CRUD per resource | |
| Auth + Generation | Yes | Generate, Poll, Download | Generation lifecycle + projects | |
| Auth + Read-only | Yes | Read, Search, Export | Read operations + auth flow | |
| No-auth + CRUD | No/Optional | Full CRUD | Skip auth, full CRUD | |
| No-auth + Read-only | No | Read, Search | Minimal capture |
2c. Quick API Probe (Force SPA Navigation Trick)
Start a SHORT trace, click 3-4 internal links, stop. This reveals hidden API endpoints that SSR hides on initial page load.
This probe trace is separate from the full capture in Step 3 — Step 3 will start a fresh trace that overwrites the .network file in .playwright-cli/traces/. The parsed probe-traffic.json is kept in traffic-capture/ so it stays available for cross-referencing during Step 4.
Check the probe results — what API patterns did you find? See references/api-discovery.md for the priority chain and decision tree.
2d. Write Assessment Summary
Create <app>/traffic-capture/assessment.md to consolidate all findings:
Step 3: Full Traffic Capture
Now do the comprehensive capture based on what Step 2 revealed.
`--mitmproxy` mode: skiptracing-startand HAR recording — the proxyis already capturing (seereferences/mitmproxy-mode.md).
HAR recording is optional but recommended. It produces a standard HAR filealongside the trace. This enablesmitmproxy2swaggerto auto-generate anOpenAPI spec:pip install mitmproxy2swagger && mitmproxy2swagger -i capture.har -o api-spec.yaml -p <base-url>The HAR file is saved when the browser context is closed (Step 5).
Exploration by site profile
Use the concrete targets in references/exploration-checklists.md for the profile identified in Step 2b. Each profile has an explicit entry count, distinct-path count, and WRITE-op target that validate-capture.py (Step 4) will enforce. Minimum bar across all profiles:
- ≥ 15 entries, ≥ 3 distinct URL paths, protocol ≠
unknown - ≥ 1 WRITE op (unless the site is genuinely read-only — pass
--read-onlyto the validator) - < 50% error rate (dominant 4xx/5xx means auth or rate-limit failure)
Pacing for protected sites
If any of cloudflare, cloudflareManagedChallenge, akamai, datadome, awsWaf, or rateLimit fired in the fingerprint, leave 1–2 s between clicks / form submits. Faster exploration triggers per-IP challenges within ~30 requests and corrupts the trace.
General interaction rules
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli-anything-web-plugin/skills/capture/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 45
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itamarzand88/cli-anything-web/capture)