Library / Audience
Weekly report
One Claude Code command that reads your Substack stats in your browser, adds the week's posts and replies, and writes a one-page report with at most three next steps.
The storyNo Substack piece about this one yet. Read the notes
Substack spreads its numbers over four pages. This command puts them on one page once a week, next to the week's posts and replies, and compares them with last week.
What it does
- Opens four Substack dashboard pages in your logged-in browser and reads 30-day views, traffic by source, followers, subscribers and views per post.
- Saves those numbers as a dated JSON file, so next week has something to compare with.
- Reads the week's posts and their numbers from your scheduler, and the replies you logged as sent.
- Writes a Markdown report: subscribers and followers against last week, views by source, each post with its numbers, replies sent, and no more than three next steps.
- Adds the week's row to your audience log.
What it will not do
- It changes nothing. It is read-only on Substack, X and the scheduler.
- It does not log in. If a page asks for a login or does not load, it stops and says so.
- It does not guess. A number it could not read is left out of the file.
- It does not rank posts while there are fewer than ten. Below that it lists the numbers.
The command
Save it as .claude/commands/weekly-report.md in your project and run /weekly-report in Claude Code. Replace <publication> with your Substack subdomain. It needs a browser tool that can read pages you are logged in to, such as the Claude in Chrome extension.
---
description: Capture this week's Substack numbers from the browser, then build the weekly report
---
Build my weekly report. Read-only everywhere: change nothing on Substack, X or the scheduler.
1. Open a new browser tab.
2. Read the text of these pages (wait about 4 seconds after each loads):
- `https://<publication>.substack.com/publish/stats/traffic`: "30d views" and the "Traffic by source" table (source, category, views, users, free subs).
- `https://<publication>.substack.com/publish/stats/audience`: total followers, and subscribers if shown.
- `https://<publication>.substack.com/publish/posts`: each published piece's title and views.
- `https://<publication>.substack.com/publish/subscribers`: the subscriber count.
If a page asks to log in or does not load, stop and say so.
3. Close the tab.
4. Write `data/substack-YYYY-MM-DD.json` (today's date) in this shape, using numbers only where you read them and leaving a field out otherwise:
`{"date":"YYYY-MM-DD","subscribers":0,"followers":0,"views30d":0,"sources":[{"source":"","category":"","views":0,"users":0,"freeSubs":0}],"posts":[{"title":"","views":0,"newSubs":0}]}`
5. Read this week's posts and their numbers from the scheduler, and this week's rows from the reply log.
6. Write `data/report-YYYY-MM-DD.md` with: subscribers and followers against last week, views by source, each post with its numbers, replies sent, and no more than three next steps.
With fewer than ten posts, list the numbers and rank nothing.
7. Add this week's row to the audience log.
8. Tell me the three numbers that changed most, and the next steps.My own copy hands steps 5 and 6 to a small script that pulls post numbers from Buffer. This version asks Claude to do those steps, so it works with any scheduler.