rysweet/amplihack-rs/authenticated-web-scraper
Claude Code and agent skill by rysweet/amplihack-rs
- community
Checking that the SKILL.md file is still in the repository.
Scrape authenticated websites from WSL2 using Edge CDP. Launches headed Edge for user auth, then headless scraping via Chrome DevTools Protocol. Use when mirroring internal wikis, docs sites, or any site requiring 2FA/SSO login.
Install
npx vskill@latest install rysweet/amplihack-rs/authenticated-web-scraperSKILL.md
Authenticated Web Scraper
Purpose
Scrapes content from websites that require authentication (2FA, SSO, corporate login) by leveraging the user's Windows Edge browser via Chrome DevTools Protocol (CDP). Designed for WSL2 environments where Playwright/Puppeteer can't directly reach Windows browser ports.
When to Use
- Mirroring internal documentation sites behind corporate auth
- Scraping content from sites requiring 2FA/SSO that can't be automated
- Extracting structured content (text, HTML, links) from authenticated web pages
- Crawling site navigation trees and following links to a configurable depth
Architecture
Key insight: WSL2 cannot reach Windows localhost:9222 directly. The scraper script must run on the Windows side via cmd.exe /c "node script.mjs".
Quick Start
When a user asks to scrape an authenticated website:
- Kill existing Edge processes and relaunch with debug flags
- User authenticates in the headed browser
- Copy scraper script to Windows temp and run via
cmd.exe - Script connects to CDP, navigates pages, extracts content
- Read results from shared filesystem (
/mnt/c/Temp/...)
Core Workflow
Phase 0: Prerequisites
- Node.js must be installed on Windows (
cmd.exe /c "where node") - The
wsnpm package on Windows side (cmd.exe /c "cd C:\Temp && npm install ws") - Edge browser installed (check
/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe)
Phase 1: Launch Edge with Remote Debugging
Phase 2: Verify CDP and User Auth
Tell user to authenticate, then confirm they can see content.
Phase 3: Scrape via CDP
Write a Node.js script that:
- Queries
http://localhost:9222/json/listfor open pages - Connects to the target page via WebSocket (
wspackage) - Uses
Runtime.evaluateto extract DOM content - Uses
Page.navigate+Page.enablefor crawling - Saves
.txt(clean text),.html(full),_links.jsonper page
Run on Windows side:
Phase 4: Crawl Navigation
- Extract sidebar/nav links from the initial page
- Filter to same-domain pages (skip anchor links)
- Visit each nav page, extract content + links
- Follow discovered links one level deep (deduplicating)
- Write summary JSON with page inventory
CDP Command Reference
Critical Details
- Must kill Edge first: If Edge is already running, new instances join the existing process and ignore
--remote-debugging-port - WSL2 networking: WSL2 has its own network stack;
127.0.0.1in WSL does NOT reach Windows. Scripts must run on Windows viacmd.exe - Respectful crawling: Add 2-second delays between page loads
- Auth persistence: Edge uses the user's default profile with saved sessions
- Output path: Use Windows paths (
C:\Temp\...) in scripts, read via/mnt/c/Temp/...from WSL
Integration Points
- Works with any documentation site behind corporate auth (SSO, SAML, FIDO2, etc.)
- Output can be fed to other skills for analysis, summarization, or knowledge base building
- Pairs well with
investigation-workflowandknowledge-builderskills
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingamplifier-bundle/skills/authenticated-web-scraper/SKILL.md
Popularity
- 7-day trend score
- 0
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/rysweet/amplihack-rs/authenticated-web-scraper)