Agent skill

Web Scraping

by platonai in platonai/Browser4

Extracts data from web pages using browser automation and CSS/JavaScript selectors.

Apache-2.0Auto-check passedData & Analytics

Install Web Scraping

skills CLI
$ npx skills add platonai/Browser4 --skill web-scraping -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install platonai/Browser4 web-scraping --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/platonai/Browser4.git skills-src && mkdir -p .claude/skills && cp -r skills-src/browser4-agentic/src/main/resources/skills/web-scraping .claude/skills/web-scraping && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
web-scraping
GitHub stars
1.2k
Token cost
~1.1k tokens
SKILL.md length
412 words
Files
5 (incl. scripts, references, assets)
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Extracts data from web pages using browser automation and CSS/JavaScript selectors.

  • You need to scrape titles/text/structured fields from live web pages
  • SKILL.md covers Description, Dependencies, Parameters and Return Value, plus 6 more sections
  • The user mentions scraping

What it does

Web Scraping is an agent skill from platonai/Browser4. Extracts data from web pages using browser automation and CSS/JavaScript selectors. Use when you need to scrape titles/text/structured fields from live web pages or when the user mentions scraping, extraction, or selectors.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/config.json`, `assets/selectors-template.md` and `references/developer-guide.md`).

It sits in Data & Analytics, covering Web scraping and Browser automation. It works with JavaScript. The repository describes itself as: Browser4 — an AI-native browser engine for autonomous agents, intelligent extraction, and large-scale web automation. The licence is Apache-2.0.

When your agent uses it

  • You need to scrape titles/text/structured fields from live web pages
  • The user mentions scraping

Example prompts

  • “Use the web-scraping skill to extract data from web pages using browser automation and CSS/JavaScript selectors”
  • “/web-scraping”

What it can do on your machine

Read from SKILL.md and the folder at commit 0fdba82. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Web Scraping loads about 1.1k tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from platonai/Browser4 at commit 0fdba82, republished under its Apache-2.0 licence (© platonai). 412 words, ~1,121 tokens.

Download SKILL.mdSave it as .claude/skills/web-scraping/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
web-scraping
description
Extracts data from web pages using browser automation and CSS/JavaScript selectors. Use when you need to scrape titles/text/structured fields from live web pages or when the user mentions scraping, extraction, or selectors.
metadata.displayName
Web Scraping
metadata.version
1.0.0
metadata.author
Browser4
metadata.tags
scraping, extraction, web

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

ParameterTypeRequiredDefaultDescription
urlStringYes-The URL of the web page to scrape
selectorStringYes-CSS selector to target specific elements
attributesList<String>No["text"]List of attributes to extract (e.g., "text", "href", "src")

Return Value

Returns a SkillResult with the following data structure:

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

Usage Examples

Basic Text Extraction
kotlin
val result = registry.execute(
    skillId = "web-scraping",
    context = context,
    params = mapOf(
        "url" to "https://example.com",
        "selector" to ".content"
    )
)
Extract Multiple Attributes
kotlin
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

kotlin
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://)

Lifecycle Hooks

onLoad

Initializes resources and loads configurations when the skill is registered.

onBeforeExecute

Validates URL format before execution. Returns false if URL doesn't start with http:// or https://.

onAfterExecute

Records the timestamp of successful scraping operations in shared resources.

validate

Validates skill configuration and environment. Always returns true for this skill.

Show full SKILL.md (220 more words)Show less

Implementation Notes

  • Headless mode is the default for AI agents: Always open browsers in headless mode unless the user explicitly requests a visible browser window (e.g., "show me the browser", "open visibly", "headed"). Headless mode is faster, uses fewer resources, and avoids unnecessary GUI windows. If user participation in the page interaction is required — e.g., logging in or entering a verification code (CAPTCHA) — open a headed browser so the user can see and act on the page. Also open headed as a one-shot escalation when the site blocks the headless browser as a bot (CAPTCHA/challenge/interstitial page, "unusual traffic", or an empty body where content was expected): close, then open --headed <url> with the same session and retry once, telling the user that anti-bot protection forced the switch. If the headed retry is blocked too, stop and report instead of looping.
  • Uses JavaScript execution via WebDriver.evaluate() to extract real webpage content
  • Extracts document title using document.title
  • Extracts page text using document.body.textContent
  • Falls back to PulsarSession-based extraction if WebDriver is not directly available
  • Returns simulated data only if neither WebDriver nor PulsarSession is available in the skill context
  • Supports both synchronous and asynchronous execution patterns
  • Thread-safe and can be used in concurrent environments
  • Text content is limited to 5000 characters to avoid overwhelming responses

See Also

© platonai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references, assets) in browser4-agentic/src/main/resources/skills/web-scraping of platonai/Browser4.

  • SKILL.md
  • assets/config.json
  • assets/selectors-template.md
  • references/developer-guide.md
  • scripts/example-usage.kts

Open the folder on GitHubat commit 0fdba82

Compare with similar skills

Web Scraping next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Web Scraping compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Web Scraping this skillplatonai/Browser41.2k—~1.1kAutomated safety check: PassApache-2.0
Chrome Devtoolseinverne/dotfiles1212 repos~1.6kAutomated safety check: NotesApache-2.0
Capterra Data Extractionbrowsing-skills/browsing-skills116—~532Automated safety check: PassMIT
Bdgszymdzum/browser-debugger-cli161—~2.3kAutomated safety check: NotesMIT
Anti Detect Browserantibrow/anti-detect-browser-skills932—~9.8kAutomated safety check: WarnMIT
Control Browserzai-org/ZCode7.5k—~4.6kAutomated safety check: PassApache-2.0

Similar skills

  • Chrome Devtools

    einverne/dotfiles

    Browser automation, debugging, and performance analysis using Puppeteer CLI scripts.

    121 GitHub starsUsed in 2 repos~1.6k tokens
    Data & AnalyticsAuto-check: notes
  • Capterra Data Extraction

    browsing-skills/browsing-skills

    Extracts software product ratings, pricing and written user reviews from Capterra pages with a real browser, since the site has no public API.

    116 GitHub stars~532 tokensUpdated 4 mo ago
    Data & AnalyticsAuto-check passed
  • Bdg

    szymdzum/browser-debugger-cli

    Use bdg CLI to drive and debug a real Chrome via Chrome DevTools Protocol - navigate, click, fill and submit forms, check what an action changed (navigation, new messages, pending requests), inspect…

    161 GitHub stars~2.3k tokensUpdated yesterday
    Frontend & DesignAuto-check: notes
  • Anti Detect Browser

    antibrow/anti-detect-browser-skills

    Drive Chromium from standard Playwright APIs with a real-device fingerprint applied in the kernel, one persistent isolated profile per identity, and a per-profile proxy whose exit IP sets timezone…

    932 GitHub stars~9.8k tokensUpdated 1 mo ago
    Testing & QAAuto-check: warnings
  • Control Browser

    zai-org/ZCode

    A skill your agent uses when opening, navigating, inspecting, testing, clicking, typing, filling, screenshotting, or verifying web pages and local HTTP targets (localhost, 127.0.0.1, ::1) inside…

    7.5k GitHub stars~4.6k tokensUpdated 9 days ago
    Productivity & AutomationAuto-check passed
  • Agent Browser

    oxylabs/agent-skills

    Connects to Oxylabs remote agent browsers over the Chrome DevTools Protocol (CDP) with Playwright or Puppeteer.

    875 GitHub stars~3k tokensUpdated 8 days ago
    Productivity & AutomationAuto-check passed

More from platonai/Browser4

All 17 skills in this repo
  • Data Validation

    platonai/Browser4

    Validates data against common and custom rules (required fields, formats, ranges).

    1.2k GitHub stars~896 tokensUpdated yesterday
    Auto-check passed
  • Form Filling

    platonai/Browser4

    Automatically fills web forms using provided field data and can optionally submit the form.

    1.2k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Organize Task Files

    platonai/Browser4

    Lists, pairs, deduplicates, and moves task files across the Coworker task state machine (0draft → 6git-pushed).

    1.2k GitHub stars~801 tokensUpdated yesterday
    Auto-check passed
  • Task Token Usage

    platonai/Browser4

    Analyzes Claude Code session traces (JSONL) and draft task files to report token usage per task.

    1.2k GitHub stars~701 tokensUpdated yesterday
    Auto-check passed
  • Weather

    platonai/Browser4

    Fetches current weather conditions and a 7-day forecast for a requested location using Open-Meteo geocoding and forecast APIs.

    1.2k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Browser4 Plugin

    platonai/Browser4

    Guides the creation of Browser4 plugins from requirements gathering through deployment.

    1.2k GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Web Scraping

What does Web Scraping do?

Extracts data from web pages using browser automation and CSS/JavaScript selectors. Web Scraping is an agent skill from platonai/Browser4. Extracts data from web pages using browser automation and CSS/JavaScript selectors.

When should I use Web Scraping?

Web Scraping fits situations like: you need to scrape titles/text/structured fields from live web pages; the user mentions scraping.

How do I install Web Scraping in Claude Code?

Run `npx skills add platonai/Browser4 --skill web-scraping -a claude-code`. Or copy the skill folder (browser4-agentic/src/main/resources/skills/web-scraping in platonai/Browser4) into .claude/skills/web-scraping in your project. Claude Code loads it when a task matches its description.

How do I install Web Scraping in Codex?

Run `npx skills add platonai/Browser4 --skill web-scraping -a codex`. Or copy the skill folder (browser4-agentic/src/main/resources/skills/web-scraping in platonai/Browser4) into .agents/skills/web-scraping in your project. Codex loads it when a task matches its description.

Can I use Web Scraping in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add platonai/Browser4 --skill web-scraping -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/web-scraping, .gemini/skills/web-scraping, .github/skills/web-scraping and .opencode/skills/web-scraping in your project.

What does Web Scraping need to run?

SKILL.md names no scripts, command-line tools or credentials: Web Scraping is instructions for the agent only.

Does Web Scraping access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Web Scraping safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Web Scraping use?

Web Scraping is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Web Scraping use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Web Scraping?

Skills that share tags, products or a category with Web Scraping: Chrome Devtools (einverne/dotfiles, 121 stars), Capterra Data Extraction (browsing-skills/browsing-skills, 116 stars), Bdg (szymdzum/browser-debugger-cli, 161 stars) and Anti Detect Browser (antibrow/anti-detect-browser-skills, 932 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Web Scraping?

platonai (a GitHub user) maintains it in platonai/Browser4, which has 1,152 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 7, 2026.

Source: platonai/Browser4 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.