Logo de Mph Substack Publish

Mph Substack Publish

Comunidade
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.

Visão geral

Publicado pormphinance
Repositórioalpha-skills
Nome da habilidademph-substack-publish
Estrelas
32
Forks
6
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por mphinance no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Mph Substack Publish no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Mph Substack Publish em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Mph Substack Publish automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Mph Substack Publish não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Perguntas frequentes

O que a habilidade de IA Mph Substack Publish faz?

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.

Por que usar Mph Substack Publish no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Mph Substack Publish é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Mph Substack Publish no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Mph Substack Publish?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Mph Substack Publish?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Mph Substack Publish com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Mph Substack Publish é gratuita?

Sim. A habilidade é publicada no GitHub por mphinance sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