scraper-recipe

A recipe for creating complete Bxc web scrapers from a URL, a description of the data to collect, and optional settings. Bxc is a browser library; Zod checks that extracted data matches a defined shape, and JSONL stores one JSON record per line.

In plain words
What is it for?
Creating a one-off scraper in `examples/` or a reusable package in `packages/`, such as extracting product titles, prices, and stock from web pages.
Why use it?
It removes the need to assemble browser navigation, CSS or Markdown extraction, validation, and output handling by hand. It also documents the actual Bxc API so the generated scraper uses supported calls.

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/aphrody-code/bxc/scraper-recipe
Any agent
npx skills add aphrody-code/bxc --skill scraper-recipe
Clone the repo
git clone --depth 1 https://github.com/aphrody-code/bxc

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,096 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.00066 $0.01096
Opus 5 $0.00033 $0.00548
Sonnet 5 $0.00013 $0.00219
Haiku 4.5 $0.00007 $0.00110

Measured 2d ago against content hash dc4b76d3636c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scraper-recipe 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 2d 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.

.claude/skills/scraper-recipe/SKILL.md · 103 lines

How it starts

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

Bxc scraper recipe

Quand invoquée via /scraper-recipe, cette skill produit un fichier scraper complet à partir des inputs suivants :

  • URL ou pattern d'URL (obligatoire)
  • Schéma cible (description naturelle, ex : "titre + prix EUR + stock")
  • Profil souhaité (optionnel, défaut = static)
  • Mode (one-shot dans examples/<name>.ts, ou sub-package dans packages/<name>/src/)

API réelle (0.4.0)

L'API publique est Browser.newPage()page.*page.close(). Il n'existe pas de Browser.fetch() ni Browser.scrape(). La feature LLM-extract a été supprimée — l'extraction se fait par sélecteurs CSS (page.$$) ou Markdown (page.markdown()), puis Zod.parse().

import { Browser } from "@aphrody/bxc";          // singleton
import { googleSearchRich } from "@aphrody/bxc/google"; // si recherche

Surface page utile : goto(url,{timeoutMs}), content() (HTML), markdown() (GFM, fallback JS si cdylib absente), $(sel)/$$(sel) (handles → .textContent() /.getAttribute(name)), title(), screenshot(), evaluate(fn) (profils JS), close().

Workflow

  1. Lis le contexte :

    • src/api/browser.tsBrowser.newPage(opts) + classe Page (API ci-dessus)
    • src/api/browser.ts (PageOptions) — profils valides : static | http | fast | stealth | max
    • src/storage/Dataset.ts — store JSONL interne (Dataset non exporté du package : import relatif ou JSONL manuel)
  2. Décide l'extraction :

    • HTML structuré + sélecteurs CSS suffisent → page.$$() + Zod.parse()
    • Contenu prose / page entière → page.markdown()
  3. Génère le fichier avec ce template :

import { z } from "zod";
import { Browser } from "@aphrody/bxc";

const Schema = z.object({
  // ... champs selon la demande utilisateur
  title: z.string(),
});
type Item = z.infer<typeof Schema>;

async function scrape(url: string): Promise<Item> {
  const page = await Browser.newPage({ profile: "static" }); // static|http|fast|stealth|max
  try {
    await page.goto(url, { timeoutMs: 30_000 });
    const titleEl = await page.$("h1");
    const raw = {
      title: (await titleEl?.textContent()) ?? "",
      // ... autres champs via page.$$/$ ou page.markdown()
    };
    return Schema.parse(raw);
  } finally {
    await page.close();
  }
}

const urls = [/* ... */];
const out = Bun.file("dataset.jsonl").writer();
try {
  for (const url of urls) {
    try {
      const item = await scrape(url);
      out.write(JSON.stringify(item) + "\n");
      console.log(`OK ${url}`);
    } catch (err) {
      console.error(`FAIL ${url}`, err);
    }
  }
} finally {
  await out.end();
  await Browser.close();
}

Read the full file on GitHub · 103 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. 2d ago First seen · 103 lines · 66 tokens per session scan A dc4b76d3636c

Subscribe to this mod's changes

scraper-recipe is a skill published in the GitHub repository aphrody-code/bxc (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,096 once invoked, about $0.0003 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

obscura

Operate and validate Obscura for JavaScript page loading, stealth browsing, anti-fingerprinting, tracker blocking, screenshots and visual comparison, CDP automation with Puppeteer or Playwright, screencasting, PDF export, MCP browser interaction, and web extraction. Use when running Obscura against deterministic…

h4ckf0r0day/obscura · 100 tokens

pinchtab

Use this skill when a task needs browser automation through PinchTab: open a website, inspect interactive elements, click through flows, fill out forms, scrape page text, reuse a dedicated automation profile with user approval, export screenshots or PDFs, manage multiple browser instances, or fall back to the HTTP API…

pinchtab/pinchtab · 94 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

pinchtab-stealth-score

Run the PinchTab stealth-score sweep against 15 bot-detection / fingerprint sites (sannysoft, rebrowser, deviceandbrowserinfo, iphey, whoer, browserscan, pixelscan, fingerprint-scan, incolumitas, fvision, amiunique, browserleaks, creepjs, coveryourtracks, fingerprint-demo). Starts a Docker PinchTab container per…

pinchtab/pinchtab · 168 tokens

browser-use-terminal

Direct browser control via the Browser Use Terminal CLI. Use when the user wants to automate, scrape, test, or interact with web pages — you drive the browser yourself with Python helpers.

browser-use/terminal · 41 tokens

unicli

Comprehensive guide to Uni-CLI — the open Agent-Computer Interface runtime for real software. Trigger when the user needs to fetch data from websites (Twitter, Bilibili, HackerNews, GitHub, Reddit, Bloomberg, Zhihu, WeChat, and hundreds more); interact with news, finance, social, academic, shopping, or video…

olo-dot-io/Uni-CLI · 180 tokens