Substack Agent
A Claude Code pipeline that turns a Reddit book thread into a ready-to-paste issue of Books Galore, my weekly Substack newsletter.
- Claude Code
- Sub-agents
- Node.js
- Reddit data
- Open Library
- Substack
The newsletter
Books Galore is my weekly newsletter: three book recommendations, no endless scrolling, no algorithm. Each issue starts from a real conversation. I find a Reddit thread where readers are answering a question, like a dad asking for two books for his teenage son or someone who lost their home asking for a comforting read, and I read the whole thread, sometimes hundreds of comments, before picking three books.
Reading every comment is the part that takes the time. It’s also the part that makes the picks good. So I built an agent to help with the legwork, not the judgement.
How it works
Three commands run the pipeline:
/find-threadsscans book subreddits and shortlists threads worth an issue. It judges them by their comments, not the post: a post tells you there’s a person with a situation, but only the comments tell you there’s an issue./fetch-threaddownloads the thread with every comment, including the ones Reddit hides, through Arctic Shift, an open Reddit archive./issuepasses the thread through five sub-agents, and stops twice for my approval: once to confirm the books, once to confirm the Amazon links.- Thread analyst: reads the thread and writes an editorial brief about the human tension behind the question.
- Book ranker: picks three books, one for each role in the issue, and checks a database of past picks so the list stays fresh.
- Book enricher: works out the exact edition of each book on Amazon US and Amazon India.
- Newsletter writer: writes the full issue, plus subject lines and subtitles.
- QA editor: fixes mechanical errors, flags judgment calls for me, and gives a verdict. It checks the voice but never rewrites it.
The output is plain HTML, because Substack strips custom styling on paste. A script pulls each book’s cover from Open Library.
The rules it follows
- No invented quotes. If it can’t quote a book exactly, it paraphrases and says so.
- No invented stories. The opening anecdote is left as marked scaffolding for me to replace with something that actually happened.
- No hype. Words like “must-read” and “life-changing” are banned.
- Ratings get checked. Only books rated 4.0 or higher on Goodreads, and every rating is flagged “(verify)” before publishing, because ratings from memory are unreliable.
Where it is now
The pipeline drafted its first issue on 20 September 2026, as a test run. The QA editor passed it with flags, including ratings to verify and a link to check, which is exactly the kind of catch it’s there for.