Using Ghost Admin API

Community

Master Ghost blog posts with direct API control.

Authorhoufu
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides comprehensive programmatic access to the Ghost Admin API, automating the creation, editing, and analysis of blog posts, drafts, and other content. It eliminates the need for manual interaction with the Ghost dashboard for complex content management tasks, saving significant time and reducing errors.

Core Features & Use Cases

  • Content Management: Programmatically create, update, and delete posts and pages, including setting status (draft, published, scheduled).
  • Lexical Content Builder: Construct Ghost's rich Lexical JSON format for advanced content structures, ensuring full editor compatibility.
  • Automated Metadata Generation: Automatically generate missing titles, custom excerpts, and relevant tags for posts, ensuring consistency and SEO readiness.
  • Use Case: Automatically publish a series of pre-written articles as drafts, complete with SEO-friendly excerpts and relevant tags, without ever logging into the Ghost admin panel. This is ideal for bulk uploads or integrating with external content pipelines.

Quick Start

Ensure GHOST_SITE_URL and GHOST_ADMIN_API_KEY are set in your environment.

This example uses the bundled Node.js script for Lexical content generation.

const { LexicalBuilder, text } = require('./.claude/skills/using-ghost-admin-api/scripts/ghost-lexical-single.js'); const GhostAdminAPI = require('@tryghost/admin-api');

const api = new GhostAdminAPI({ url: process.env.GHOST_SITE_URL, key: process.env.GHOST_ADMIN_API_KEY, version: 'v6.0' });

const content = new LexicalBuilder() .h1('My Automated Post Title') .paragraph('This post was created by AI using the Ghost Admin API skill.') .build();

api.posts.add({ title: "AI-Generated Draft Post", lexical: JSON.stringify(content), status: "draft", custom_excerpt: "A concise summary generated by AI.", tags: [{ name: "Automation" }, { name: "AI" }] }) .then(response => console.log('Post created:', response.url)) .catch(error => console.error('Error:', error));

Dependency Matrix

Required Modules

@tryghost/admin-api

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Using Ghost Admin API
Download link: https://github.com/houfu/blog-alt-counsel/archive/main.zip#using-ghost-admin-api

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.