web-scraping

web-scraping is a skill for Claude Code, Codex from harehare/mq. It costs 89 tokens per session (1,509 once invoked), scanned A, original, MIT.

A set of command-line tools for fetching web pages, crawling sites, rendering JavaScript, and extracting structured data from HTML or Markdown.

In plain words
What is it for?
Use it to scrape a URL, crawl multiple pages, handle pages that need JavaScript, send requests with custom options, and select data from the results.
Why use it?
It removes much of the manual work involved in downloading pages and turning their content into usable fields or records.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scrape a URL, crawl multiple pages, handle pages that need JavaScript, send requests with custom options, and select data from the results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/harehare/mq/web-scraping
About the project

mq is a command-line tool for querying and transforming Markdown with syntax modeled on jq, a utility commonly used for processing JSON. It helps developers extract sections, reshape documentation, analyze content, and prepare Markdown for language-model workflows. Its catalogue add-ons support using mq through coding-agent instructions and skills.

harehare/mq · 1,094 stars · on GitHub · mqlang.org

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 harehare/mq --skill web-scraping
Clone the repo
git clone --depth 1 https://github.com/harehare/mq

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/harehare/mq/web-scraping/github.svg)](https://agentmods.dev/skills/harehare/mq/web-scraping)
Your own site
<a href="https://agentmods.dev/skills/harehare/mq/web-scraping"><img src="https://agentmods.dev/badge/skills/harehare/mq/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/harehare/mq/web-scraping"><img src="https://agentmods.dev/badge/skills/harehare/mq/web-scraping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,509 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 52
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00089 $0.01509
Opus 5.5 $0.00036 $0.00604
Sonnet 5.5 $0.00018 $0.00302
Haiku 4.5 $0.00009 $0.00151

Measured 24d ago against content hash 4901482801a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 24d 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.

description: Fetches web pages and extracts structured data using mq's toolchain (mq-crawl for fetching/crawling/JS rendering, mq for HTML-to-Markdown selector-based extraction, http() for in-query requests). Use when th
skills/web-scraping/SKILL.md · 91 lines

How it starts

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

Web Scraping with mq

Three tools; pick the smallest one that fits:

  • mq-crawl: fetch/crawl a URL to Markdown, with JS rendering, multi-page crawling, robots.txt handling.
  • mq: filter/transform Markdown or HTML (-I html) with jq-like selectors. Full selector/function reference: processing-markdown skill.
  • mq's http() builtin (--allow-net): make the request inside a query, for cases mq-crawl can't (POST, custom headers/auth).

mq-crawl sends logs/stats to stderr: redirect with 2>/dev/null when scripting.

Fetch & Extract

mq-crawl --depth 0 https://example.com 2>/dev/null                       # page as Markdown (--depth 0 = don't follow links)
mq-crawl --depth 0 -q '.h | to_text()' https://example.com 2>/dev/null   # inline query, e.g. an outline

-q output is always Markdown/plain text, regardless of -f (which only formats the stats block on stderr, not content). For JSON/table/grep, skip -q and pipe the page into mq instead:

mq-crawl --depth 0 https://example.com 2>/dev/null | mq -F json 'select(.link)'                            # structured rows
mq-crawl --depth 0 https://example.com 2>/dev/null | mq -F json '.[][]'                                     # table cells
mq-crawl --depth 0 https://example.com 2>/dev/null | mq -F grep --context 2 'select(contains("Pricing"))'   # locate text

Filter with select(...) like jq: select(.h.level <= 2), select(.code.lang == "js"), select(contains("keyword")).

JS-Rendered Pages & Multi-Page Crawls

mq-crawl --depth 0 --headless --headless-network-idle https://spa.example.com 2>/dev/null

mq-crawl https://docs.example.com --depth 2 --allowed-domains docs.example.com \
  --concurrency 4 -o ./crawled 2>/dev/null
  • --headless needs local Chrome (or --webdriver-url for a remote WebDriver).
  • --allowed-domains is an exact-match domain list, not a wildcard; list every subdomain you want crawled.
  • -o DIR saves one Markdown file per page instead of stdout; aggregate them with mq -I null --allow-read 'collection("./crawled") | map(self, fn(page): get(page, "title");)' /dev/null (collection reads from disk, so it requires --allow-read).

Read the full file on GitHub · 91 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. 24d ago Changed 4901482801a5
  2. 1mo ago Changed a6487cf59f6b
  3. 3mo ago First seen · 91 lines · 89 tokens per session scan A 0807cafea37f

Subscribe to this mod's changes

web-scraping is a skill published in the GitHub repository harehare/mq (1,094 stars, last pushed today), licensed MIT. It adds 89 tokens to every session and 1,509 once invoked, about $0.0004 per session on Opus 5.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

web-scraping compared with skills from other repositories

web-scraping next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
web-scrapingharehare/mqSkill1.1ktodayMITA89Claude Code, Codex
webapp-testingHmbown/CodeWhaleSkill41k3d agoMITA32Claude Code, Codex
verifyzenbu-labs/terminal-browserSkill5.2ktodayMITA37Claude Code
computer-useHmbown/CodewhaleSkill41k2mo agoMITA59Claude Code, Codex
servo-fetchkonippi/servo-fetchSkill1664d agoApache-2.0A70Claude Code, Codex
Agent Browser AutomationPramodDutta/qaskillsSkill25329d agoMITA37Claude Code, Codex
web-scrapebug-ops/zephSkill68yesterdayMITA82Claude Code, Codex