reddit

A scraping guide for public Reddit pages, including communities, user pages, search results, and discussion threads. It uses Reddit's JSON version of a page instead of browser automation.

In plain words
What is it for?
Use it to collect posts, comments, or search results from public Reddit pages and continue through listing pages with the after token.
Why use it?
It avoids unnecessary browser control and explains the required browser-like user agent and cursor-based pagination for public listings.

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/reddit
Any agent
npx skills add AgentComputerAI/torch --skill reddit
Clone the repo
git clone --depth 1 https://github.com/AgentComputerAI/torch

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,951 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.00068 $0.01951
Opus 5 $0.00034 $0.00975
Sonnet 5 $0.00014 $0.00390
Haiku 4.5 $0.00007 $0.00195

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

Security

Grade A, and why

reddit 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.

Reddit's old `.json` endpoints are still live and unauthenticated. Any listing page — `/r/<sub>`, `/r/<sub>/top`, `/user/<name>`, `/r/<sub>/comments/<id>`, `/search` — becomes a JSON feed by appending `.json`. Pagination
skills/sites/reddit/SKILL.md · 135 lines

How it starts

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

Reddit (reddit.com)

Reddit's old .json endpoints are still live and unauthenticated. Any listing page — /r/<sub>, /r/<sub>/top, /user/<name>, /r/<sub>/comments/<id>, /search — becomes a JSON feed by appending .json. Pagination is cursor-based via the after token. The only thing that will get you blocked is using the default python-requests / node-fetch / curl/ User-Agent — set any browser UA and you're fine.

Do not use Puppeteer for Reddit. It's strictly slower and no more capable than a plain fetch.

Detection

Signal Value
CDN Fastly (x-served-by: cache-...)
Framework React SPA for HTML, but .json endpoints are the canonical data source
Anti-bot User-Agent filter only — blocks default library UAs with HTTP 429 "Too Many Requests"
Auth required No (for public subs)
Rate limit ~60 req/min unauthenticated per IP; be polite with 1–2s between requests
robots.txt Disallows most crawlers except Googlebot, but .json endpoints work fine

Architecture

  • https://www.reddit.com/r/<sub>.json?limit=100&after=<token> returns a Listing wrapper.
  • data.children is an array of { kind: 't3', data: { ... } } for posts (t3), t1 for comments.
  • data.after is the next-page cursor (null when exhausted). data.before for previous.
  • Max limit is 100 per request. Listings cap at ~1000 items total (~10 pages) regardless of how far you paginate — this is a hard Reddit limit, not a scraper bug.
  • Sort variants: /r/<sub>/hot.json, /top.json?t=week, /new.json, /rising.json, /controversial.json.

Strategy used

Phase 0 only. curl https://www.reddit.com/r/programming.json -A "Mozilla/..." returns the full JSON listing. Skipped Phases 1–2 entirely. No browser, no stealth, no proxy.

Stealth config that works

const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36';
await fetch(url, { headers: { 'User-Agent': UA, 'Accept': 'application/json' } });

Read the full file on GitHub · 135 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 · 135 lines · 68 tokens per session scan A 067e18c4f1e6

Subscribe to this mod's changes

reddit is a skill published in the GitHub repository AgentComputerAI/torch (5 stars, last pushed 4mo ago), licensed MIT. It adds 68 tokens to every session and 1,951 once invoked, about $0.0003 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