← Back to Skills Marketplace
manifoldor

ghost cms

by manifold · GitHub ↗ · v1.0.5 · MIT-0
cross-platform ✓ Security Clean
1696
Downloads
2
Stars
2
Active Installs
3
Versions
Install in OpenClaw
/install ghost
Description
Manage Ghost CMS blog posts via Admin API. Supports creating, updating, deleting, and listing posts. Use when the user needs to programmatically manage Ghost...
README (SKILL.md)

Ghost CMS Admin API

Manage your Ghost blog posts programmatically through the Admin API.

Features

  • 📝 Create/Update/Delete posts - Full CRUD operations
  • 🖼️ Upload images - Upload images to Ghost and get URL
  • 🎨 Feature images - Set cover images for posts
  • 📊 List posts - View recent posts with status
  • 🏷️ Tags support - Add tags to posts

Prerequisites

1. Get Admin API Key

  1. Log in to your Ghost Admin panel (https://your-blog.com/ghost/)
  2. Go to SettingsIntegrations
  3. Click "Add custom integration"
  4. Copy the Admin API Key (format: id:secret)

2. Create Configuration File

唯一调用方式:自定义配置文件路径(项目隔离)

Create a JSON config file for your site:

Example: /Users/ethan/.openclaw/workspace/projects/fuye/ghost-admin.config.json

{
  "api_url": "https://fu-ye.com/ghost/api/admin",
  "admin_api_key": "your-id:your-secret"
}

CLI Usage

Method: Custom Config Path (唯一方式)

python3 scripts/ghost.py list --config "../../projects/fuye/ghost-admin.config.json"
python3 scripts/ghost.py create "Title" "Content" --config "../../projects/fuye/ghost-admin.config.json"
python3 scripts/ghost.py upload image.png --config "../../projects/fuye/ghost-admin.config.json"

Python API Usage

Method: Custom Config Path (唯一方式)

import sys
import os
sys.path.insert(0, os.path.expanduser("~/.openclaw/workspace/skills/ghost/scripts"))
import ghost

# 唯一方式:通过配置文件路径获取配置
config = ghost.get_config(config_path="../../projects/fuye/ghost-admin.config.json")

# Create post
result = ghost.create_post(
    config=config,
    title="My Article Title",
    content="\x3Ch1>Title\x3C/h1>\x3Cp>Content...\x3C/p>",
    status="published",
    tags=["tech", "news"]
)

3. Install Dependencies

pip3 install requests pyjwt --user

Python API Usage

Create a Post

import sys
import os
sys.path.insert(0, os.path.expanduser("~/.openclaw/workspace/skills/ghost/scripts"))
import ghost

# 通过配置文件路径获取配置(唯一方式)
config = ghost.get_config(config_path="../../projects/fuye/ghost-admin.config.json")

# Create post with HTML content
result = ghost.create_post(
    config=config,
    title="My Article Title",
    content="\x3Ch1>Title\x3C/h1>\x3Cp>Content...\x3C/p>",  # HTML format
    status="published",  # or "draft"
    tags=["tech", "news"]
)

Upload Image

# Upload image and get URL
image_url = ghost.upload_image(config, "/path/to/image.jpg")
print(f"Image URL: {image_url}")

Create Post with Feature Image

# Upload cover image first
cover_image_url = ghost.upload_image(config, "cover.jpg")

# Create post with feature image
result = ghost.create_post(
    config=config,
    title="Article with Cover",
    content="\x3Cp>Article content...\x3C/p>",
    status="published",
    feature_image=cover_image_url,  # Set cover image
    tags=["featured"]
)

List Posts

posts = ghost.list_posts(config, limit=20)
for post in posts:
    print(f"{post['title']} - {post['status']}")

Update Post

ghost.update_post(
    config=config,
    post_id="post-id-here",
    title="New Title",
    status="published"
)

CLI Usage

Setup

# Install dependencies
pip3 install requests pyjwt --user

Create a Post

As draft (default):

python3 scripts/ghost.py create "My Article Title" "\x3Cp>Article content in HTML\x3C/p>" --config "../../projects/fuye/ghost-admin.config.json"

Publish immediately:

python3 scripts/ghost.py create "Breaking News" "\x3Cp>Content here\x3C/p>" --status published --config "../../projects/fuye/ghost-admin.config.json"

With tags:

python3 scripts/ghost.py create "Tech News" "\x3Cp>Content\x3C/p>" --status published --tags "tech,news,ai" --config "../../projects/fuye/ghost-admin.config.json"

Upload Image

python3 scripts/ghost.py upload cover.png --config "../../projects/fuye/ghost-admin.config.json"

Update a Post

# Update title
python3 scripts/ghost.py update 5f8c3c2e8c3d2e1f3a4b5c6d --title "New Title" --config "../../projects/fuye/ghost-admin.config.json"

# Update content
python3 scripts/ghost.py update 5f8c3c2e8c3d2e1f3a4b5c6d --content "\x3Cp>New content\x3C/p>" --config "../../projects/fuye/ghost-admin.config.json"

# Publish a draft
python3 scripts/ghost.py update 5f8c3c2e8c3d2e1f3a4b5c6d --status published --config "../../projects/fuye/ghost-admin.config.json"

Delete a Post

python3 scripts/ghost.py delete 5f8c3c2e8c3d2e1f3a4b5c6d --config "../../projects/fuye/ghost-admin.config.json"

List Posts

# List 10 most recent posts (default)
python3 scripts/ghost.py list --config "../../projects/fuye/ghost-admin.config.json"

# List 20 posts
python3 scripts/ghost.py list 20 --config "../../projects/fuye/ghost-admin.config.json"

Common Workflows

Publish with Cover Image

import sys
import os
sys.path.insert(0, os.path.expanduser("~/.openclaw/workspace/skills/ghost/scripts"))
import ghost

# 唯一方式:通过配置文件路径获取配置
config = ghost.get_config(config_path="../../projects/fuye/ghost-admin.config.json")

# Upload cover image
image_url = ghost.upload_image(config, "/path/to/cover.jpg")

# Create post with cover
result = ghost.create_post(
    config=config,
    title="Featured Article",
    content="\x3Cp>Article content...\x3C/p>",
    status="published",
    feature_image=image_url,
    tags=["featured", "tech"]
)

print(f"Published: {result['url']}")

Batch Operations

# List all drafts
python3 scripts/ghost.py list 100 --config "../../projects/fuye/ghost-admin.config.json" | grep "🟡"

# Update specific post
python3 scripts/ghost.py update \x3Cid> --tags "featured" --config "../../projects/fuye/ghost-admin.config.json"

API Reference

ghost.get_config(config_path)

唯一方式获取配置。

Parameters:

  • config_path - Path to JSON configuration file (e.g., "../../projects/fuye/ghost-admin.config.json")

Returns: Config dict with api_url and admin_api_key

ghost.create_post(config, title, content, status='draft', tags=None, feature_image=None)

Create a new post.

Parameters:

  • config - Configuration dict from get_config(config_path)
  • title - Post title
  • content - HTML content
  • status - 'draft' or 'published'
  • tags - List of tag names
  • feature_image - URL of cover image (optional)

Returns: Post dict with id, url, status

ghost.upload_image(config, image_path)

Upload an image to Ghost.

Parameters:

  • config - Configuration dict
  • image_path - Local path to image file

Returns: Image URL string

ghost.list_posts(config, limit=10)

List recent posts.

Returns: List of post dicts

ghost.update_post(config, post_id, **kwargs)

Update existing post.

Parameters:

  • post_id - Post ID to update
  • title - New title (optional)
  • content - New content (optional)
  • status - New status (optional)
  • tags - New tags (optional)

ghost.delete_post(config, post_id)

Delete a post.

Troubleshooting

Error: No module named 'jwt' → Install: pip3 install pyjwt --user

Error: 401 Unauthorized → Check your Admin API Key is correct and not expired

Error: 404 Not Found → Verify api_url in config file ends with /ghost/api/admin

Error: Config file not found → Ensure config_path is correct relative to your working directory

Image upload fails → Check image file exists and is under 10MB → Supported formats: JPG, PNG, GIF

References

Usage Guidance
This skill is coherent with its Ghost CMS purpose, but review these before installing: (1) You must provide a JSON config file containing api_url and the Admin API Key (id:secret); store that file securely and do not commit it to source control. (2) The script will download external image URLs provided by you and re-upload them to your Ghost instance — avoid passing untrusted URLs to prevent unexpected outbound requests. (3) Examples and one conditional branch are specific to a sample domain (fu-ye.com) and example file paths; replace those with your own. (4) The scripts call requests and pyjwt — install those packages in an isolated environment (virtualenv) and inspect scripts/ghost.py yourself before use (there is a small truncation/typo in the distributed listing that suggests verifying the full file). If you need the platform to manage credentials, consider storing the Admin API Key in a secure secret store instead of a filesystem file.
Capability Analysis
Type: OpenClaw Skill Name: ghost Version: 1.0.5 The 'ghost' skill bundle provides a functional client for managing Ghost CMS content via its Admin API. It includes features for CRUD operations on posts and image uploads, using standard JWT authentication and JSON configuration files. The script (scripts/ghost.py) handles authentication, post creation with Markdown-to-HTML conversion, and image localization correctly. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found; the code logic and instructions in SKILL.md align with the stated purpose of blog management.
Capability Assessment
Purpose & Capability
Name/description (Ghost Admin API client) match the included code and instructions. The skill expects a JSON config file containing api_url and admin_api_key rather than environment variables; that is a legitimate design choice but differs from many skills that declare required env vars. Some sample paths and a hardcoded domain ('fu-ye.com') appear to be leftover from the original author's environment and are not necessary for general use.
Instruction Scope
SKILL.md and the code keep to Ghost management tasks (create/update/delete/list posts, upload images). The runtime instructions explicitly require a user-provided JSON config file and instruct installing only requests and pyjwt. The code will download remote images when given external image URLs (to re-upload them) which is consistent with the stated 'localize upload' behavior; this means the script can make arbitrary outbound HTTP GET requests for images if the user supplies external URLs.
Install Mechanism
There is no automated install spec; the skill is instruction-and-script only. Dependencies are installed via pip as documented in SKILL.md (requests, pyjwt). No downloads from untrusted arbitrary URLs or archive extraction were found in the provided files.
Credentials
The skill requests no platform environment variables, relying instead on a local JSON config file containing the Admin API Key (id:secret). That is proportionate to the stated purpose. However, the registry metadata does not declare this config requirement as a required credential, which is a minor metadata mismatch the user should be aware of.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent configuration. It runs as an on-demand script and examples show importing the local script; no persistent or elevated privileges are requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ghost
  3. After installation, invoke the skill by name or use /ghost
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.5
Initial release with full Ghost CMS blog management via Admin API, including image uploads: - Create, update, delete, and list blog posts through Ghost Admin API - NEW: Upload images and set feature images (cover images) for posts - Full CLI and Python API support for all actions - Tag management on posts - Unique configuration via explicit JSON config path for secure, project-based isolation
v1.0.1
Major update: Adds image upload and feature image support for Ghost blog posts. - New ability to upload images directly to Ghost and obtain their URLs. - Posts can now include a feature (cover) image both via Python API and CLI. - Expanded Python API: functions for image upload, post creation with cover image, and post listing. - Updated documentation with clear Python and CLI usage, batch operations, and troubleshooting. - Maintains all existing post management (create, update, delete, list) features.
v1.0.0
- Initial release of the "ghost" skill for managing Ghost CMS blog posts via the Admin API. - Supports creating, updating, deleting, and listing posts programmatically. - Includes detailed setup instructions and usage examples for common workflows. - Requires GHOST_API_URL and GHOST_ADMIN_API_KEY environment variables for authentication. - Troubleshooting section added for common errors.
Metadata
Slug ghost
Version 1.0.5
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 3
Frequently Asked Questions

What is ghost cms?

Manage Ghost CMS blog posts via Admin API. Supports creating, updating, deleting, and listing posts. Use when the user needs to programmatically manage Ghost... It is an AI Agent Skill for Claude Code / OpenClaw, with 1696 downloads so far.

How do I install ghost cms?

Run "/install ghost" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ghost cms free?

Yes, ghost cms is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ghost cms support?

ghost cms is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ghost cms?

It is built and maintained by manifold (@manifoldor); the current version is v1.0.5.

💬 Comments