Source profileQuality 90/100Review permissions

actionbook/actionbook/skills/extract/SKILL.md

extract

Extract structured data from websites and produce an executable Playwright script plus extracted data. Use when the user wants to scrape, extract, pull, collect, or harvest data from any website — product listings, tables, search results, feeds, profiles, or any repeating content.

Source repository stars
1,583
Declared platforms
0
Static risk flags
2
Last source update
2026-08-12
Source checked
2026-08-25

Decision brief

What it does: where it fits

Activate when the user wants to obtain data from a website:

Best for

  • "Extract all product prices from this page"
  • "Scrape the table of results from ..."
  • "Pull the list of authors and titles from arXiv search results"

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/actionbook/actionbook --skill "skills/extract"
Safe inspection promptEditorial

Inspect the Agent Skill "extract" from https://github.com/actionbook/actionbook/blob/5a3eb05ec18fcebc09ef771008d6dda649295765/skills/extract/SKILL.md at commit 5a3eb05ec18fcebc09ef771008d6dda649295765. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Step 1: Understand the target

    Identify from the user request: - URL — the page to extract from - Data shape — what fields / columns are needed - Scope — single page, paginated, infinite scroll, or multi-page crawl - Output format — JSON (default), CSV, or other

    URL — the page to extract fromData shape — what fields / columns are neededScope — single page, paginated, infinite scroll, or multi-page crawl
  2. 02

    Step 2: Obtain selectors and choose execution path

    Review the “Step 2: Obtain selectors and choose execution path” section in the pinned source before continuing.

    Review and apply the “Step 2: Obtain selectors and choose execution path” source section.
  3. 03

    Step 3: Probe page mechanisms and fallback only when needed

    Path A mechanism detection timing: - Run minimal probes either before final script draft or during sample validation. - Before any probe command, ensure the correct page context is open: - actionbook browser open "" (if current tab context is unknown/stale) - If probes/sample ru…

    Run minimal probes either before final script draft or during sample validation.Before any probe command, ensure the correct page context is open:actionbook browser open "" (if current tab context is unknown/stale)
  4. 04

    Step 4: Generate Playwright script

    Write a standalone Playwright script (extract.cjs) that:

    Navigates to the target URL.Waits for the correct readiness signal (not just load — see mechanisms above).Handles the detected mechanism (virtual scroll, pagination, etc.).
  5. 05

    Step 5: Execute and validate

    Run the script to confirm it works:

    Run the script to confirm it works:If validation fails, inspect the output, adjust selectors or wait strategy, and re-run.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 237

The documentation asks the agent to run terminal commands or scripts.

Mechanism probes (run when script strategy needs confirmation):

Writes files

medium · line 296

The documentation asks the agent to create, modify, or delete local files.

fs.writeFileSync('output.json', JSON.stringify(data, null, 2));

Runs scripts

medium · line 305

The documentation asks the agent to run terminal commands or scripts.

Run the script to confirm it works:

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score90/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars1,583SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
actionbook/actionbook
Skill path
skills/extract/SKILL.md
Commit
5a3eb05ec18fcebc09ef771008d6dda649295765
License
Apache-2.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

When to Use This Skill

Activate when the user wants to obtain data from a website:

  • "Extract all product prices from this page"
  • "Scrape the table of results from ..."
  • "Pull the list of authors and titles from arXiv search results"
  • "Collect all job listings from this page"
  • "Get the data from this dashboard table"
  • "Harvest review scores from ..."
  • "Download all the links/images/cards from ..."

The deliverable is always two artifacts:

  1. Executable Playwright script — a standalone .cjs file that reproduces the extraction without Actionbook at runtime.
  2. Extracted data — JSON (default), CSV, or user-specified format written to disk.

Decision Strategy

Use Actionbook as a conditional accelerator, not a mandatory step. The goal is reliable selectors in the shortest path.

User request
  │
  ├─► actionbook search "<site> <intent>"
  │     ├─ Results with Health Score ≥ 70%  ──► actionbook get "<ID>" ──► use selectors
  │     └─ No results / low score  ──► Fallback
  │
  └─► Fallback: actionbook browser open <url>
        ├─ actionbook browser snapshot   (accessibility tree → find selectors)
        ├─ actionbook browser screenshot (visual confirmation)
        └─ manual selector discovery via DOM inspection

Priority order for selector sources:

PrioritySourceWhen
1actionbook getSite is indexed, health score ≥ 70%
2actionbook browser snapshotNot indexed or selectors outdated
3DOM inspection via screenshot + snapshotComplex SPA / dynamic content

Non-negotiable rule: if search + get already provides usable selectors for required fields, start from get selectors and do not jump to full fallback (snapshot/screenshot) by default. Exception: lightweight mechanism probes (for hydration/virtualization/pagination) are allowed when runtime behavior may affect script correctness. Escalate to snapshot/screenshot only when probes/sample validation indicate selector gaps or instability.

Mechanism-Aware Script Strategy

Websites use patterns that break naive scraping. The generated Playwright script must account for these:

