Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

ghost-posts

FreeNo executable scriptsNot checked

Previews and updates Ghost post content through the Admin API, including text, links, images, and iframe destinations. Use for content edits rather than theme…

zoltanmaricby zoltanmaric★ 70 GitHub stars

About this skill

Ghost posts

Read .secrets/ghost-admin.json with nonempty url and key fields. Keep it ignored and mode 0600. Never print credentials. Keep credentials, private snapshots, draft content and preview URLs out of Git. If credentials are missing or rejected, ask the user to correct this private file. Use the Admin API or its JavaScript client.

Prepare

  • Fetch the target with GET /ghost/api/admin/posts/slug/{slug}/?formats=lexical,html. Confirm its identity and status; save the original response privately.
  • Parse its lexical JSON string and edit only the intended nodes. For an iframe in an HTML card (type: "html"), change only the intended src in that card's html, preserving its other attributes and surrounding markup.
  • Match replacements exactly; stop if the target is absent or ambiguous. If it is already correct, do not save. Preserve editor structure instead of round-tripping rendered HTML through source=html.

Images

Upload replacements with POST /ghost/api/admin/images/upload/ using multipart file and purpose=image. The returned images[0].url is a stored image URL; an upload does not attach itself to a post or replace an existing image. Update the intended Lexical image src, HTML-card image attributes, bookmark thumbnail metadata, or post feature_image (landing-page cards). Reuse uploads for repeated images and retain originals for recovery. Verify hosted size, dimensions and animation: Ghost can recompress uploads. If using its saved original copy instead, verify that URL exists and its bytes match the conversion. Also check the actual responsive URLs rendered by the theme for slow resize redirects; see the animated-image workflow.

Preview

  • Create a temporary draft with the proposed content using POST /ghost/api/admin/posts/. Copy the writable fields that affect rendering: title, editor content, feature image/alt/caption, authors, tags, excerpt, template, visibility, post code injection, and publication date where present. Omit the original ID, UUID and slug; set status: "draft" and omit email options. Leave the original post untouched, including when it is already a draft.
  • Use the saved draft's UUID to provide <site-url>/p/<uuid>/. Open it to check the proposed change. A published post's /p/ URL redirects to its live page.
  • Return paired Before (original published URL) and After (Ghost preview URL) links with a short change summary. For an unpublished original, use its Ghost preview URL as Before. Wait for explicit approval before applying changes.

Apply

  • After approval, re-fetch the original and compare it with the saved snapshot. If concurrent edits change the proposal, update the preview and seek approval again; do not overwrite them with an old document.
  • Update the original, not the preview copy, with PUT /ghost/api/admin/posts/{id}/?save_revision=true. Send only changed fields and the checked updated_at. For body edits, send posts: [{lexical: JSON.stringify(editedDocument), updated_at: checked.updated_at}]. Preserve unrelated metadata, status and publication date; omit email options.
  • On a collision, re-fetch and reconcile before retrying. After an uncertain response, read the post to determine whether the edit already succeeded.

Verify

Re-fetch and confirm the intended change and preserved metadata. Check the public page for published posts, or the original post’s Ghost preview for drafts. Verify the affected image, link or embed in a browser; an HTTP 200 alone does not verify an interactive embed. After a successful update, remove only the temporary preview draft created for this edit and report the result.

See Ghost's post format and update contract.

Full SKILL.md on GitHub

Install ghost-posts in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the ghost-posts skill do?

Previews and updates Ghost post content through the Admin API, including text, links, images, and iframe destinations. Use for content edits rather than theme or server changes.

How do I install the ghost-posts skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the ghost-posts skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare ghost-posts with