web-scraping

web-scraping is a skill for Claude Code from MadAppGang/magus. It costs 35 tokens per session (2,693 once invoked), scanned A, original, MIT.

A guide to collecting structured information from web pages, including pages with multiple pages of results, changing content, login requirements, or bot protections.

In plain words
What is it for?
Use it to plan crawlers that navigate pages, inspect page content, extract fields, handle pagination and rate limits, and save results as JSON or CSV.
Why use it?
It helps avoid losing records or misreading pages when a site does not show all its data in one simple document.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the browser-use plugin — 6 skills shipped together

Good fit Use it to plan crawlers that navigate pages, inspect page content, extract fields, handle pagination and rate limits, and save results as JSON or CSV.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madappgang/magus/web-scraping
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 MadAppGang/magus --skill web-scraping
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code.

Or install browser-use, the plugin that ships this one along with the rest of its 6 skills.

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/madappgang/magus/web-scraping/github.svg)](https://agentmods.dev/skills/madappgang/magus/web-scraping)
Your own site
<a href="https://agentmods.dev/skills/madappgang/magus/web-scraping"><img src="https://agentmods.dev/badge/skills/madappgang/magus/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/madappgang/magus/web-scraping"><img src="https://agentmods.dev/badge/skills/madappgang/magus/web-scraping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,693 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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: 2 findings, 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 Rogue Agent · line 239
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 383
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00035 $0.02693
Opus 5 $0.00017 $0.01347
Sonnet 5 $0.00007 $0.00539
Haiku 4.5 $0.00003 $0.00269

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

Security

Grade A, and why

web-scraping scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/browser-use/skills/web-scraping/SKILL.md · 397 lines

How it starts

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

Web Scraping Patterns

Patterns for extracting structured data from web pages, including pagination, SPAs, authenticated scraping, and rate-limited crawls.


1. Core Scraping Loop

The fundamental extract-one-page workflow:

1. Navigate to page
   mcp__browser-use__browser_navigate(url="https://shop.example.com/products")
   → session_id: "s1"

2. Get DOM state (find data containers and pagination controls)
   mcp__browser-use__browser_get_state(session_id="s1")
   → selector_map: {... "47": {tag: "a", text: "Next →", href: "..."}, ...}

3. Extract structured data with LLM-powered query
   mcp__browser-use__browser_extract_content(
     query="product name, price, SKU, availability for each product listed",
     session_id="s1"
   )
   → "Product: Widget A, Price: $12.99, SKU: WA-001, In Stock\n..."

4. Append to results array

5. Check pagination (see Section 2)

6. Close session when done
   mcp__browser-use__browser_close_session(session_id="s1")

7. Write results to file
   Write tool → products.json

When to Use extract_content vs get_html

Situation Tool Reason
Data layout is complex or varies per item extract_content LLM understands natural variation
You know the exact CSS selector get_html Faster, cheaper (no LLM call)
Extracting a table get_html(selector=".data-table") Raw HTML is easier to parse programmatically
Extracting a product listing with many fields extract_content LLM handles field extraction
Page has inconsistent markup extract_content Semantic understanding handles inconsistency

2. Pagination Patterns

2.1 Numbered Page Navigation

For sites with ?page=N URL patterns:

base_url = "https://shop.example.com/products"
all_results = []

for page in range(1, max_pages + 1):
    url = f"{base_url}?page={page}"
    mcp__browser-use__browser_navigate(url=url, session_id=session_id)
    state = mcp__browser-use__browser_get_state(session_id=session_id)

    # Check if page has content (stop if we reach an empty page)
    if "No products found" in str(state["selector_map"]):
        break

    data = mcp__browser-use__browser_extract_content(
        query="all product names, prices, and URLs",
        session_id=session_id
    )
    all_results.append(data["content"])

    # Rate limit: pause between pages
    Bash: sleep 1

Read the full file on GitHub · 397 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. 10d ago First seen · 397 lines · 35 tokens per session scan A 36026ae6b806

Subscribe to this mod's changes

web-scraping is a skill published in the GitHub repository MadAppGang/magus (9 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 2,693 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens