$npx -y skills add mphinance/alpha-skills --skill substack-draft-statusShow pending Substack drafts and reconcile them against local ~/.mph-substack-cache workspaces. Flags local-only drafts older than 3 days as stale (the "wait did I actually save this on substack" problem). Read-only — never publishes. Triggers on "did I save that draft", "is that
| 1 | # Substack Draft Status |
| 2 | |
| 3 | Reconciles two sources of "what drafts do I have": |
| 4 | - Local workspaces under `~/.mph-substack-cache/<slug>/` (rendered images + post.md) |
| 5 | - Server drafts at `https://mphinance.substack.com/api/v1/drafts` |
| 6 | |
| 7 | The "did I save that yesterday" anxiety usually means: a local workspace exists but it never got pushed. This skill makes that visible in 5 seconds. |
| 8 | |
| 9 | ## When to invoke |
| 10 | |
| 11 | - User asks "did I save that draft" / "is that on substack" / "what drafts do I have" |
| 12 | - User mentions a recent post by date or topic and wants to confirm its state |
| 13 | - Before forging a new substack post, sanity-check that an older one isn't sitting half-pushed |
| 14 | |
| 15 | ## Flow |
| 16 | |
| 17 | 1. Run the worker: |
| 18 | ``` |
| 19 | python ~/.claude/skills/substack-draft-status/scripts/status.py |
| 20 | ``` |
| 21 | 2. The script reads `SUBSTACK_SID` from `C:\Users\mphan\OneDrive\Documents\GitHub\mphinance\secrets.env` (or the `SUBSTACK_SID` env var) and hits `GET /api/v1/drafts?limit=20`. |
| 22 | 3. It walks `~/.mph-substack-cache/` and matches each workspace against server drafts by date-prefix and title. |
| 23 | 4. Output is grouped: |
| 24 | - **Pushed** — local workspace AND matching server draft (shows edit URL) |
| 25 | - **Server-only** — draft on substack with no local workspace (created via web) |
| 26 | - **Local-only fresh** — workspace exists, no server match, post.md mtime within 3 days |
| 27 | - **Local-only STALE** — workspace exists, no server match, post.md mtime older than 3 days. These are the "forgotten" drafts. |
| 28 | 5. Surface the table verbatim to the user. If any STALE entries exist, offer to push them via `mph-substack-publish` (do not push automatically). |
| 29 | |
| 30 | ## Hard rules |
| 31 | |
| 32 | - **Read-only.** Never call `POST /api/v1/drafts/.../publish`. Never modify local workspaces. Publishing is mph-substack-publish's job and requires explicit confirmation there. |
| 33 | - Reuse the existing `secrets.env` auth pattern from `create_draft_from_md.py`. Do not invent a new auth flow. |
| 34 | - Do not commit `~/.mph-substack-cache/` contents to git. Those workspaces are local-only by user policy. |
| 35 | - If `SUBSTACK_SID` is missing, print a clear error pointing at `secrets.env` and exit 2. Do not try to interactively prompt for credentials. |
| 36 | - Stale threshold = 3 days. If user wants a different threshold, pass `--stale-days N`. |
| 37 | |
| 38 | ## Out of scope |
| 39 | |
| 40 | - Pushing, publishing, or editing drafts (use mph-substack-publish for the push) |
| 41 | - Listing published posts (the API endpoint is different and not interesting for the "did I save it" problem) |
| 42 | - Multi-publication support (only mphinance.substack.com) |
| 43 | - Anything that requires network calls beyond the single GET to /api/v1/drafts |