reddit-archive
Skill4 starsChanged 4 months agoMITView on GitHub
Download and archive a Reddit post with everything attached to it — full text, the whole comment tree, images, galleries, and v.redd.it video with the audio actually merged back in. Use whenever someone wants to save, download, archive, back up, or scrape a Reddit post or thread; download a Reddit video or gallery; capture a thread before it is deleted; or build a dataset from Reddit content. Also use when a downloaded Reddit video has no sound, which is the usual symptom of taking `fallback_url` instead of merging the DASH streams, or when a gallery download returns 403. Produces a self-contained directory with a manifest, so the capture is reproducible and auditable. Not for posting to Reddit.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- reddit-postSkill
- reddit-scoutSkill
- reddit-seoSkill
- reddit-voiceSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Run node scripts/verify-synthetic.mjs with no arguments.
- Very specific: line 99
If ok is false on any entry, that file did not download — the manifest tells you which and why instead of leaving a gap you discover later.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Archiving a Reddit post with its media
Reddit stores a post's media in four different shapes, and a naive download gets three of them wrong. This skill handles all four, verified against live posts of each type.
node scripts/rdtx.mjs archive <permalink> --out ./archive --comments 200Verify the installed runtime without Reddit
Run node scripts/verify-synthetic.mjs with no arguments. It uses fabricated local fixtures to
exercise production media planning—including galleries, video audio metadata, and crosspost-parent
resolution—plus the shared runtime contracts. It makes no Reddit request or download and removes
its temporary state. A pass proves installation and planning behavior only; it does not prove a
live post can be fetched or that media bytes can be downloaded.
Overall passed is the AND of all five shared checks; inspect functional.reddit_archive for this
skill's evidence.
An independent tester can submit the exact named verifier result through the
structured installed-run report.
Select the reddit-archive zero-input synthetic option only after running the installed copy. This
proves installation and media-planning contracts, not a live fetch or downloaded media bytes.
What you get
archive/aww_1varxvd/
├── post.json raw API response, unmodified
├── post.md readable: title, author, age in years, body, nested comments
├── comments.json the full tree
├── media/ image.jpeg | gallery_01..NN.jpeg | video.mp4
└── manifest.json files, sizes, sha256 prefixes, source URLs, media_kindpost.md reports the post's age in years, which is what you want when hunting for old threads.
manifest.json makes the capture reproducible — it records where every byte came from.
The four media shapes, and the trap in each
| type | where the URL lives | the trap |
| image | url (i.redd.it/…) | none — public, no cookies needed |
| gallery | media_metadata[id].s.u | the signed s= param must be passed whole; truncating it returns 403 |
| video | secure_media.reddit_video | fallback_url is video-only — taking it silently gives you a clip with no sound |
| crosspost | crosspost_parent_list[0] | the crosspost itself carries no media; you must follow to the parent |
The video case is the one that bites. Reddit serves v.redd.it as DASH with separate video and
audio streams. archive runs yt-dlp against the permalink and lets ffmpeg merge them, producing
a real h264 + aac file. Verified with ffprobe:
stream: video (h264)
stream: audio (aac)yt-dlp also refuses Reddit without credentials ("Account authentication is required"), and reading
Chrome's cookie database fails while Chrome holds it open. archive exports a Netscape
cookies.txt from the live browser session instead, which works regardless of locks or keychain.
Requirements
node≥ 18 andagent-browseryt-dlpandffmpeg— needed only for video; images and galleries work without them- a logged-in Chrome session:
rdtx launch→rdtx login→rdtx doctor
Options
| flag | effect |
--out <dir> | archive root (default ./archive) |
--comments <n> | how many comments to fetch (default 200) |
--no-media | metadata and text only |
Verifying a capture
manifest.json records media_kind and a per-file result. A partial capture is visible rather
than silent:
{ "media_kind": "gallery", "comments_captured": 41,
"media": [{ "type": "gallery", "file": "media/gallery_01.jpeg", "bytes": 231460, "ok": true }],
"crossposted_from": null }If ok is false on any entry, that file did not download — the manifest tells you which and why
instead of leaving a gap you discover later.
Scope and courtesy
This archives public posts through your own logged-in session, at human pace (a jittered wait between requests). It is not a bulk scraper and deliberately has no crawl mode: fetching whole subreddits is what gets IPs and accounts blocked, and Reddit's terms cover bulk collection. For large-scale historical data, use Reddit's own data API or an existing archive dump rather than driving a browser at it.
Related
reddit-post— write posts and commentsreddit-seo— check whether a post is indexable
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

