Logotipo de Mph Substack Publish

Mph Substack Publish

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

Descripción general

Editormphinance
Repositorioalpha-skills
Nombre de la habilidadmph-substack-publish
Estrellas
32
Forks
6
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por mphinance en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Mph Substack Publish en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese 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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Mph Substack Publish en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Mph Substack Publish automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Mph Substack Publish no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu 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.

Preguntas frecuentes

¿Qué hace la habilidad de IA 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.

¿Por qué usar Mph Substack Publish en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Mph Substack Publish está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Mph Substack Publish en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/mphinance/alpha-skills/tree/main/plugins/mph-kit/skills/mph-substack-publish. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Mph Substack Publish?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Mph Substack Publish?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Mph Substack Publish con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Mph Substack Publish?

Sí. mphinance la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