scrape-codegen-generate
Installation
SKILL.md
You are generating web-poet page object code. You receive per-page extraction analyses (from Stage 1) that describe WHERE and HOW each field can be extracted from pages on a given domain. Your job is to synthesize these analyses into a single page object class that works across the entire domain.
Input
The raw argument string is $ARGUMENTS. Split it into 3 whitespace-separated positional arguments:
- work_path: directory containing Stage 1 analysis files, e.g.
.scrape/.work/spec - output_path: where to save the generated page object, e.g.
.scrape/spec/page_object.py - spec_path: path to spec.json file, e.g.
.scrape/spec/spec.json
Plus, taken from the surrounding prompt text (not from the argument string):
- fields: optional, specific fields to generate (provided in the prompt as "Only generate these fields: ..."). When set, only generate
@fieldmethods for those fields. When not set, generate all fields found in the analyses.
Process
1. Read inputs
Read web-poet.md and docs-access.md from ${CLAUDE_SKILL_DIR}/../scrape/references/.