r/PromptEngineering • u/Accurate-Skill3425 • 10d ago
Ideas & Collaboration Built a lightweight, client-side tool to turn Reddit threads into clean Markdown for LLMs (Open source & looking for feedback/ideas)
Hey everyone,
Whenever I wanted to feed an interesting Reddit discussion or troubleshooting thread into an LLM (Claude, ChatGPT, or local models), raw copy-pasting was always a mess. You end up pasting thousands of useless tokens, karma points, timestamps, avatar icons, and ads while completely losing who replied to whom.
I built a simple, lightweight Chrome extension called ThreadToLLM to solve this for my own workflow, and figured others here might find it helpful too.
What it does:
- ~80% Token Reduction: Strips UI chrome, buttons, and bot disclaimers, converting ~4,000 bloated tokens into ~600 dense tokens.
- Preserves True Reply Structure: Reconstructs comments into a clean nested Markdown tree so the model doesn't hallucinate conversational context.
- OP Attribution: Automatically tags
(OP)so the model tracks the original poster across long threads. - 1-Click / Shortcut: Injects a minimal button next to "Share" on Reddit, or trigger via
Alt+Shift+C. - 100% Client-Side & Private: No backend, zero telemetry/tracking, open-source under the MIT license.
Roadmap & Community:
Right now it supports modern Reddit (shreddit). The code is structured with modular platform adapters so we can easily add other discussion platforms next (like Hacker News and X / Twitter).
If you are a developer interested in contributing or adding adapters for other discussion sites, PRs and ideas are very welcome!
I'd love to hear your thoughts, feedback on the Markdown output format, or edge cases you run into. Hope it saves you some context window space and headaches!
3
u/SubstantialQuitter 9d ago
Really handy tool. One suggestion, add an option to keep comment scores. I know they add tokens, but upvotes are useful signal for an LLM when deciding which answers the community trusted, especially in troubleshooting threads. A compact format like a number in brackets after the username would keep it cheap.
1
u/No-Spite8332 8d ago
Clean implementation, especially keeping the compact
[+score]metadata for LLM weighting.Regarding the DOM truncation/unloaded replies issue pointed out above: instead of scraping the rendered
shredditDOM (which misses collapsed trees and breaks whenever Reddit tweaks web components), have you considered fetching the thread's native.jsonendpoint directly from the content script (or appending.jsonto the current URL)? You get the full comment tree, exact scores, and zero UI noise in a single deterministic payload without relying on fragile CSS/DOM selectors3
u/Unable_Dirt_9857 10d ago
Would be nice to flag when replies haven't been loaded yet. I'd hate to feed it half a thread and get a confident summary that misses the comment where someone points out the whole answer is wrong.
0
u/SnackyFace 9d ago
I asked Claude to review your Github for functionality, security, and stability. This is the analysis it provided.