Manage Ghost CMS blog posts via Admin API. Supports creating, updating, deleting, and listing posts. Use when the user needs to programmatically manage Ghost...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install ghost或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install ghost⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/ghost/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: ghost description: Manage Ghost CMS blog posts via Admin API. Supports creating, updating, deleting, and listing posts. NEW: Upload images and set feature images for posts. Use when the user needs to programmatically manage Ghost blog content. Requires a JSON configuration file with API credentials. ---
Manage your Ghost blog posts programmatically through the Admin API.
https://your-blog.com/ghost/)id:secret)唯一调用方式:自定义配置文件路径(项目隔离)
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"
}
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"
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="<h1>Title</h1><p>Content...</p>",
status="published",
tags=["tech", "news"]
)
pip3 install requests pyjwt --user
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="<h1>Title</h1><p>Content...</p>", # HTML format
status="published", # or "draft"
tags=["tech", "news"]
)
# Upload image and get URL
image_url = ghost.upload_image(config, "/path/to/image.jpg")
print(f"Image URL: {image_url}")
# 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="<p>Article content...</p>",
status="published",
feature_image=cover_image_url, # Set cover image
tags=["featured"]
)
posts = ghost.list_posts(config, limit=20)
for post in posts:
print(f"{post['title']} - {post['status']}")
ghost.update_post(
config=config,
post_id="post-id-here",
title="New Title",
status="published"
)
# Install dependencies
pip3 install requests pyjwt --user
As draft (default):
python3 scripts/ghost.py create "My Article Title" "<p>Article content in HTML</p>" --config "../../projects/fuye/ghost-admin.config.json"
Publish immediately:
python3 scripts/ghost.py create "Breaking News" "<p>Content here</p>" --status published --config "../../projects/fuye/ghost-admin.config.json"
With tags:
python3 scripts/ghost.py create "Tech News" "<p>Content</p>" --status published --tags "tech,news,ai" --config "../../projects/fuye/ghost-admin.config.json"
python3 scripts/ghost.py upload cover.png --config "../../projects/fuye/ghost-admin.config.json"
# 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 "<p>New content</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"
python3 scripts/ghost.py delete 5f8c3c2e8c3d2e1f3a4b5c6d --config "../../projects/fuye/ghost-admin.config.json"
# 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"
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="<p>Article content...</p>",
status="published",
feature_image=image_url,
tags=["featured", "tech"]
)
print(f"Published: {result['url']}")
# 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 <id> --tags "featured" --config "../../projects/fuye/ghost-admin.config.json"
唯一方式获取配置。
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
Create a new post.
Parameters:
config - Configuration dict from get_config(config_path)title - Post titlecontent - HTML contentstatus - 'draft' or 'published'tags - List of tag namesfeature_image - URL of cover image (optional)Returns: Post dict with id, url, status
Upload an image to Ghost.
Parameters:
config - Configuration dictimage_path - Local path to image fileReturns: Image URL string
List recent posts.
Returns: List of post dicts
Update existing post.
Parameters:
post_id - Post ID to updatetitle - New title (optional)content - New content (optional)status - New status (optional)tags - New tags (optional)Delete a post.
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
安装 ghost cms 后,可以对 AI 说这些话来触发它
Help me get started with ghost cms
Explains what ghost cms does, walks through the setup, and runs a quick demo based on your current project
Use ghost cms to manage Ghost CMS blog posts via Admin API
Invokes ghost cms with the right parameters and returns the result directly in the conversation
What can I do with ghost cms in my marketing & growth workflow?
Lists the top use cases for ghost cms, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/ghost/ 目录(个人级,所有项目可用),或 .claude/skills/ghost/(项目级)。重启 AI 客户端后,用 /ghost 主动调用,或让 AI 根据上下文自动发现并使用。
ghost cms 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
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...
ghost cms 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using ghost cms
Identifies repetitive steps in your workflow and sets up ghost cms to handle them automatically