Web Scraping with Claude Code: A Working Workflow with Gaffa A developer used Claude Code with Gaffa's browser-automation skills to build a working web-scraping workflow against books.toscrape.com, going from plain-language goal to discovery, a paginated scraper, CSV export and verification. The /gaffa-find skill located the Mystery category page, its 32 books across 2 pages and the field selectors in 9 credits, and the developer then stress-tested the scraper to surface silent failures such as missing rows that produce no exceptions. Scraping scripts rarely fail on day one. They fail quietly on day ten. The script runs. No exception. A CSV appears. And somewhere in it, 24 rows are missing. Nobody notices until the data is already in a dashboard. If you're: This matters. I gave Claude Code a plain-language scraping goal and Gaffa's AI skills, then let it go from zero to a working web scraping workflow: discovery, a paginated scraper, CSV export and verification. Then I tried to break it. Every number, error and output below comes from real runs. Writing a scraper is the easy part. Claude can do it in one shot. The hard part is everything around it: None of these throw an error. The script finishes, the CSV looks fine, and the data is wrong. You don't find these bugs by reading code. You find them by running the scraper against the real site and checking the output against something you trust. The fix isn't a smarter prompt. It's a workflow where the agent can discover the site, build against the real pages, and debug failures from real request data. With checks that tell you when the output is wrong. Gaffa's AI skills cover exactly those three steps: /gaffa-find gaffa-authoring /gaffa-debug brq ... and it diagnoses what went wrong Under the hood, Gaffa https://gaffa.dev is a browser automation REST API: you send a URL and a list of actions click , wait , capture element , loop ... and it runs them in a real browser. 👉 You can create an account at gaffa.dev https://gaffa.dev and follow along. If you read my previous article on connecting Claude Code to Gaffa https://kevinmeneses.com/en/articles/connect-claude-code-gaffa-browser-automation , you already have this. If not, it's one command in your project folder: npx @gaffa-dev/cli install --tools=claude-code --scope=project -y Installed the gaffa skills version 0.9.0 into 1 place: ./.claude\skills project gaffa-authoring, gaffa-debug, gaffa-find, gaffa-support Registered the gaffa-docs MCP server: Claude Code ./.mcp.json added Then set GAFFA API KEY as an environment variable. The skills never read the key from anywhere else. The target for this test is books.toscrape.com https://books.toscrape.com , a sandbox catalogue built for scraping practice: 1,000 books, 50 categories, classic "next" pagination. I didn't give Claude a URL for the category, a selector or a page count. Just the homepage and a goal: /gaffa-find https://books.toscrape.com/ — Goal: I want to collect every book in the 'Mystery' category. Find the category page URL, how many books it contains, how many listing pages it spans and how pagination works, and which fields each book card exposes title, price, rating, availability, link . Rendered from the real session transcript. The skill runs a loop: recon, hypothesis, targeted extraction, validation. With hard caps: 15 requests and 50 credits per run, 5 iterations maximum. For recon, it sent a browser request that turns the homepage into Markdown. 3 credits, 5.8 seconds, and the answer was in the sidebar: - Mystery catalogue/category/books/mystery 3/index.html From there it captured the category page twice: once as Markdown to read "32 results" and "Page 1 of 2" and once as raw HTML to see the markup the Markdown strips out, like the star rating . Then it checked page 2 to confirm where pagination ends. It also wrote a reasoning log to disk, .gaffa-find-