# Substack Publisher

> Substack Publisher is an AI agent skill for Claude Code, Codex CLI, Gemini CLI, and other agents that read SKILL.md. Push, update, and publish Substack drafts and Notes from your own files, and schedule releases. Best for: Substack API.

- URL: https://atharvashah.com/ai-skills/substack-publisher
- Price: $49, one payment
- Works with: Claude Code, Codex CLI, Gemini CLI, Cursor, GitHub Copilot
- Category: Writing and voice
- Built by: Atharva Shah (https://atharvashah.com)
- Requirements: Needs a paid Claude plan with Claude Code and Python. Substack has no official publishing API, so the skill uses the same web API as the Substack editor with your browser session cookie. The cookie lasts about 2 to 4 weeks and takes a minute to refresh. Table images need the free Pillow library.
- Buy: https://buy.polar.sh/polar_cl_R6zXD453Fqls2A2MvMzI0peVQkdv2aw1TZP2c1jBqZo?custom_field_data.skill-premium=substack-publisher (the skill folder and setup guide arrive by email)

## Publish to Substack from your own markdown files.

Push a draft, fix a live post, schedule a release, or post a Note from the file you already wrote. It checks a live update deletes nothing first.

## What it produces

- **Straight from your file.** A markdown file becomes a live post with its cover, slug, and subscribe block in place. ![A live Substack post, Your Agent Harness Needs a Load Order, beside the front matter of the markdown file it was pushed from.](https://atharvashah.com/ai-skills/substack-publisher/scene-1.webp)
- **The loss check.** A live update stops and names what would be lost before it deletes anything. ![Diagram from the substack-cli write-up: read the live post, compare with the file, refuse when anything would be lost. The refuse step is circled.](https://atharvashah.com/ai-skills/substack-publisher/scene-2.webp)
- **Twelve jobs covered.** Push, pull, update, schedule, Notes, covers, slugs, and tables each run as one command. ![The substack-cli README on GitHub listing twelve jobs, from push and update to tables and sitemap.](https://atharvashah.com/ai-skills/substack-publisher/scene-3.webp)

## If you can write the post, you can ship it.

You connect your publication once. Every post after that runs through the same three steps.

1. **Write in your files.** Headline, subtitle, slug, and cover live in the front of the file. Images, code blocks, captions, and tables all come from plain markdown.
2. **Ask Claude to push.** It creates the draft or updates the one already linked, uploads your images, and hands you the edit link to preview.
3. **Publish on your yes.** Publishing, live updates, and schedules each wait for your explicit go. It confirms the date, the time, and whether subscribers get an email.

## The usual options break your formatting.

Pasting into the editor loses structure. Most scripts only create drafts and never touch live posts safely.

### Substack Publisher

- **Files stay the source.** Push, update, and publish from the same markdown.
- **Loss check before updates.** Live-only images and blocks come home first.
- **Tables as images.** Rendered at publish time, editable in your file.
- **Asks before going live.** Publish, update, and schedule need your yes.

### Copy and paste

- **Two copies drift.** Fixes made in the editor never reach your files.
- **Tables collapse.** They land as a wall of pipes on the live page.
- **Images one by one.** You drag every picture in again after each edit.
- **Truncated links.** Substack shortens your slug from the headline.

### Draft-only scripts

- **Drafts only.** A push to a published post changes nothing readers see.
- **Silent loss.** An overwrite drops embeds and captions with no warning.
- **No slug guard.** The public URL is whatever Substack guessed.
- **No scheduling.** You still open the browser to set a date.

## Frequently asked questions

### Does Substack offer an API?

Substack has no official public publishing API. This skill uses the editor endpoints the web app calls, with your own session, and checks that a live update deletes nothing before it runs.

### Can I publish to Substack from markdown?

Yes. The skill reads the title, subtitle, cover, and slug from the front of your markdown file and pushes the draft or the update.

### Which Claude plan do I need?

A paid plan with Claude Code, because it reads your files and calls Substack from your machine. Pro is enough.

### What else do I pay for?

Nothing. It runs on Python, and the only extra library is Pillow for table images. Both are free.

### Does Substack have an official API for this?

No. The skill uses the same web API the Substack editor uses, signed in with your own session cookie. If Substack changes that API, a command can break until the skill is updated.

### How do I sign in?

You copy one cookie from your browser into a config file during setup. It lasts about 2 to 4 weeks. When it expires, the skill tells you which cookie died and how to refresh it.

### Can it edit a post that is already live?

Yes. It updates the live page with no email and no feed bump. It runs a loss check first and pulls any image or block that exists only on the live page back into your file.

### Can it schedule Notes?

Substack has no way to schedule a Note on its side. The skill posts Notes right away. To time one, it can set a local Claude Code task that posts it at your chosen time, which needs your computer on.

### Will it publish without asking?

No. Publish, live update, and schedule each wait for your explicit yes in chat. It never tests on your live publication.

### Does it work with Obsidian or other editors?

Yes. It reads plain markdown files with front matter, so any editor that saves markdown works.

### What if the first push looks wrong?

It pushes to a draft first, so nothing is public. Look at the preview, tell it what is off, and it fixes the file and pushes again.

### Does this skill work with Gemini CLI, Codex, Cursor, or GitHub Copilot?

Yes, with one caveat. The skill is a SKILL.md folder in the Agent Skills open standard, which Claude Code, Codex CLI, Gemini CLI, Cursor, and GitHub Copilot all load. It is built and tested on Claude Code. Steps that lean on Claude-only features, such as parallel subagents, run one after another or need a manual step in other agents.

### How do I install an agent skill?

Copy the skill folder into your agent's skills directory: ~/.claude/skills for Claude Code, or the skills folder your agent documents for Codex CLI, Gemini CLI, Cursor, or Copilot. The agent reads the description and loads the skill when your request matches it. Each skill ships with a setup guide for any tool it needs.

[All AI skills](https://atharvashah.com/skill-pack) · [Library index](https://atharvashah.com/ai-skills.md)
