Logo van Mph Substack Publish

Mph Substack Publish

Community
mphinance
mph-substack-publish

End-to-end Substack pipeline. Take a subject, produce a draft (or publish it) at mphinance.substack.com. Chains mph-substack-writer (voice) + mph-figure (images) + the local create_draft_from_md.py pusher. Triggers on "write a Substack about X", "draft a post on Y", "publish to Substack", "/dispatch a Substack" or similar.

Overzicht

Uitgevermphinance
Repositoryalpha-skills
Skillnaammph-substack-publish
Sterren
32
Forks
6
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door mphinance op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Mph Substack Publish in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mphinance/alpha-skills.git /tmp/alpha-skills
mkdir -p .claude/skills
cp -r /tmp/alpha-skills/plugins/mph-kit/skills/mph-substack-publish .claude/skills/mph-substack-publish
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Mph Substack Publish in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Mph Substack Publish automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Mph Substack Publish niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

MPH Substack Publish

End-to-end pipeline. Subject in → draft in mphinance.substack.com out (or published post if asked explicitly).

Inputs

  • Subject (required) — what the post is about. One line is fine; longer briefs are better.
  • Mode (default: draft) — draft creates a draft only. publish calls /api/v1/drafts/{id}/publish after the draft lands. Always confirm explicitly with Michael before publish mode — that triggers the subscriber email blast and is not reversible.
  • Post category (inferred from subject, or asked once if ambiguous):
    • builder — build-in-public, tool launches, code drops. No NFA needed. Default.
    • trade — specific positions / picks / "I bought X". NFA disclaimer required.
    • paid_tease — free post with a paywalled follow-up; include the "what's behind the paywall" section.
    • recovery — personal / sappy / non-finance reflection. No NFA.

