On the Edge by Blueprint

On the Edge by Blueprint

Daily Builds

Here's How I Automated My Entire Substack

The full automation stack behind every post on On the Edge.

Jordan Crawford's avatar
Jordan Crawford
May 03, 2026
∙ Paid

May 3, 2026 · Build log

40+ scripts

Every post you've read on this Substack was touched by six separate systems before it reached your inbox. Not one of them is Substack's editor.

I didn't plan it this way. It started with a session capture hook — a script that fires at the end of every Claude Code session and logs what I built. That was March. By May I had 40+ scripts, 5 sub-skills, a 458-entry knowledge corpus, and a publishing pipeline that bypasses Substack's own tools because they can't render images correctly.

The whole thing runs for about fifty cents a post.

This is what's behind the curtain.

$0.50 per post

The six systems

1. Session capture. A hook fires every time I close a Claude Code session — any session, any project, anywhere on my machine. It reads the transcript, extracts what tools I used, what files I touched, what topics I worked on. Tags everything to a taxonomy. Appends to a daily log. When enough sessions pile up on the same topic, the queue tells me I have material for a post.

I don't decide what to write about. The capture system tells me.

2. Voice enforcement. Three files govern everything that sounds like me. A style guide extracted from 20+ transcript recordings. An anti-patterns list with 18 categories of words and patterns I never use — "game-changer," "leverage," "dive into," "unlock," all dead on arrival. And a translation map that catches internal jargon before it leaks into prose.

Every draft runs through automated grep checks before it gets near Substack. If it catches "methodology" or a bare CLI flag in narrative text, the draft blocks. No exceptions.

3. Headline optimization. Every title scores on six axes: Specificity, Action Promise, Pattern Interrupt, Identity Signal, Curiosity Gap, Readability. The system generates 3-4 alternatives with subtitles and SEO titles, then runs demand research through Serper and Exa — what people actually search for, what questions they ask, how saturated the topic is on Substack.

Cost: four cents per research run. The 33-character rule is enforced automatically. Gmail mobile truncates there. If the first 33 characters of your title don't stand alone, you've already lost the open.

4. Image generation. Every post gets images — no exceptions. One per 200-300 words. Half are AI-generated via Gemini (concept illustrations in the calligraphy aesthetic you see on every hero). Half are programmatic — HTML templates screenshotted through headless Chrome. Quote cards, stat cards, framework diagrams.

I built the programmatic pipeline because Gemini can't reliably produce stat cards with correct numbers. Turns out an HTML template with Playwright is more reliable than a diffusion model for data visualization. Who knew.

5. Publishing pipeline. Substack's MCP tool can't render images. Its markdown-to-ProseMirror conversion puts image types in the wrong field and leaves critical attributes null. Images show up as raw text.

So I reverse-engineered the ProseMirror JSON schema and built a direct API publisher. It converts markdown to the exact node structure Substack expects. Uploads images to Substack's CDN, builds the JSON document, PUTs it directly to the API.

The auth is self-refreshing. A wrapper script pulls the session cookie from Chrome on every launch. No credentials stored on disk. No rotation. Sign in once in your browser, the pipeline handles the rest.

6. Knowledge corpus. 458 entries organized in four layers — Resources, Ideas, Context, Evidence. Nine kinds of page. Every entry carries structured metadata with tier gating, bitemporal validity, and a closed vocabulary of 13 relationship types.

This is what Edge Copilot reads when subscribers ask it questions. The corpus is the brain. The Substack is the mouth.

The numbers

  • 40+ scripts — Python, TypeScript, shell

  • 5 sub-skills — content generation, headline optimization, image generation, session capture, Slack recaps

  • 458 wiki entries — the Corpus behind Edge Copilot

  • $0.50 per post — Whisper transcription + Gemini images + headline research

  • $0.04 per headline research run — Serper autocomplete + Exa semantic search

  • 6 API keys — Anthropic, OpenAI, Google AI, Serper, Exa, Substack (cookie-based)

— Written by Claude Opus 4.6, Approved by Jordan


Below is how every piece connects — the architecture, the pipeline order, the APIs, the costs. Enough to understand the system. Not enough to clone it.

If you're a fellow Substack creator and want the actual repo, DM me on LinkedIn. This isn't part of the annual subscription. It's a separate conversation.

→ Go annual — $2,499/yr · Start at $50/mo (most readers start here)


This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Jordan Crawford · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture