substack-draft-status
Show 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 saved on substack", "what drafts do I have", "show my substack drafts", "are my drafts pushed", "/substack-status", "/draft-status".
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 32
- Forks
- 6
01 前言 Front Matter
- name
- substack-draft-status
- description
- Show 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 saved on substack", "what drafts do I have", "show my substack drafts", "are my drafts pushed", "/substack-status", "/draft-status".
02 资源文件 1
- 脚本scripts/status.py10.4 KB
03 SKILL.md 正文
Substack Draft Status
Reconciles two sources of "what drafts do I have":
- Local workspaces under
~/.mph-substack-cache/<slug>/(rendered images + post.md) - Server drafts at
https://mphinance.substack.com/api/v1/drafts
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.
When to invoke
- User asks "did I save that draft" / "is that on substack" / "what drafts do I have"
- User mentions a recent post by date or topic and wants to confirm its state
- Before forging a new substack post, sanity-check that an older one isn't sitting half-pushed
Flow
- Run the worker:
python ~/.claude/skills/substack-draft-status/scripts/status.py - The script reads
SUBSTACK_SIDfromC:\Users\mphan\OneDrive\Documents\GitHub\mphinance\secrets.env(or theSUBSTACK_SIDenv var) and hitsGET /api/v1/drafts?limit=20. - It walks
~/.mph-substack-cache/and matches each workspace against server drafts by date-prefix and title. - Output is grouped:
- Pushed — local workspace AND matching server draft (shows edit URL)
- Server-only — draft on substack with no local workspace (created via web)
- Local-only fresh — workspace exists, no server match, post.md mtime within 3 days
- Local-only STALE — workspace exists, no server match, post.md mtime older than 3 days. These are the "forgotten" drafts.
- Surface the table verbatim to the user. If any STALE entries exist, offer to push them via
mph-substack-publish(do not push automatically).
Hard rules
- 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. - Reuse the existing
secrets.envauth pattern fromcreate_draft_from_md.py. Do not invent a new auth flow. - Do not commit
~/.mph-substack-cache/contents to git. Those workspaces are local-only by user policy. - If
SUBSTACK_SIDis missing, print a clear error pointing atsecrets.envand exit 2. Do not try to interactively prompt for credentials. - Stale threshold = 3 days. If user wants a different threshold, pass
--stale-days N.
Out of scope
- Pushing, publishing, or editing drafts (use mph-substack-publish for the push)
- Listing published posts (the API endpoint is different and not interesting for the "did I save it" problem)
- Multi-publication support (only mphinance.substack.com)
- Anything that requires network calls beyond the single GET to /api/v1/drafts
04 同仓库更多 Skills
order-lifecycle-safety
Idempotency, reconcile-before-retry, audit-before-forward and environment-proof preflight rules for any code or agent that places broker orders. Use when building or reviewing an order path, handling a timeout or unknown order outcome, adding client_order_id, deciding whether a retry is safe, or confirming paper vs live before sending an order.
order-lifecycle-safety
Idempotency, reconcile-before-retry, audit-before-forward and environment-proof preflight rules for any code or agent that places broker orders. Use when building or reviewing an order path, handling a timeout or unknown order outcome, adding client_order_id, deciding whether a retry is safe, or confirming paper vs live before sending an order.
write-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
wireframe-sketch
A hand-drawn wireframe exploration — graph-paper background, marker / pencil tone, multiple tab labels for variants, sticky-note annotations, scribbled chart placeholders, hatched fills. Reads like a designer's whiteboard before any pixels are committed. Use when the brief asks for "wireframe", "sketch wireframe", "hand-drawn", "lo-fi", "whiteboard", "草稿", or "手绘原型".
weekly-update
Single-file horizontal-swipe slide deck for a weekly team update — shipped, in flight, blocked, metrics, asks. 6–8 slides. Use when the brief mentions "weekly update", "team update slides", "weekly status", "周报演示".
webull-openapi
Trade stocks, options, futures, crypto, and event contracts on Webull. Query real-time and historical market data. Manage accounts and positions. Supports US, HK, JP, SG, TH, MY, UK, MX, BR, EU, ZA, and AU regions with configurable risk controls.