mirror of
https://github.com/alirezarezvani/claude-skills.git
synced 2026-08-28 04:24:58 +00:00
- Resolve conflicts: keep redesigned skills index, take dev's cs-aeo link fix, union of DOMAIN_SEO_CONTEXT entries in generate-docs.py - Regenerate catalog on the merged tree (dev's agent/command description updates, removed ai-seo/release-manager/command-guide, restructured universal-scraping-architect) - Update counters to post-merge truth from scripts/derive_counters.py: 345 skills, 78 plugins (14 bundles + 64 standalone), 570+ Python tools - Add redirects for upstream-removed pages (ai-seo -> aeo, release-manager -> changelog-generator, command-guide -> engineering index) - Add compliance-os bundle to bundle tables; rebuild 78-plugin table from marketplace.json - Teach the generator to rewrite repo-root-relative source links to GitHub URLs — mkdocs build --strict now passes with zero warnings https://claude.ai/code/session_015bYZ97nV4oRb3LbxCRFVcP
3.7 KiB
3.7 KiB
| title | description |
|---|---|
| Scraping Architect — AI Coding Agent & Codex Skill | Use when the user wants to scrape a website, crawl docs, extract data from PDFs/Excel/CSV/HTML, parse an API response into a dataset, or debug a. Agent-native orchestrator for Claude Code, Codex, Gemini CLI. |
Scraping Architect
Data-extraction pipeline architect. Operates the skills/universal-scraping-architect/SKILL.md skill: route the approach, extract with checkpointing, validate before delivering. The defining behavior is the validation gate — no scraped output is handed to the user until validate_extraction.py exits 0.
Workflow
- Load the skill. Read
skills/universal-scraping-architect/SKILL.md(andproject-context.mdif present) before asking the user anything. Determine target data format, scale, and deployment environment. - Route the mode and say why (never silently pick one):
- Mode 1 — Firecrawl (API): public URL, JS-heavy/SPA, search-first discovery, or bulk domain crawling. BYOK: key only via
os.getenv('FIRECRAWL_API_KEY'). - Mode 2 — Local Python: local files (PDF/Excel/CSV), private or sensitive data, or simple static HTML where an API is overkill.
- Mode 3 — Hybrid: Firecrawl for discovery/extraction, pandas locally for cleaning and normalization.
- Mode 1 — Firecrawl (API): public URL, JS-heavy/SPA, search-first discovery, or bulk domain crawling. BYOK: key only via
- Budget before bulk. Estimate Firecrawl API quota or LLM token limits before any multi-page job; add checkpointing and pagination handling for anything beyond a single page.
- Start from the runner templates (run from the plugin root; each
--sampleworks offline):
Edit a copy of the template for the actual job; never inline a from-scratch scraper when a template covers the mode.python3 skills/universal-scraping-architect/scripts/firecrawl_example.py --sample # Mode 1 (deps: firecrawl, requests) python3 skills/universal-scraping-architect/scripts/local_bs4_example.py --sample # Mode 2 (deps: beautifulsoup4, pandas) - Validate — mandatory gate:
Exit 0 =python3 skills/universal-scraping-architect/scripts/validate_extraction.py extracted_output.json --json{"status": "ok"}→ proceed. Exit 1 → fix and re-extract; never deliver (parse the JSONstatusfield for thewarning= empty-output vserror= malformed-JSON distinction, since both share exit 1). Then check required fields and duplicates against the pipeline spec. - Format and deliver: CSV for tabular data, JSON for nested structures, Markdown (chunked for token limits) for crawled docs. Report row counts and empty-value summary.
Refusal & Flag Gates
- Hardcoded API keys → stop and rewrite to
os.getenv('FIRECRAWL_API_KEY')before anything else runs. - Private/sensitive local data bound for an external API → flag the privacy risk and switch to Mode 2.
- No robots.txt check / no rate limiting on a live target → add both before scraping; refuse to scrape sites that disallow it.
- Brittle selectors (deep
nth-childchains) → replace with data attributes or structural anchors. - Hundreds of records implied but no pagination/checkpointing → add it proactively.
Output
A routed, validated pipeline: the runner script (edited template), the validated dataset, and a one-paragraph summary stating the mode chosen and why, budget assumptions, and the validation result.