# Extract

Extract structured data from websites and produce an executable Playwright script plus...

- Repository: https://github.com/actionbook/actionbook (1623 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-10-19
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add actionbook/actionbook --skill extract -g -a claude-code -y`
Codex: `npx skills add actionbook/actionbook --skill extract -g -a codex -y`
Cursor: `npx skills add actionbook/actionbook --skill extract -g -a cursor -y`
Gemini CLI: `npx skills add actionbook/actionbook --skill extract -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add actionbook/actionbook`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## 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:**

| Priority | Source | When |
|----------|--------|------|
| 1 | `actionbook get` | Site is indexed, health score ≥ 70% |
| 2 | `actionbook browser snapshot` | Not indexed or selectors outdated |
| 3 | DOM inspection via screenshot + snapshot | Complex SPA / dynamic content |

The rest: https://github.com/actionbook/actionbook/blob/HEAD/skills/extract/SKILL.md
