Install
openclaw skills install ghost-cmsComprehensive Ghost CMS integration for creating, publishing, scheduling, and managing blog content, newsletters, members, and analytics. Use when working with Ghost blogs for content creation (drafts, publishing, scheduling), member/subscriber management (tiers, newsletters), comment moderation, or analytics (popular posts, subscriber growth). Supports all Ghost Admin API operations.
openclaw skills install ghost-cmsManage Ghost blog content, members, analytics, and newsletters through the Ghost Admin API.
Ghost Admin API keys provide FULL access to your Ghost site:
Published content is IMMEDIATELY PUBLIC - be extra careful with publish operations.
Security Best Practices:
Admin API Key Scope: Ghost Admin API keys have no scoping options - they provide full access to everything. There are no read-only keys.
Operation Types:
Read-Only Operations (✅ Safe):
Destructive Operations (⚠️ Modify or delete data, may be public):
For detailed operation documentation, see api-reference.md.
Get your Ghost Admin API credentials:
Store credentials securely:
Option A: Environment Variables (Recommended)
# Add to your shell profile (~/.zshrc, ~/.bashrc)
export GHOST_ADMIN_KEY="YOUR_ADMIN_API_KEY"
export GHOST_API_URL="YOUR_GHOST_URL"
API URL Examples (works with ALL hosting types):
# Ghost(Pro) hosted
export GHOST_API_URL="https://yourblog.ghost.io"
# Self-hosted with reverse proxy (production)
export GHOST_API_URL="https://blog.yourdomain.com"
# Self-hosted development (Ghost default port 2368)
export GHOST_API_URL="http://localhost:2368"
# Self-hosted with custom port
export GHOST_API_URL="https://ghost.example.com:8080"
Important:
http:// or https://):PORT if Ghost runs on non-standard port/ghost/api/admin (added automatically)Option B: Config Files
mkdir -p ~/.config/ghost
echo "YOUR_ADMIN_API_KEY" > ~/.config/ghost/api_key
echo "YOUR_GHOST_URL" > ~/.config/ghost/api_url
# Secure the files (owner read-only)
chmod 600 ~/.config/ghost/api_key
chmod 600 ~/.config/ghost/api_url
Option C: 1Password CLI (Most Secure)
# Store key in 1Password
op item create --category=API_CREDENTIAL \
--title="Ghost Admin API" \
admin_key[password]="YOUR_ADMIN_API_KEY" \
api_url[text]="YOUR_GHOST_URL"
# Use in commands
export GHOST_ADMIN_KEY=$(op read "op://Private/Ghost Admin API/admin_key")
export GHOST_API_URL=$(op read "op://Private/Ghost Admin API/api_url")
Security Notes:
Install dependencies:
cd ghost-cms-skill/scripts
npm install
Dependencies installed:
form-data (^4.0.5) - Multipart file uploads (theme ZIP files)jsonwebtoken (^9.0.3) - JWT token generation for Ghost Admin API authenticationOptional dependencies (install manually if needed):
gscan (^5.2.4) - Official Ghost theme validator (from TryGhost)
cd scripts && npm install gscanAll dependencies from public npm registry. No custom downloads.
Test connection: See setup.md for detailed authentication and troubleshooting.
Purpose: Migrate existing Ghost snippets to local library for programmatic use.
Why needed: Ghost Admin API blocks snippet access (403 Forbidden) for integration tokens. This tool works around that limitation.
Usage:
# Extract snippets from a specially-formatted draft post
node scripts/snippet-extractor.js my-snippets-post
# Validate format before extracting
node scripts/snippet-extractor.js my-snippets-post --validate
# Preview without saving
node scripts/snippet-extractor.js my-snippets-post --dry-run
# Custom marker prefix
node scripts/snippet-extractor.js my-snippets-post --marker "This is:"
# Full help
node scripts/snippet-extractor.js --help
Workflow:
snippets/library/Features:
~/.config/ghost/ or env varsExample:
# User has 12 snippets in Ghost
# Creates "My Snippets" draft with markers
# Runs: node scripts/snippet-extractor.js my-snippets --marker "This is:"
# Result: All 12 snippets in library/ ready for use
See snippets/README.md for complete documentation.
Purpose: Upload, activate, switch, and manage Ghost themes programmatically.
Why needed: Automate theme deployments, switch themes, manage theme versions.
Usage:
cd scripts
# List all installed themes
node theme-manager.js list
# Upload theme ZIP
node theme-manager.js upload /path/to/theme.zip
# Upload and activate immediately
node theme-manager.js upload /path/to/theme.zip --activate
# Activate existing theme
node theme-manager.js activate theme-name
# Download theme backup
node theme-manager.js download theme-name backup.zip
# Delete theme (cannot delete active theme)
node theme-manager.js delete old-theme
# Show current active theme
node theme-manager.js active
Features:
⚠️ Important:
Workflow:
# Safe theme switching with rollback
node theme-manager.js active # Note current theme
node theme-manager.js activate new-theme # Switch to new theme
# Test site in browser
node theme-manager.js activate old-theme # Rollback if needed
See references/themes.md for complete theme management documentation and best practices.
Purpose: Validate Ghost themes before uploading using official gscan validator.
⚠️ Optional Feature: Requires gscan package. Install with:
cd scripts
npm install gscan
Why needed: Catch errors early - missing files, invalid syntax, deprecated helpers, version incompatibility.
Usage:
cd scripts
# Validate theme directory
node theme-validator.js ~/themes/my-theme/
# Validate ZIP file
node theme-validator.js theme.zip
# Target specific Ghost version
node theme-validator.js theme.zip --version v6
# JSON output for CI/CD
node theme-validator.js theme.zip --json
# Show only errors (hide warnings)
node theme-validator.js theme.zip --errors-only
Features:
Validation levels:
Safe deployment workflow:
# 1. Validate before upload
node theme-validator.js my-theme.zip
# 2. Fix any errors
# 3. Re-validate
node theme-validator.js my-theme.zip
# 4. Upload when clean
node theme-manager.js upload my-theme.zip
CI/CD integration:
node theme-validator.js theme.zip --json
if [ $? -eq 0 ]; then
node theme-manager.js upload theme.zip --activate
fi
Exit codes: 0 = valid, 1 = errors found, 2 = invalid arguments
See references/themes.md for complete validation documentation and common error fixes.
This skill covers all major Ghost operations. Navigate to the relevant reference for detailed guidance:
When to use: Creating drafts, publishing posts, scheduling content, managing pages
See content.md for:
See lexical-cards.md for:
⚠️ Ghost Snippets Limitation:
Ghost's native snippet feature (reusable content blocks saved in the editor) cannot be accessed via the Admin API with integration tokens (403 Forbidden). This means:
Solution: Automated Snippet Extraction
The skill includes a snippet extractor tool that migrates Ghost snippets to local files:
node scripts/snippet-extractor.js post-slugsnippets/library/ for programmatic useCommands:
# Extract snippets (auto-detects credentials from ~/.config/ghost/)
node scripts/snippet-extractor.js my-snippets-post
# Validate format before extracting
node scripts/snippet-extractor.js my-snippets-post --validate
# Preview without saving
node scripts/snippet-extractor.js my-snippets-post --dry-run
# Custom marker format
node scripts/snippet-extractor.js my-snippets-post --marker "This is:"
# Full help
node scripts/snippet-extractor.js --help
Benefits:
See snippets/README.md for complete documentation on extraction workflow and local snippet usage.
When to use: Checking subscriber counts, popular content, traffic trends
See analytics.md for:
When to use: Responding to comments, moderating discussions
See comments.md for:
When to use: Managing subscriber tiers, member access, premium content
See members.md for:
When to use: Managing newsletter settings, email campaigns
See newsletters.md for:
For advanced operations or endpoint details, see api-reference.md.
Draft → Notion → Ghost:
Weekly content series:
Comment management:
Analytics check: