360 Secure SkillHub
360 安全技能中心

Ghost CMS Agent

这是一款Ghost CMS管理工具,支持自托管及Ghost Pro站点,需配置站点URL与API密钥。核心功能包括:通过bash脚本获取不同状态的文章、创建并按需发布Markdown格式的文章、增查标签、查询站点核心统计数据。输入为带参数的bash命令,输出默认JSON格式,部分支持表格展示,适合内容运营者快速管理内容、查看站点数据。

kryzl19
kryzl19
热度 42.13
最近更新 2026-05-11 17:36:26
分类:自动化依赖:代码执行 / 第三方 API应用场景:博客写作 / 自动化脚本 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ghost-cms-agent
Metadata
name
ghost-cms
description
Manage Ghost CMS content via the REST API. Create and publish posts, manage tags, and fetch site analytics. Supports both the Content API (public data) and Admin API (authenticated management).
metadata
{"openclaw":{"emoji":"👻","requires":{"env":["GHOST_URL","GHOST_ADMIN_API_KEY"]}}}

Ghost CMS

Manage Ghost CMS content via its REST API. Works with self-hosted and Ghost Pro sites.

Configuration

# Your Ghost site URL
export GHOST_URL="https://example.com"

# Admin API key (from Ghost Admin > Settings > Integrations)
export GHOST_ADMIN_API_KEY="your-admin-api-key"

# Optional: Content API key (for public data)
export GHOST_CONTENT_API_KEY="your-content-api-key"

Get Posts

bash skills/ghost-cms/scripts/posts.sh [--limit 10] [--page 1] [--status published]

Options:

  • --limit — Number of posts to return (default: 10)
  • --page — Page number (default: 1)
  • --status — Filter by status: published, draft, scheduled, all (default: published)
  • --format — Output format: json or table (default: json)

Create a New Post

bash skills/ghost-cms/scripts/new-post.sh \
  --title "My New Post" \
  --content "## Hello World

This is the post content in Markdown." \
  --tags "news,updates" \
  --publish

Options:

  • --title — Post title (required)
  • --content — Post content in Markdown (required)
  • --excerpt — Short excerpt/summary (optional)
  • --tags — Comma-separated tag names (optional, auto-creates)
  • --publish — Publish immediately (omit to save as draft)
  • --featured — Mark as featured (optional)

Manage Tags

# List all tags
bash skills/ghost-cms/scripts/tags.sh --list

# Create a tag
bash skills/ghost-cms/scripts/tags.sh --create --name "Tutorials" --description "How-to guides" --slug "tutorials"

# Get a tag by slug
bash skills/ghost-cms/scripts/tags.sh --slug "tutorials"

Get Site Stats

bash skills/ghost-cms/scripts/stats.sh

Returns: total posts, total published posts, total draft posts, total members, total paid members, total pageviews (if stats addon is enabled)

Notes

  • Admin API key format: [id]:[apiKey] — split on the colon, use the second part as the bearer token
  • Tags are created automatically if they don't exist when creating posts
  • Ghost uses a Content-Type: application/json header for all API calls
  • All scripts output JSON by default; use --format table for human-readable output where supported