Pipeline

  1. Read the voice corpus. Read ~/.claude/skills/mph-substack-writer/SKILL.md and ~/.claude/skills/mph-voice-refresh/VOICE.md. The hard rules and RETIRED phrases there supersede anything else.

  2. Pick a slug + workspace.

    • Slug: YYYY-MM-DD_kebab-case-title
    • Workspace: ~/.mph-substack-cache/<slug>/ (create if missing). All intermediate files live here, not in the project repo. NEVER write Substack drafts to docs/substack/drafts/ anymore — Michael does not want post markdown checked into git.
  3. Draft the post following the mph-substack-writer skeleton:

    • H1 title (Title Case, terse)
    • One-line italic subtitle (the "dek")
    • Optional ![hero](hero.png) reference
    • Bold opener (1-2 short paragraphs)
    • Context section
    • The meat (data + figures + voice)
    • "Here's the truth..." pivot
    • Optional paywall tease (for paid_tease category)
    • Standardized footer (see template below — do NOT improvise this)
  4. Render any figures. For tables, comparison cards, stat blocks — write HTML in the workspace folder, render via mph-figure:

    node ~/.claude/skills/mph-figure/scripts/render.mjs --in <workspace>/foo.html --out <workspace>/foo.png --html

    Reference in markdown as ![alt](foo.png). Substack will receive these as uploaded S3 images.

  5. Push to Substack via the script (handles image upload + ProseMirror conversion + cover image). The pusher lives in the mphinance repo, but the repo path differs per machine, so resolve it for wherever you're running:

    • Windows workstation: C:/Users/mphan/OneDrive/Documents/GitHub/mphinance/substack_social/create_draft_from_md.py
    • Coolify/Linux box (user mph): ~/mphinance/substack_social/create_draft_from_md.py
    • Otherwise: find it with git rev-parse --show-toplevel from inside the mphinance checkout, or find ~ -path '*substack_social/create_draft_from_md.py'.
    python <pusher> <workspace>/post.md

    It prints the edit URL. Surface that URL to Michael.

  6. If mode is publish (only with Michael's explicit confirmation):

    • Run python <pusher> <workspace>/post.md --publish (same <pusher> resolved in step 5)
    • Surface the live post URL.

Standardized footer template

Use one of these three at the end of EVERY post. Replace the --- separator with markdown horizontal rule (Substack handles it). Do not improvise alternative sign-offs or CTAs; consistency matters more than novelty here.

builder (default) — no NFA

— Michael

---

*If this helped, subscribe so the next one lands in your inbox.*

trade — with NFA

— Michael

---

*Not financial advice. Do your own research. Don't trade on someone else's conviction.*

*If this helped, subscribe so the next one lands in your inbox.*

paid_tease — with paywall section above the footer

## What's behind the paywall

[one-paragraph tease of the paid follow-up — what it covers, when it drops, why it's worth paying for]

— Michael

---

*If this helped, subscribe so the next one lands in your inbox. Paid subs get the deep version on [day].*

Path note (works from any CWD)

The pusher script create_draft_from_md.py lives in the mphinance repo. The absolute path above means this skill works whether Claude is invoked from the mphinance repo, a different repo, or anywhere else. If Michael moves the repo, update the path in this SKILL.md.

The script reads secrets.env from the mphinance repo automatically (resolved relative to the script's parent dir), so SUBSTACK_SID lookup works regardless of CWD.

Hard rules (enforced)

  • Sign-off is exactly — Michael. No last name. No MPH initials. No title. No "Managing Partner." No "The Phund." Just the em-dash + first name. (Yes, this is the one place an em-dash is allowed — it's the conventional dash for a signature, not narrative prose.) The MPH handle is fine as a brand/handle in body text ("@mphinance", "the mphinance newsletter") but never as a sign-off — that's the same as using the last name.
  • No NFA in builder posts. Adding "not financial advice" to a post about building a Python tool reads like a lawyer wrote it. The top-engagement posts in Michael's network (Stephane Derosiaux, Pawel Jozefiak, Jenny Ouyang, even Compounding Quality who literally posts his trades) have ZERO NFA in the body.
  • Subscribe CTA goes at the bottom, after the signature. Not at the top. Not mid-post (Substack auto-inserts those). One CTA, end of post, italicized.
  • The Substack-published draft is the source of truth. The local markdown in ~/.mph-substack-cache/ is ephemeral. Don't commit it to git. Don't write to docs/substack/drafts/.

Examples

Example invocation: "write a Substack about why I dropped the institutional brokerage flow"

  • Category: builder (it's a build-in-public post about a stack change)
  • Mode: draft
  • Footer: builder variant
  • Expected output: draft URL like https://mphinance.substack.com/publish/post/199012345

Example invocation: "draft a post on my new options.wheel position in GOLD"

  • Category: trade (specific position)
  • Mode: draft
  • Footer: trade variant (NFA included)
  • Expected output: draft URL, with NFA in footer

Example invocation: "publish the pulse-style network analysis post"

  • This is two questions: which post, and is publish mode confirmed? Ask: "Confirm you want this published live, not drafted? That'll send the email blast to all subscribers."
  • Only proceed with --publish flag after explicit yes.

Failure modes to watch for

  • Image upload returns 400 — usually means the image is too large or the format is unsupported. PNGs under 2MB are reliable.
  • Draft created but editor crashes opening it — body included an unsupported ProseMirror node type. See the memory entry [[reference-substack-prosemirror-schema]] for valid types. The current pipeline avoids this by routing markdown through proper PM nodes, never rawHtml.
  • SUBSTACK_SID expired — sign out + back in at substack.com to rotate, then update secrets.env.

Veelgestelde vragen

Wat doet de AI-skill Mph Substack Publish?

End-to-end Substack pipeline. Take a subject, produce a draft (or publish it) at mphinance.substack.com. Chains mph-substack-writer (voice) + mph-figure (images) + the local create_draft_from_md.py pusher. Triggers on "write a Substack about X", "draft a post on Y", "publish to Substack", "/dispatch a Substack" or similar.

Waarom Mph Substack Publish gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Mph Substack Publish bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Mph Substack Publish in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Mph Substack Publish gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Mph Substack Publish gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Mph Substack Publish ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Mph Substack Publish gratis?

Ja. Deze skill is door mphinance op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