with one click
scrape-add-page-object
Add an empty web-poet page object to a Scrapy project
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Add an empty web-poet page object to a Scrapy project
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Extract structured data (all available fields with values) from a page saved locally as an HTML file, optionally following a schema. Use this skill only to process already downloaded files. Do not invoke when the user provides a URL. When invoking, pass the user's full request verbatim as args — do not pre-parse file paths and don't rephrase it.
Analyze an HTML page to produce field extraction instructions for code generation
Generate web-poet page object code from per-page extraction analyses
Generate web-poet page object code from an extraction spec
Generate a Scrapy spider that wires page objects together
Create a new extraction spec from a URL — explore a detail page, discover fields, quick schema approval
| name | scrape-add-page-object |
| description | Add an empty web-poet page object to a Scrapy project |
| argument-hint | [file-path] [class-name] [domain] [base-class] [item-class] |
| allowed-tools | Bash, Read, Write |
You are adding an empty web-poet page object to a Scrapy project.
Read ${CLAUDE_SKILL_DIR}/../scrape/references/python-environments.md.
The raw argument string is $ARGUMENTS. Split it into up to 6 whitespace-separated positional arguments:
books_project/pages/books_toscrape_com.py)ProductPage)@handle_urls (e.g. books.toscrape.com)web_poet.WebPage)books_project.items.ProductItem)name,price,rating)Run from the project root (the directory containing pyproject.toml) so the item
class is importable for auto-detecting required fields:
uv run --project . --with libcst ${CLAUDE_SKILL_DIR}/scripts/add_page_object.py \
FILE_PATH CLASS_NAME DOMAIN BASE_CLASS ITEM_CLASS
Required fields (those with no default in the item class) are detected automatically
via itemadapter and get @field stubs. If all fields have defaults the class body is
pass. Pass --fields name,price to override auto-detection.
The script uses libcst for correct AST manipulation:
ProductPage and CategoryPage)Common base classes:
web_poet.WebPage — for pages using HTTP responses (most common)