web-scraping

web-scraping is a skill for Claude Code, Codex from platonai/Browser4. It costs 48 tokens per session (866 once invoked), scanned A, original, Apache-2.0.

A web-page data extraction tool that uses browser automation together with CSS or JavaScript selectors. A selector is a rule that identifies the page elements to read, such as a title, link, or product field.

In plain words
What is it for?
Use it to scrape page titles, text, links, images, or other structured fields from a given web page.
Why use it?
It extracts specific information from live pages without manually copying it. It can target text or attributes such as links and image addresses.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/platonai/browser4/web-scraping
Any agent
npx skills add platonai/Browser4 --skill web-scraping
Clone the repo
git clone --depth 1 https://github.com/platonai/Browser4

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/platonai/browser4/web-scraping.svg)](https://agentmods.dev/skills/platonai/browser4/web-scraping)
Your own site
<a href="https://agentmods.dev/skills/platonai/browser4/web-scraping"><img src="https://agentmods.dev/badge/skills/platonai/browser4/web-scraping.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00048 $0.00866
Opus 5 $0.00024 $0.00433
Sonnet 5 $0.00010 $0.00173
Haiku 4.5 $0.00005 $0.00087

Measured 4d ago against content hash 4061d16de8b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

browser4-agentic/src/main/resources/skills/web-scraping/SKILL.md · 125 lines

How it starts

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

Web Scraping Skill

Description

Extract data from web pages using JavaScript and CSS selectors. This skill uses real browser automation to navigate to pages and extract content using JavaScript execution. It can extract webpage titles using document.title and body text using document.body.textContent, providing actual content from live web pages.

Dependencies

None

Parameters

Parameter Type Required Default Description
url String Yes - The URL of the web page to scrape
selector String Yes - CSS selector to target specific elements
attributes List No ["text"] List of attributes to extract (e.g., "text", "href", "src")

Return Value

Returns a SkillResult with the following data structure:

{
  "url": "string",
  "selector": "string",
  "attributes": ["string"],
  "data": "extracted content"
}

Usage Examples

Basic Text Extraction

val result = registry.execute(
    skillId = "web-scraping",
    context = context,
    params = mapOf(
        "url" to "https://example.com",
        "selector" to ".content"
    )
)

Extract Multiple Attributes

val result = registry.execute(
    skillId = "web-scraping",
    context = context,
    params = mapOf(
        "url" to "https://example.com/products",
        "selector" to "a.product-link",
        "attributes" to listOf("text", "href")
    )
)

Tool Call Specification

ToolSpec(
    domain = "skill.debug.scraping",
    method = "extract",
    arguments = [
        "url: String",
        "selector: String",
        "attributes: List<String> = listOf('text')"
    ],
    returnType = "Map<String, Any>",
    description = "Extract data from a web page using CSS selectors"
)

Error Handling

The skill returns a failure result in the following cases:

  • Missing required parameter url
  • Missing required parameter selector
  • Invalid URL format (must start with http:// or https://)

Read the full file on GitHub · 125 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 125 lines · 48 tokens per session scan A 4061d16de8b7

Subscribe to this mod's changes

web-scraping is a skill published in the GitHub repository platonai/Browser4 (1,120 stars, last pushed yesterday), licensed Apache-2.0. It adds 48 tokens to every session and 866 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-30.