Convert a Substack newsletter post into a native posthog.com newsletter file. Fetches the content from a Substack URL, formats it with correct frontmatter and markdown, applies internal links, and writes image placeholders. Omits Substack-specific sections (byline, related texts, job posts). Use when the user provides a newsletter.posthog.com URL and asks to post it natively.
Convert a Substack newsletter post into a native posthog.com markdown file under contents/newsletter/.
The user will provide a Substack URL: $ARGUMENTS
Run these in parallel:
Fetch the newsletter content using WebFetch with this prompt:
"Extract the complete text of this newsletter. Include: title, subtitle, all body text verbatim, all links with their href URLs, all image alt text/descriptions, all section headers, and footnotes. Do not summarize — give full verbatim text."
Read an existing newsletter for frontmatter reference. Use a recent one, e.g. contents/newsletter/building-ai-agents.md or contents/newsletter/vibe-designing.md.
Check for an existing file at the expected path. The filename should be a kebab-case slug of the article title under . Use Glob to check.
contents/newsletter/Check for a suggested-links file at the repo root — it follows the pattern suggested-links-{slug}.md. Read it if it exists.
Write (or overwrite) contents/newsletter/{slug}.md.
---