Token导航 LogoToken导航

Agent Skill · 研究检索

scraper-builder(刮板建造者)

scraper-builder 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

scraper-builder 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 18,236。

总安装 6,193周安装 253GitHub Stars 69下载 2,004核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:scraper-builder(刮板建造者)
来源仓库:https://github.com/jwynia/agent-skills
仓库路径:skills/scraper-builder
安装命令:
npx skills add https://github.com/jwynia/agent-skills --skill scraper-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jwynia/agent-skills --skill scraper-builder

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于处理浏览器自动化、网页检查和页面信息提取。适合让 Agent 打开页面、读取网页或验证前端流程。可通过 npx skills add 命令从指定 GitHub 仓库安装使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。

scraper-builder 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/scraper-builder

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jwynia/agent-skills --skill scraper-builder;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

scraper-builder 怎么安装?

在终端执行 npx skills add https://github.com/jwynia/agent-skills --skill scraper-builder。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

scraper-builder 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

scraper-builder 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

scraper-builder 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

scraper-builder 用的人多吗?

公开数据是累计安装 6,193 次,近一周安装 253 次,下载 2,004 次,GitHub 69 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

scraper-builder 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
scraper-builder

刮板建造者 · 本页

6,19369操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Scraper Builder

Generate complete, runnable web scraper projects using the PageObject pattern with Playwright and TypeScript. This skill produces site-specific scrapers with typed data extraction, Docker deployment, and optional agent-browser integration for automated site analysis.

When to Use This Skill

Use this skill when:

  • Building a site-specific web scraper for data extraction
  • Generating PageObject classes for a target website
  • Scaffolding a complete scraper project with Docker support
  • Using agent-browser to analyze a site and auto-generate selectors
  • Creating reusable scraping components (pagination, data tables)

Do NOT use this skill when:

  • Building API clients (use HTTP client libraries directly)
  • Writing QA/E2E test suites (use Playwright test runner with test-focused patterns)
  • Mass crawling or spidering entire domains (use Crawlee or Scrapy)
  • Scraping sites that require authentication bypass or CAPTCHA solving

Core Principles

1. PageObject Encapsulation

Each page on the target site maps to one PageObject class. Locators are defined in the constructor, and scraping logic lives in methods. Page objects never contain assertions or business logic — they extract and return data.

2. Selector Resilience

Prefer selectors in this order: data-testid > id > semantic HTML (role, aria-label) > structured CSS classes > text content. Avoid positional selectors (nth-child) and layout-dependent paths. See references/playwright-selectors.md for the full hierarchy.

3. Composition Over Inheritance

Reusable UI patterns (pagination, data tables, search bars) are modeled as component classes that page objects compose via properties. Only BasePage uses inheritance — everything else composes.

4. Typed Data Extraction

All scraped data flows through Zod schemas for validation. This catches selector drift (when a site changes its markup) at extraction time rather than downstream. See assets/templates/data-schema.ts.md.

5. Docker-First Deployment

Generated projects include a Dockerfile using Microsoft's official Playwright images and a docker-compose.yml with volume mounts for output data and debug screenshots. This ensures consistent browser environments across machines.

Generation Modes

Mode 1: Agent-Browser Analysis

Use agent-browser to navigate the target site, capture accessibility tree snapshots, and automatically discover selectors. This is the preferred mode when the agent has access to the agent-browser CLI.

Prerequisites: If agent-browser is not already installed, add it as a skill first:

npx skills add vercel-labs/agent-browser

Workflow:

# 1. Open the target page
agent-browser open https://example.com/products

# 2. Capture interactive snapshot with element references
agent-browser snapshot -i --json > snapshot.json

# 3. Capture scoped sections for focused analysis
agent-browser snapshot -i --json -s "main" > main-content.json
agent-browser snapshot -i --json -s "nav" > navigation.json

# 4. Test dynamic behavior (pagination, load-more)
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i --json > after-click.json

# 5. Close when done
agent-browser close

What the agent does with snapshots:

  1. Parse element references (@e1, @e2, etc.) and their roles
  2. Group elements by semantic purpose (navigation, data display, forms, actions)
  3. Map data elements to fields (title, price, image, etc.)
  4. Generate PageObject classes with discovered selectors
  5. Identify pagination and dynamic loading patterns

See references/agent-browser-workflow.md for the complete workflow reference.

Mode 2: Manual Description

The user describes the target site's page structure and the agent maps it to page objects. The agent asks structured questions:

  1. What pages to scrape? — List of URLs or page types
  2. What data to extract? — Field names and expected types per page
  3. How is data paginated? — Numbered pages, load-more, infinite scroll, or single page
  4. What selectors are known? — Any CSS selectors, data-testid values, or XPath the user already knows

The agent then:

  • Matches the description to a site archetype from data/site-archetypes.json
  • Proposes a page object map with class names and responsibilities
  • Generates code after the user confirms the plan

Mode 3: Full Project Scaffold

Generate a complete runnable project in one operation using the scaffolder script:

deno run --allow-read --allow-write scripts/scaffold-scraper-project.ts \
  --name "my-scraper" \
  --url "https://example.com" \
  --pages "ProductListing,ProductDetail" \
  --fields "title,price,image_url,description"

This produces a project with all source files, configuration, Docker setup, and an entry point ready to run. See the Scripts Reference section for full options.

Quick Reference

CategoryApproachDetails
FrameworkPlaywrightplaywright package, not @playwright/test
LanguageTypeScriptStrict mode, ES2022 target
PatternPageObjectOne class per page, compose components
SelectorsResilientdata-testid > id > role > CSS class > text
Wait strategyAuto-waitPlaywright built-in, plus networkidle for navigation
ValidationZodSchema per page object's output type
OutputJSON + CSVConfigurable via storage utility
DockerOfficial imagemcr.microsoft.com/playwright:v1.48.0-jammy
RetryExponential backoff3 attempts default, configurable
ScreenshotsOn errorSaved to screenshots/ for debugging

Generation Process

Follow this sequence when generating a scraper:

Step 1: Gather Requirements

Ask the user for:

  • Target site URL(s)
  • Data fields to extract
  • Number of pages/items expected
  • Output format preference (JSON, CSV, both)
  • Whether Docker deployment is needed

Step 2: Analyze the Site

Use Mode 1 (agent-browser) or Mode 2 (manual description) to understand:

  • Page structure and navigation flow
  • Data element locations and selector strategies
  • Pagination or infinite scroll patterns
  • Dynamic content loading behavior

Step 3: Design the Page Object Map

Create a plan listing:

  • Each PageObject class and its URL pattern
  • Component classes needed (Pagination, DataTable, etc.)
  • Data schema fields and types per page
  • The scraper's navigation flow between pages

Step 4: Present the Plan

Show the user the page object map before generating code. Include class names, field names, and the execution flow. Wait for confirmation.

Step 5: Generate Code

Use the templates in assets/templates/ as the foundation:

  • base-page.ts.md — BasePage abstract class
  • page-object.ts.md — Site-specific page object
  • component.ts.md — Reusable components
  • scraper-runner.ts.md — Orchestrator
  • data-schema.ts.md — Zod validation schemas

Step 6: Deliver

Provide the complete project with:

  • All source files
  • Configuration files from assets/configs/
  • A README explaining how to run it
  • Docker setup (unless explicitly excluded)

Code Patterns

BasePage

Abstract class providing navigate(), waitForPageLoad(), screenshot(), and getText() helpers. All page objects extend this.

export abstract class BasePage {
  constructor(protected readonly page: Page) {}
  async navigate(url: string): Promise<void> { /* ... */ }
  async screenshot(name: string): Promise<void> { /* ... */ }
}

See: assets/templates/base-page.ts.md

PageObject

Site-specific class with locators as readonly properties, scrape methods returning typed data, and navigation methods for multi-page flows.

export class ProductListingPage extends BasePage {
  readonly productCards: Locator;
  readonly nextButton: Locator;
  async scrapeProducts(): Promise<Product[]> { /* ... */ }
  async goToNextPage(): Promise<boolean> { /* ... */ }
}

See: assets/templates/page-object.ts.md

Component

Reusable UI pattern (Pagination, DataTable) that receives a parent locator scope and provides extraction methods.

export class Pagination {
  constructor(private page: Page, private scope: Locator) {}
  async hasNextPage(): Promise<boolean> { /* ... */ }
  async goToNext(): Promise<void> { /* ... */ }
}

See: assets/templates/component.ts.md

ScraperRunner

Orchestrator that launches the browser, creates page objects, iterates through pages, collects data, validates with schemas, and writes output.

export class SiteScraper {
  async run(): Promise<void> {
    const browser = await chromium.launch();
    const page = await browser.newPage();
    // navigate, scrape, validate, write
  }
}

See: assets/templates/scraper-runner.ts.md

DataSchema

Zod schemas that validate scraped records, catching selector drift and malformed data at extraction time.

export const ProductSchema = z.object({
  title: z.string().min(1),
  price: z.number().positive(),
});

See: assets/templates/data-schema.ts.md

Anti-Patterns

Anti-PatternProblemSolution
Monolith ScraperAll scraping logic in one fileSplit into PageObject classes per page
Sleep WaiterUsing setTimeout/fixed delaysUse Playwright auto-wait and networkidle
Unvalidated PipelineNo schema validation on outputAdd Zod schemas for every data type
Selector LotteryFragile positional selectorsUse resilient selector hierarchy
Silent FailureSwallowing errors without loggingLog failures and save debug screenshots
Unthrottled CrawlerNo delay between requestsAdd configurable request delays
Hardcoded ConfigURLs and selectors in codeUse environment variables and config files
No Retry LogicSingle attempt per requestImplement exponential backoff

See references/anti-patterns.md for the extended catalog with examples and fixes.

Scripts Reference

scaffold-scraper-project.ts

Generate a complete scraper project:

deno run --allow-read --allow-write scripts/scaffold-scraper-project.ts [options]

Options:
  --name <name>       Project name (required)
  --path <path>       Target directory (default: ./)
  --url <url>         Target site base URL
  --pages <pages>     Comma-separated page names (e.g., ProductListing,ProductDetail)
  --fields <fields>   Comma-separated data fields (e.g., title,price,rating)
  --no-docker         Skip Docker setup
  --no-validation     Skip Zod validation setup
  --json              Output as JSON
  -h, --help          Show help

Examples:
  # Scaffold a product scraper
  deno run --allow-read --allow-write scripts/scaffold-scraper-project.ts \
    --name "shop-scraper" --url "https://shop.example.com" \
    --pages "ProductListing,ProductDetail" --fields "title,price,image_url"

  # Minimal scraper without Docker
  deno run --allow-read --allow-write scripts/scaffold-scraper-project.ts \
    --name "blog-scraper" --no-docker

generate-page-object.ts

Generate a single PageObject class for an existing project:

deno run --allow-read --allow-write scripts/generate-page-object.ts [options]

Options:
  --name <name>           Class name (required)
  --url <url>             Page URL (for documentation comment)
  --fields <fields>       Comma-separated data fields
  --selectors <json>      JSON map of field to selector
  --with-pagination       Include pagination methods
  --output <path>         Output file path (default: stdout)
  --json                  Output as JSON
  -h, --help              Show help

Examples:
  # Generate a page object with known selectors
  deno run --allow-read --allow-write scripts/generate-page-object.ts \
    --name "ProductListing" --url "https://shop.example.com/products" \
    --fields "title,price,rating" \
    --selectors '{"title":".product-title","price":".product-price","rating":".star-rating"}' \
    --with-pagination --output src/pages/ProductListingPage.ts

  # Quick generation to stdout
  deno run --allow-read scripts/generate-page-object.ts \
    --name "SearchResults" --fields "title,url,snippet"

Templates & References

Templates (assets/templates/)

TemplatePurpose
base-page.ts.mdAbstract BasePage with navigation, screenshots, text helpers
page-object.ts.mdSite-specific page object with locators and scrape methods
component.ts.mdReusable components: Pagination, DataTable
scraper-runner.ts.mdOrchestrator: browser launch, iteration, collection, output
data-schema.ts.mdZod schemas for scraped data validation

Configs (assets/configs/)

ConfigPurpose
dockerfile.mdMulti-stage Dockerfile using official Playwright image
docker-compose.yml.mdService with data/screenshots volume mounts
tsconfig.json.mdStrict TypeScript with ES2022 target
package.json.mdplaywright, zod, tsx dependencies
playwright.config.ts.mdScraper-focused Playwright configuration

References (references/)

ReferencePurpose
pageobject-pattern.mdPageObject pattern adapted for scraping
playwright-selectors.mdSelector strategies and resilience hierarchy
docker-setup.mdDocker configuration and deployment
agent-browser-workflow.mdAgent-browser analysis workflow
anti-patterns.mdExtended anti-pattern catalog

Examples (assets/examples/)

ExamplePurpose
ecommerce-scraper.mdComplete multi-page product scraper walkthrough
multi-page-pagination.mdPagination handling strategies

Data Files (data/)

FilePurpose
selector-patterns.jsonCommon selectors organized by UI element type
site-archetypes.jsonWebsite structure archetypes with typical pages and fields

Example Interaction

User: "I need a scraper for an online bookstore. I want to get book titles, authors, prices, and ratings from the catalog pages."

Agent workflow:

  1. Checks site-archetypes.json — matches ecommerce archetype
  2. Proposes page object map:

- BookListingPage — catalog with pagination - BookDetailPage — individual book page (if detail scraping needed) - Pagination component — shared pagination handler

  1. Presents the plan with field mapping:

- title → [itemprop="name"] or .book-title - author → [itemprop="author"] or .book-author - price → [itemprop="price"] or .price - rating → .star-rating or [data-rating]

  1. After confirmation, generates using the scaffold script or manual code generation
  2. Delivers project with Docker setup and Zod schemas for Book type

Integration

This skill connects to:

  • typescript-best-practices — TypeScript coding patterns used in generated code
  • devcontainer — Development container setup for the generated project
  • agent-browser — Site analysis and selector discovery (external tool)

What You Do NOT Do

This skill does NOT:

  • Bypass authentication or login walls
  • Solve CAPTCHAs or bot detection
  • Generate JavaScript-only output (always TypeScript)
  • Produce crawlers that spider entire domains
  • Create scrapers that violate robots.txt
  • Handle rate-limited APIs (use HTTP clients for API work)
  • Generate test suites (use Playwright test patterns for QA)

平台分布

Codex

38.38%
按下载量换算769

Claude

29.79%
按下载量换算597

Cursor

19.2%
按下载量换算385

Gemini CLI

8.94%
按下载量换算179

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills