- Home
- Skills
- Workflow Automation
- Self-Healing Web Scraper Repair
Self-Healing Web Scraper Repair
by swastik bhat
Fixes a scraper's broken selectors after a site redesign — and proves the fix on the live page before shipping it.
Free
Self-Healing Web Scraper Repair
Example session with this skill installed
My product scraper is returning empty rows after a site redesign. Here is my scraper.config.json and last-good rows. Repair the selectors and prove the repair on the live page.
- Read your context and instructions
- Compiled the self-healing web scraper
Scraper repair verified
The site's markup changed and the old item selector returned 0 rows. The loop found the items and fields again from the last good identities, then re-scraped the live page before writing the config.
| Field | Old selector | Verified selector |
|---|---|---|
| items | .product-card | .item |
| name | .name | h2.title |
| price | .price | span.amount |
Verification
- 4 items extracted after the repair
- Every known
namepresent pricevalues still look like prices- Exit code 0;
scraper.config.jsonupdated
Run log
[cycle 2] RED — expected at least 4 item(s), got 0
[cycle 2] REPAIRED — ".item" + name:"h2.title", price:"span.amount"
heal: PASS — 4 item(s), every known "name" present, values still look right. Shipping the repair.
[cycle 3] OK — 4 item(s), shape matches the last good run
Next: run a smoke-test cycle with the updated config, then resume the schedule.
Connects securely to your tools. The creator never sees your data.
About this skill
Your scraper doesn't break loudly. The site ships a redesign, one class name changes, and the 3am cron job writes an empty spreadsheet for a week before anyone notices.
scrape-heal runs the loop that closes that gap: detect → heal → verify → settle.
- Detect — every run is validated against the last good one: enough items, no empty fields, every known value still present. A selector that returns wrong-shaped data counts as broken, because it is.
- Heal — the last good run is the ground truth. The healer looks at the live page for elements that still contain those exact values and derives new selectors from them. No guessing at class names.
- Verify — the candidate selectors are re-run against the live page. The repair ships only if the shape validates, every known item is still there, and the values still look like the same kind of data.
- Settle — repaired, or red with evidence attached: screenshot, DOM snapshot and HTTP status for the cycle that failed.
What the agent gets
- SKILL.md as the entry point, with LOOP.md (the verify gate and evidence trail) and REFERENCE.md (every config key, flag and environment variable).
- scripts/run-heal.sh — one-shot repair against your last good rows, a single check, or a watchdog on a cadence. It stages the engine and Chromium itself, and --selfcheck proves the install by healing a bundled fixture.
- --init writes a commented config and --validate checks it before a run.
- Pagination for next-link, load-more, infinite-scroll and {page} URL patterns, including controls inside iframes.
- Items and healing anchors inside iframes and open shadow roots; the page wins when both match.
- Change watching, a local dashboard, a REST API, and adapters for Scrapy, Crawlee and Playwright.
Requirements Node 20 or newer and npm are required. The first run installs Playwright and Chromium into ~/.scrape-heal. The launcher is bash (macOS/Linux, WSL or Git Bash). A last-good set of rows is needed to anchor a repair; without one the tool detects breakage but does not guess.
Why verification matters If nothing can be verified, nothing is written and the run exits non-zero. That is the difference between a healer and a more confident way to corrupt your data.
Requires Node.js 20+. Only repairs structural breakage; cannot bypass 403/429 blocks or CAPTCHAs. Initial run requires network for browser binaries.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
- Software
- Playwright
Node.jsBash
Git
Permissions
What's inside
Creator
swastik bhat
Frequently Asked Questions
New in Workflow Automation
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.