Streaming / SSR / RSC hydration

Pages may render a shell first, then stream or hydrate content.

// Wait for hydration to complete — not just DOMContentLoaded
await page.waitForSelector('[data-item]', { state: 'attached' });
await page.waitForFunction(() => {
  const items = document.querySelectorAll('[data-item]');
  return items.length > 0 && !document.querySelector('[data-pending]');
});

Detection cues: React root with data-reactroot, Next.js __NEXT_DATA__, empty containers that fill after JS runs. If actionbook browser text "<selector>" returns empty but the screenshot shows content, hydration hasn't completed.

Virtualized lists / virtual DOM

Only visible rows exist in the DOM. Scrolling renders new rows and destroys old ones.

// Scroll-and-collect loop for virtualized lists (scroll container aware)
const allItems = [];
const maxScrolls = 50;
let scrolls = 0;

const container = await page.$('<scroll-container-selector>');
if (!container) throw new Error('Scroll container not found');

let previousTop = await container.evaluate(el => el.scrollTop);
while (scrolls < maxScrolls) {
  const items = await page.$$eval('[data-row]', rows =>
    rows.map(r => ({ text: r.textContent.trim() }))
  );
  for (const item of items) {
    if (!allItems.find(i => i.text === item.text)) allItems.push(item);
  }

  await container.evaluate(el => el.scrollBy(0, 600));
  await page.waitForTimeout(300);

  const currentTop = await container.evaluate(el => el.scrollTop);
  if (currentTop === previousTop) break;

  previousTop = currentTop;
  scrolls += 1;
}

Detection cues: Container has fixed height with overflow: auto/scroll, row count in DOM is much smaller than stated total, rows have transform: translateY(...) or position: absolute; top: ...px.

Infinite scroll / lazy loading

New content appends when the user scrolls near the bottom.

// Scroll to bottom until no new content loads (with no-growth tolerance)
let itemCount = 0;
let noGrowthStreak = 0;
const maxScrolls = 80;
let scrolls = 0;

while (scrolls < maxScrolls && noGrowthStreak < 3) {
  await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
  await page.waitForTimeout(1200);

  const newCount = await page.$$eval('.item', els => els.length);
  if (newCount > itemCount) {
    itemCount = newCount;
    noGrowthStreak = 0;
  } else {
    noGrowthStreak += 1;
  }

  scrolls += 1;
}

Detection cues: Intersection Observer in page JS, "Load more" button, sentinel element at bottom, network requests firing on scroll.

Pagination

Multi-page results behind "Next" buttons or numbered pages.

// Click-through pagination (navigation-aware, SPA-safe)
const allData = [];
const maxPages = 50;
let pageIndex = 0;
while (pageIndex < maxPages) {
  const pageData = await page.$$eval('.result-item', items =>
    items.map(el => ({ title: el.querySelector('h3')?.textContent?.trim() }))
  );
  allData.push(...pageData);

  const nextBtn = await page.$('a.next-page:not([disabled])');
  if (!nextBtn) break;

  const previousUrl = page.url();
  const previousFirstItem = await page
    .$eval('.result-item', el => el.textContent?.trim() || '')
    .catch(() => '');

  await nextBtn.click();

  // Post-click detection only: advance must be caused by this click
  const advanced = await Promise.any([
    page
      .waitForURL(url => url.toString() !== previousUrl, { timeout: 5000 })
      .then(() => true),
    page
      .waitForFunction(
        prev => {
          const first = document.querySelector('.result-item');
          return !!first && (first.textContent || '').trim() !== prev;
        },
        previousFirstItem,
        { timeout: 5000 }
      )
      .then(() => true),
  ]).catch(() => false);

  if (!advanced) break;

  await page.waitForLoadState('networkidle').catch(() => {});
  pageIndex += 1;
}

Execution Chain

Step 1: Understand the target

Identify from the user request:

  • URL — the page to extract from
  • Data shape — what fields / columns are needed
  • Scope — single page, paginated, infinite scroll, or multi-page crawl
  • Output format — JSON (default), CSV, or other

Step 2: Obtain selectors and choose execution path

# Try Actionbook index first
actionbook search "<site> <data-description>" --domain <domain>

# If good results (health ≥ 70%), get full selectors
actionbook get "<ID>"

Use this routing strictly:

  • Path A (default when get is good): requested fields are covered by get selectors and quality is acceptable.

    • Start from get selectors and move to script draft quickly.
    • You may run lightweight mechanism probes (browser text, quick scroll checks) before finalizing script strategy.
    • Do not run full fallback (snapshot / screenshot) before first draft unless probe/sample validation shows mismatch.
    • Field mapping must default to get selectors and mark source as actionbook_get.
  • Path B (partial / unstable): get exists but required fields are missing, selector resolves 0 elements, or validation fails.

    • Run targeted fallback only for failed fields/steps.
  • Path C (no usable coverage): search/get has no usable result.

    • Run full fallback discovery.

Step 3: Probe page mechanisms and fallback only when needed

