push-draft
БесплатноБез исполняемых скриптовНе проверенUse to push a finished local Ghost draft to the Ghost site as a draft (never published) — pull-guards against in-editor edits, uploads the feature image…
от schuettc★ 15 звёзд на GitHubОб этом скилле
Push a local draft to Ghost (draft-only)
You are pushing a finished local .md draft to the Ghost site as a draft. This skill never publishes or schedules — every push sets status: draft without exception. Work through each phase in order.
DRAFT-ONLY INVARIANT
status: drafton every single push. No exceptions.Never set
status: published,status: scheduled, or any non-draft status. Never call a publish or schedule endpoint. If the author asks you to publish directly, decline and return the editor URL — Ghost's UI is where publishing happens.
This invariant governs every phase below.
Phase 1: Load config
Read .claude/ghost.local.md and extract:
Read(".claude/ghost.local.md")
Fields you need:
drafts_dir— where local draft.mdfiles live (defaultblog-posts/drafts).default_tags— tags every post gets automatically, e.g.["engineering"]. May be[].default_visibility—public,members, orpaid(defaultpublic).early_access.enabled— whether to apply the early-access paywall pattern.early_access.tag— tag slug to add when early-access is enabled (e.g."early-access").early_access.visibility— visibility override when early-access is enabled (e.g."paid").
If ghost.local.md does not exist, use the defaults above and note it.
Identify the target draft
If the author provided a path, use it directly. Otherwise list the files in drafts_dir and ask:
"I found these drafts in
<drafts_dir>:
<filename1><filename2>Which one should we push?"
Read the draft file:
Read("<drafts_dir>/<filename>.md")
Parse the frontmatter to extract:
title— post title.slug— if set, this is the existing Ghost post slug (update path); if absent, this is a new post (create path).tags— tags declared in the frontmatter (may be[]or absent).feature_image— local path or URL of the feature image (may be absent).visibility— per-post override; if absent, usedefault_visibility.
Phase 2: Pull-guard (update path only)
This phase applies only when the draft frontmatter contains a slug (meaning the post already exists on Ghost). Skip to Phase 3 if slug is absent.
2a. Fetch the live post
ghost_post_get(slug="<slug>")
Capture:
id— needed for the update call in Phase 4.lexical— the live card-split content.updated_at— the live post's last-modified timestamp.
2b. Reconstruct live content to text
Parse the lexical JSON to plain text (strip card wrappers, extract children[].text from each card). This produces the "live version" for diffing.
2c. Diff live vs. local
Compare the reconstructed live text against the body of the local .md file (below the frontmatter).
If the diff is empty or trivially whitespace-only — no in-editor changes detected. Proceed to Phase 3.
If the diff contains meaningful content changes — someone has edited the post in the Ghost UI since the local draft was last synced. You must fold those changes in before overwriting.
Fold the in-editor changes into the LOCAL file first:
Show the author a summary of the diff:
"The live Ghost post has been edited since your local draft was last synced. Here are the differences:
<diff output>I'll merge these changes into your local file before pushing."
Apply the live-post additions/changes to the local
.mdfile. Where the live version and the local version conflict on the same passage, prefer the local version (the author's latest intent) but surface the conflict:"Conflict in section '
': the Ghost version says X; your local draft says Y. I'm keeping your local version — let me know if you want the Ghost version instead." Write the merged result back to the local file:
Edit("<drafts_dir>/<filename>.md", <old body>, <merged body>)Pause and ask the author to review before continuing:
"Merge complete — I've folded the live Ghost edits into your local draft. Please review the updated file above, then tell me to continue when you're ready."
Do not proceed to the next phase (feature image / push) until the author explicitly confirms.
Never push to Ghost without first resolving this diff. The pull-guard ensures you never silently clobber an in-editor edit.
Phase 3: Feature image upload
If the draft frontmatter contains a feature_image field, check whether it is a local file path (not an https:// URL already hosted on Ghost).
If local path:
ghost_image_upload(path="<feature image local path>")
The tool returns {url}. Record the returned url — you will pass it as feature_image in Phase 4.
If already an https:// URL — use it as-is; no upload needed.
If absent — no feature image; omit the field in Phase 4.
Phase 4: Resolve tags
Merge the tag list from three
Установить push-draft в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл push-draft?
Use to push a finished local Ghost draft to the Ghost site as a draft (never published) — pull-guards against in-editor edits, uploads the feature image, creates or updates the post, verifies links, and feeds the approved post back into the style guide. Triggers on "push this to ghost", "send the draft to ghost", "publish to ghost as a draft".
Как установить скилл push-draft?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл push-draft запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic