hivemind: Skill for Claude Code

.claude/skills/web-scraping/SKILL.md

web-scraping is a skill for Claude Code from cohen-liel/hivemind. It costs 38 tokens per session (1,865 once invoked), scanned A, original, Apache-2.0.

A collection of patterns for fetching web pages, searching the internet, reading HTML, extracting data, and automating browser interactions. Web scraping means collecting information from websites by code.

In plain words
What is it for?
Use it to crawl websites, extract page data, fetch external content, or automate browser interactions programmatically.
Why use it?
It provides reusable approaches for handling pages, links, text, multiple URLs, request limits, and browser-based content.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is cohen-liel/hivemind's own configuration. It tells Claude Code how to work on hivemind itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hivemind configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cohen-liel/hivemind. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cohen-liel/hivemind/main/.claude/skills/web-scraping/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cohen-liel/hivemind

Made for: Claude Code.

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-scraping

README.md
[![agentmods](https://agentmods.dev/badge/skills/cohen-liel/hivemind/web-scraping/github.svg)](https://agentmods.dev/skills/cohen-liel/hivemind/web-scraping)
Your own site
<a href="https://agentmods.dev/skills/cohen-liel/hivemind/web-scraping"><img src="https://agentmods.dev/badge/skills/cohen-liel/hivemind/web-scraping/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-scraping

Your own site · 80×15
<a href="https://agentmods.dev/skills/cohen-liel/hivemind/web-scraping"><img src="https://agentmods.dev/badge/skills/cohen-liel/hivemind/web-scraping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,865 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.
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.00038 $0.01865
Opus 5 $0.00019 $0.00932
Sonnet 5 $0.00008 $0.00373
Haiku 4.5 $0.00004 $0.00186

Measured 5d ago against content hash 51df6a4f7d50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

web-scraping 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 5d 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.

async def fetch(self, url: str, session: httpx.AsyncClient) -> str:
.claude/skills/web-scraping/SKILL.md · 242 lines

How it starts

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

Web Scraping & Internet Search Patterns

HTTP Scraping (httpx + BeautifulSoup)

import httpx
from bs4 import BeautifulSoup
import asyncio

async def scrape_page(url: str) -> dict:
    """Fetch and parse a single page."""
    headers = {
        "User-Agent": "Mozilla/5.0 (compatible; MyBot/1.0; +https://example.com/bot)"
    }
    async with httpx.AsyncClient(headers=headers, follow_redirects=True, timeout=30) as client:
        response = await client.get(url)
        response.raise_for_status()

    soup = BeautifulSoup(response.text, "lxml")

    return {
        "title": soup.find("title").get_text(strip=True) if soup.find("title") else "",
        "headings": [h.get_text(strip=True) for h in soup.find_all(["h1", "h2", "h3"])],
        "links": [a["href"] for a in soup.find_all("a", href=True)],
        "text": soup.get_text(separator="\n", strip=True)[:5000],
    }

async def scrape_many(urls: list[str], max_concurrent: int = 5) -> list[dict]:
    """Scrape many URLs with concurrency limit."""
    sem = asyncio.Semaphore(max_concurrent)

    async def fetch_one(url):
        async with sem:
            try:
                return await scrape_page(url)
            except Exception as e:
                return {"url": url, "error": str(e)}

    return await asyncio.gather(*[fetch_one(url) for url in urls])

Browser Automation (Playwright)

from playwright.async_api import async_playwright

async def scrape_with_browser(url: str) -> str:
    """Use for JS-heavy sites that need a real browser."""
    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=True)
        page = await browser.new_page()

        # Block images/fonts for speed
        await page.route("**/*.{png,jpg,gif,webp,svg,woff,woff2}", lambda r: r.abort())

        await page.goto(url, wait_until="networkidle", timeout=30000)

        # Wait for specific element
        await page.wait_for_selector(".content", timeout=10000)

        # Extract data
        text = await page.inner_text("body")
        links = await page.eval_on_selector_all("a[href]", "els => els.map(e => e.href)")

        await browser.close()
        return text

async def fill_form_and_submit(url: str, form_data: dict) -> str:
    """Automate form submission."""
    async with async_playwright() as p:
        browser = await p.chromium.launch(headless=True)
        page = await browser.new_page()
        await page.goto(url)

        for selector, value in form_data.items():
            await page.fill(selector, value)

        await page.click("button[type=submit]")
        await page.wait_for_load_state("networkidle")
        result = await page.inner_text("body")
        await browser.close()
        return result

Read the full file on GitHub · 242 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. 5d ago First seen · 242 lines · 38 tokens per session scan A 51df6a4f7d50

Subscribe to this mod's changes

web-scraping is a skill published in the GitHub repository cohen-liel/hivemind (108 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,865 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

record-and-replay

Use when the user wants Codex to record a Linux desktop or browser workflow and turn it into a reusable skill. Requires the Record & Replay event-stream MCP server.

ilysenko/codex-desktop-linux · 38 tokens

browser-qa

A browser-based quality check for deployed web pages and user flows. It uses browser automation to test rendering, navigation, forms, interactions, responsive behaviour, and accessibility-related issues.

hashgraph-online/awesome-codex-plugins · 58 tokens

alibaba-supplier-outreach

Codex-native supplier sourcing and outreach workflow for Alibaba using LaunchFast research. Use when the user wants supplier shortlists, outreach messages, reply triage, or negotiation support. Requires supplierresearch. Browser automation is optional but useful when the user wants Codex to interact with Alibaba…

hashgraph-online/awesome-codex-plugins · 69 tokens

separateweb-capture

Capture a URL into a full-page screenshot, cropped UI item PNGs, and a JSON manifest. Use when the user says separateweb capture , asks to capture a website, or wants UI extraction assets without running the SeparateWeb web app.

hashgraph-online/awesome-codex-plugins · 59 tokens

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

agent-workspace-linux

Use when a task needs an isolated hidden Linux desktop or workspace-owned browser: GUI app QA, web/browser/shopping automation, sandboxed app observation, or stale workspace cleanup. Routes agent-workspace-linux MCP tools on demand. Does NOT apply to host desktop/Chrome control, generic MCP setup, or pure code/file…

ilysenko/codex-desktop-linux · 70 tokens