Path A mechanism detection timing:

  • Run minimal probes either before final script draft or during sample validation.
  • Before any probe command, ensure the correct page context is open:
    • actionbook browser open "<url>" (if current tab context is unknown/stale)
  • If probes/sample run indicate mismatch (missing rows, unstable selectors, wrong pagination behavior), escalate to Path B targeted fallback.

Fallback discovery by path:

Path B targeted fallback (only failed fields/steps):

actionbook browser open "<url>"     # if not already open
actionbook browser snapshot          # focus on failed field/container mapping
# actionbook browser screenshot      # optional visual confirmation for failed area

Path C full fallback (no usable coverage):

actionbook browser open "<url>"
actionbook browser snapshot
actionbook browser screenshot

Mechanism probes (run when script strategy needs confirmation):

# Hydration / streaming check
actionbook browser text "<container-selector>"

# Infinite scroll quick signal (explicit before/after decision)
actionbook browser eval "document.querySelectorAll('<item-selector>').length"   # before
actionbook browser click "<scroll-container-selector-or-body>"                    # focus scroll context
actionbook browser eval "const c=document.querySelector('<scroll-container-selector>') || document.scrollingElement; c.scrollBy(0, c.clientHeight || window.innerHeight);"
actionbook browser eval "document.querySelectorAll('<item-selector>').length"   # after
# If count increases, treat page as lazy-load/infinite-scroll.

Fallback trigger conditions:

  • actionbook get cannot map all required fields.
  • actionbook get selectors return empty/unstable values in sample run.
  • Runtime behavior conflicts with expected mechanism (e.g., virtualized container, delayed hydration).

Step 4: Generate Playwright script

Write a standalone Playwright script (extract_<domain>_<slug>.cjs) that:

  1. Navigates to the target URL.
  2. Waits for the correct readiness signal (not just load — see mechanisms above).
  3. Handles the detected mechanism (virtual scroll, pagination, etc.).
  4. Extracts data into structured objects.
  5. Writes output to disk (JSON.stringify / CSV).
  6. Closes the browser.
  7. Enforces guardrails (maxPages, maxScrolls, timeout budget) to avoid infinite loops.

Script template:

// extract_<domain>_<slug>.cjs
// Generated by Actionbook extract skill
// Usage: node extract_<domain>_<slug>.cjs

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();

  await page.goto('<URL>', { waitUntil: 'domcontentloaded' });

  // -- wait for readiness --
  await page.waitForSelector('<container>', { state: 'visible' });

  // -- extract --
  const data = await page.$$eval('<item-selector>', items =>
    items.map(el => ({
      // fields mapped from user request
    }))
  );

  // -- output --
  const fs = require('fs');
  fs.writeFileSync('output.json', JSON.stringify(data, null, 2));
  console.log(`Extracted ${data.length} items → output.json`);

  await browser.close();
})();

Step 5: Execute and validate

Run the script to confirm it works:

node extract_<domain>_<slug>.cjs

Validation rules:

CheckPass condition
Script exits 0No runtime errors
Output file existsNon-empty file written
Record count > 0At least one item extracted
No null/empty fieldsEvery declared field has a value in ≥ 90% of records
Data matches pageSpot-check first and last record against actionbook browser text

If validation fails, inspect the output, adjust selectors or wait strategy, and re-run.

Step 6: Deliver

Present to the user:

  1. Script path — the .cjs file they can re-run anytime.
  2. Data path — the output JSON/CSV file.
  3. Record count — how many items were extracted.
  4. Notes — any mechanism-specific caveats (e.g., "this site uses infinite scroll; the script scrolls up to 50 pages by default").

Output Contract

Every extract invocation produces:

ArtifactPathFormat
Playwright script./extract_<domain>_<slug>.cjsStandalone Node.js script using playwright
Extracted data./output.json (default) or user-specified pathJSON array of objects (default), CSV, or user-specified

The script must be re-runnable — a user should be able to execute it later without Actionbook installed, as long as Node.js + Playwright are available in the runtime environment.

Selector Priority

When multiple selector types are available from actionbook get:

PriorityTypeReason
1data-testidStable, test-oriented, rarely changes
2aria-labelAccessibility-driven, semantically meaningful
3CSS selectorStructural, may break on redesign
4XPathLast resort, most brittle

Error Handling

ErrorAction
actionbook search returns no resultsFall back to snapshot + screenshot
Selector returns 0 elementsRe-snapshot, compare with screenshot, update selector
Script times outAdd longer waitForTimeout, check for anti-bot measures
Partial data (some fields empty)Check if content is lazy-loaded; add scroll/wait
Anti-bot / CAPTCHAInform user; suggest running with headless: false or using their own browser session via actionbook setup extension mode

Frequently asked questions

What to verify before installation and use

What does the extract source document cover?

Activate when the user wants to obtain data from a website:

How do I install extract?

The source record exposes this install command: npx skills add https://github.com/actionbook/actionbook --skill "skills/extract". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script, write-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10014,671

prowler-cloud/prowler

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance