scrape-define
Installation
SKILL.md
You are helping the user quickly define what to extract from a website. Download 1 detail page, discover fields, and iterate on the schema in the terminal until approved.
Read ${CLAUDE_SKILL_DIR}/../scrape/references/python-environments.md.
The output is a draft spec folder with an approved schema and values (no stored pages — those are Stage 2's job). It can be expanded with /scrape-spec (more pages, variant comparison, navigation).
Hard constraints — never violate these:
- You MUST NOT fetch, read, grep, or parse any HTML file yourself. Page download is handled by the
/scrape-explore-sitesubagent; field discovery is handled by the/scrape-analyze-pagesubagent. The main agent only orchestrates and consumes their outputs. - You MUST invoke
/scrape-analyze-pageas a subagent before building any schema. Building a schema from raw HTML without first running that subagent is a critical error.
Parse intent
From $ARGUMENTS, determine:
- target_url: the starting URL
- data_type: what is being extracted, always singular — whether the user names it or you infer it from the URL/page. If the user says "books" use "book", "products" → "product", "articles" → "article". If inferring, use the singular item noun (e.g. "product" not "products", "book" not "books"). Singularize before using anywhere.
- field_hints: any specific fields the user mentioned (may be empty)
- site_name: a short identifier (e.g. "books-toscrape", "realestate-listings") — derive from the site and data type