web-scraper-subagent

web-scraper-subagent is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 92 tokens per session (2,834 once invoked), scanned A, original, MIT.

A guide for building a small helper agent that collects information from websites for another agent. It covers crawling pages, extracting their main content, reading tables, handling JavaScript-heavy sites, and returning structured data.

In plain words
What is it for?
Delegating website research, collecting data from static or dynamic pages, extracting article text, converting HTML tables into data, and planning larger crawls.
Why use it?
It helps choose an appropriate collection method and validate requests before accessing a site. It also identifies cases where direct APIs or official data exports are more suitable than scraping.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit Delegating website research, collecting data from static or dynamic pages, extracting article text, converting HTML tables into data, and planning larger crawls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/web-scraper-subagent
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill web-scraper-subagent
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for web-scraper-subagent

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for web-scraper-subagent

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/web-scraper-subagent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.02834
Opus 5 $0.00046 $0.01417
Sonnet 5 $0.00018 $0.00567
Haiku 4.5 $0.00009 $0.00283

Measured 11d ago against content hash 848e28ee927a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

web-scraper-subagent scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Vérifier aussi que l'URL est bien formée (`urllib.parse.urlparse`) et que le schéma est `http` ou `https`.
agent-skills/web-scraper-subagent/SKILL.md · 297 lines

How it starts

The opening of the file, as written. The whole thing — 297 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Web Scraper Sub-Agent

Quand utiliser ce skill

Utiliser ce skill quand un agent parent doit déléguer la collecte de données web à un sous-agent autonome. Cas typiques :

Cas Outil adapté
Page statique HTML simple requests + BeautifulSoup
Page JS dynamique (SPA, lazy-load) playwright headless
Extraction de texte principal trafilatura
Tableau HTML → DataFrame pandas.read_html
Scraping à grande échelle scrapy + middlewares
Browser automation avec MCP playwright-mcp

Ne pas utiliser ce skill pour : APIs REST publiques (utiliser requests direct), données disponibles via export officiel (CSV, JSON), ou sites protégés par authentication que l'on ne détient pas.

Workflow en étapes

Étape 1 — Valider l'input avant toute requête réseau

REQUIRED_FIELDS = {"url"}
DEFAULTS = {"max_pages": 1, "timeout": 30, "output_format": "json",
            "cache_ttl": 3600, "follow_pagination": False, "proxy": None}

def validate_input(params: dict) -> dict:
    missing = REQUIRED_FIELDS - params.keys()
    if missing:
        raise ValueError(f"Champs obligatoires manquants : {missing}")
    return {**DEFAULTS, **params}

Vérifier aussi que l'URL est bien formée (urllib.parse.urlparse) et que le schéma est http ou https.

Étape 2 — Choisir le moteur de rendu

# Décision : site statique ou dynamique ?
import requests
from bs4 import BeautifulSoup

r = requests.get(url, timeout=10)
soup = BeautifulSoup(r.text, "lxml")

# Si les sélecteurs retournent vide → site JS → basculer sur Playwright
if not soup.select(selectors["target_field"]):
    use_playwright = True

Playwright en mode headless Chromium est le choix par défaut pour les sites dynamiques en 2026. Puppeteer n'est pertinent que si le reste de la stack est Node.js.

Étape 3 — Initialiser le navigateur (Playwright)

from playwright.sync_api import sync_playwright

def get_page_content(url: str, timeout: int, proxy: str | None) -> str:
    with sync_playwright() as p:
        browser = p.chromium.launch(
            headless=True,
            proxy={"server": proxy} if proxy else None,
            args=["--no-sandbox", "--disable-blink-features=AutomationControlled"]
        )
        ctx = browser.new_context(
            user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
                       "(KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
            locale="fr-FR",
            viewport={"width": 1280, "height": 800},
        )
        page = ctx.new_page()
        page.goto(url, wait_until="networkidle", timeout=timeout * 1000)
        content = page.content()
        browser.close()
    return content

Read the full file on GitHub · 297 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 297 lines · 92 tokens per session scan A 848e28ee927a

Subscribe to this mod's changes

web-scraper-subagent is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 17d ago), licensed MIT. It adds 92 tokens to every session and 2,834 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

explain

Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.

softspark/ai-toolkit · 34 tokens

common-sense-index-investing-bogle

Apply John Bogle index investing rules for low-cost funds, asset allocation, fees, taxes, ETFs, advisers, and buy-hold discipline.

simbajigege/book2skills · 38 tokens

finance-econ-literacy

A Korean-language guide to understanding economic indicators such as interest rates, exchange rates, inflation, GDP, employment, and trade. It explains how these figures can affect loans, savings, investments, and spending.

modu-ai/moai-cowork · 128 tokens

stock-analysis-lead

Orchestrate a US-stock investment analysis — classify sector archetype, fetch SEC filings, dispatch a tiered fan-out of six vertical equity-research agents (business model, earnings quality, balance sheet, management, industry, peer comparison) over a validated JSON findings contract, then synthesize a buy/hold/sell…

johnqtcg/awesome-skills · 229 tokens

stock-business-review

Review a US-listed company's business model and revenue structure for an equity-research workup. Covers product/service mix, customer concentration, geographic exposure, industry position, revenue-growth decomposition (organic vs acquired vs price vs volume), and information-tier discipline (which numbers are facts vs…

johnqtcg/awesome-skills · 121 tokens

stock-earnings-quality-review

Review a US-listed company's earnings quality, cash-flow integrity, and operating leverage for an equity-research workup. Covers operating cash flow vs net income drift, free cash flow trajectory, capex character (maintenance vs expansion), equity issuance / shareholder-return yield, revenue-quality signals…

johnqtcg/awesome-skills · 147 tokens