medium-publishlisted
Install: claude install-skill emaarco/hogwarts
# Skill: medium-publish
Prepares a markdown blog post for Medium by creating a temporary public GitHub Gist, copying its URL to the clipboard, and opening Medium's import page so you can paste the link and finish the import manually.
**Why Gist?** Medium's import feature requires a publicly accessible URL. GitHub Gists are public and immediately accessible, making them ideal as a transport layer. The Gist is deleted after import.
**Why heading transformation?** Medium's importer drops markdown heading syntax (`#`, `##`, etc.). Converting headings to bold (`**...**`) preserves visual hierarchy.
**Why not build an import link?** Medium's import deep-links are brittle. Instead we open Medium's import page and hand you the Gist URL on the clipboard — you paste it and import manually, which is reliable and keeps you in control.
## Step 1 — Collect input
If a file path was provided as an argument, use it directly.
Otherwise ask via `AskUserQuestion`:
```
Which markdown file should I publish to Medium?
Please provide the full path to your .md file.
```
## Step 2 — Transform headings
Read the file at `<input-path>`. For every line that starts with one or more `#` characters followed by a space, replace it with the heading text wrapped in `**...**`. Leave all other lines exactly unchanged. Hold the full transformed content in memory — do NOT write it to disk.
Example:
- `# My Title` → `**My Title**`
- `## Section` → `**Section**`
- `### Sub` → `**Sub**`
- `Normal paragraph