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.
curl -O https://raw.githubusercontent.com/cohen-liel/hivemind/main/.claude/skills/web-scraping/SKILL.mdgit clone --depth 1 https://github.com/cohen-liel/hivemindWrote 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.
[](https://agentmods.dev/skills/cohen-liel/hivemind/web-scraping)<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.
<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>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.
| Model | Per session | Once 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 |
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: 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
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.
- 5d ago First seen · 242 lines · 38 tokens per session scan A 51df6a4f7d50
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.
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.
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.
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…
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.
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.
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…