stackoverflow

A browser-based scraping playbook for Stack Overflow tag and question listing pages. Stack Overflow is a question-and-answer site for programmers, and scraping means collecting information from its web pages automatically.

In plain words
What is it for?
Use it to gather questions for a Stack Overflow tag, handle pagination, and work around Cloudflare blocks on repeated automated requests.
Why use it?
It explains how to collect listing data when ordinary command-line requests are blocked by the site’s anti-bot protection. It uses a real Chrome browser connection and reads question data from the rendered page.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agentcomputerai/torch/stackoverflow
Any agent
npx skills add AgentComputerAI/torch --skill stackoverflow
Clone the repo
git clone --depth 1 https://github.com/AgentComputerAI/torch

Made for: Claude Code, Codex.

Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00099 $0.01752
Opus 5 $0.00049 $0.00876
Sonnet 5 $0.00020 $0.00350
Haiku 4.5 $0.00010 $0.00175

Measured yesterday against content hash de3027205c09, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stackoverflow scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Proven scraping playbook for stackoverflow.com tag/question listing pages (e.g. /questions/tagged/<tag>). Server-rendered HTML, but Cloudflare flags raw curl/node-fetch with HTTP 403 after the very first req
skills/sites/stackoverflow/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stack Overflow (stackoverflow.com)

Classic server-rendered HTML in front of Cloudflare. A single cold curl gets HTML 200, but every subsequent anonymous request is 403'd by Cloudflare's bot heuristics (the __cf_bm / _cfuvid cookies issued on the first hit need a real browser TLS fingerprint to stay valid). Real Chrome via 127.0.0.1:9222 sidesteps this entirely. Question data is inline in the HTML — no API or JSON blob needed.

Detection

Signal Value
CDN Cloudflare (server: cloudflare, cf-ray)
Framework ASP.NET / Razor (server-rendered HTML, no SPA)
Anti-bot Cloudflare bot scoring — 403s node/curl after 1 hit
Auth Not required for question listings
robots.txt Allow: /questions/ on major crawlers

Architecture

  • /questions/tagged/<tag> is fully SSR — every question is a .s-post-summary block in the raw HTML.
  • Pagination is a plain ?tab=newest&page=N&pagesize=50 query param. pagesize accepts 15 / 30 / 50.
  • There is a "Stack Exchange API" at api.stackexchange.com — useful but heavily rate-limited (300 req/day unauthenticated, with quota key required). For one-off tag scrapes, scraping the HTML is simpler.

Strategy used

  • Phase 0 (curl): first request returns 200 with full HTML. Second request: 403. Cloudflare is stateful.
  • Phase 1: no framework JSON blob — data is straight HTML. Skip.
  • Phase 2: puppeteer.connect({ browserURL: the real Chrome debug port }). First navigation succeeds, and so does every subsequent one — the real Chrome profile keeps the Cloudflare cookies rotating correctly.

Stealth config that works

import puppeteer from "puppeteer-core";

const browser = await puppeteer.connect({
  browserURL: "http://127.0.0.1:9222",
});
const page = await browser.newPage();
await page.goto(url, { waitUntil: "domcontentloaded", timeout: 30000 });
await page.waitForSelector(".s-post-summary");
const html = await page.content();
// ...
await page.close();
browser.disconnect(); // never .close() — it would kill the user's Chrome

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 130 lines · 99 tokens per session scan A de3027205c09

Subscribe to this mod's changes

stackoverflow is a skill published in the GitHub repository AgentComputerAI/torch (5 stars, last pushed 4mo ago), licensed MIT. It adds 99 tokens to every session and 1,752 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

tiny-web-crawler

Crawl from one or more starting web pages, fetch readable content, search within pages, follow relevant links, and stop when the requested information is found or a bounded limit is reached.

leon-ai/leon · 42 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens

browserstack

../../../engineering-team/playwright-pro/skills/browserstack/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

analyze-performance-traces

Analyze Chrome, Chromium, Electron, React DevTools, or Perfetto-compatible JSON traces and audit user-reported profiling findings without loading large artifacts into context; prove trigger-to-render/layout chains, separate measured facts from source inference, find exact code choke points, classify forced layout and…

tutti-os/tutti · 127 tokens

feature-demo-recording

Record a demo video of a web feature from a real browser. Two modes -- a NARRATED film where measured voiceover drives the timeline (designed slides, subtitles, punch-in camera, rendered from an HTML timeline), and a SILENT evidence clip for a PR or a QA pass. Use when the user asks to record a video, demo, or screen…

kirodotdev/KiroCrew · 90 tokens

browser-recording

Record a browser flow as a video/GIF for evidence — animations, transitions, and multi-step interactions that a still screenshot cannot prove. Drives the project's own Playwright through a bundled runner, then converts to mp4 + GIF via ffmpeg. Use when the user asks to record a demo, capture a GIF or video of the UI…

kirodotdev/KiroCrew · 85 tokens