ghost
БесплатноБез исполняемых скриптовНе проверенGhost is an open-source Node.js publishing platform for blogs, newsletters and paid membership sites. Use this skill to run Ghost with Docker or ghost-cli…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Ghost — Professional Publishing Platform
Overview
Ghost is an open-source Node.js publishing platform (currently the 6.x line) with a built-in editor, email newsletters, paid memberships through Stripe, and SEO features. It can be used as a normal themed site or as a headless CMS: editors write in Ghost, and a custom frontend such as Next.js reads content from the read-only Content API. Writes (posts, members) go through the Admin API.
Instructions
Content API (Headless)
// src/lib/ghost.ts — Ghost Content API client
import GhostContentAPI from "@tryghost/content-api";
const ghost = new GhostContentAPI({
url: process.env.GHOST_URL!, // https://blog.northwindcoffee.com
key: process.env.GHOST_CONTENT_API_KEY!,
version: "v6.0",
});
// Fetch posts with pagination
export async function getPosts(page = 1, limit = 10) {
return ghost.posts.browse({
limit,
page,
include: ["tags", "authors"],
fields: ["id", "title", "slug", "excerpt", "feature_image", "published_at", "reading_time"],
order: "published_at DESC",
});
}
// Single post by slug
// The client throws on 404, so return null for the page's notFound() check
export async function getPostBySlug(slug: string) {
try {
return await ghost.posts.read({ slug }, {
include: ["tags", "authors"],
formats: ["html"], // or "plaintext"
});
} catch (err: any) {
if (err?.response?.status === 404) return null;
throw err;
}
}
// All tags
async function getTags() {
return ghost.tags.browse({
limit: "all",
include: ["count.posts"],
order: "count.posts DESC",
});
}
// Posts by tag
async function getPostsByTag(tagSlug: string) {
return ghost.posts.browse({
filter: `tag:${tagSlug}`,
include: ["tags", "authors"],
limit: 20,
});
}
Next.js Integration
// app/blog/[slug]/page.tsx — Ghost-powered blog with Next.js
import { getPostBySlug, getPosts } from "@/lib/ghost";
import { notFound } from "next/navigation";
export async function generateStaticParams() {
const posts = await getPosts(1, 100);
return posts.map((post) => ({ slug: post.slug }));
}
// Next.js 15+: params is a Promise
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params;
const post = await getPostBySlug(slug);
if (!post) return {};
return {
title: post.meta_title || post.title,
description: post.meta_description || post.excerpt,
openGraph: {
title: post.og_title || post.title,
description: post.og_description || post.excerpt,
images: post.og_image ? [post.og_image] : post.feature_image ? [post.feature_image] : [],
},
};
}
export default async function BlogPost({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params;
const post = await getPostBySlug(slug);
if (!post) notFound();
return (
<article className="prose lg:prose-xl mx-auto py-12 px-4">
{post.feature_image && (
<img src={post.feature_image} alt={post.title} className="rounded-xl" />
)}
<h1>{post.title}</h1>
<div className="flex items-center gap-3 text-gray-500">
<span>{post.primary_author?.name}</span>
<span>·</span>
<time>{new Date(post.published_at!).toLocaleDateString()}</time>
<span>·</span>
<span>{post.reading_time} min read</span>
</div>
<div dangerouslySetInnerHTML={{ __html: post.html! }} />
</article>
);
}
export const revalidate = 60; // ISR: revalidate every 60s
Members & Subscriptions
Ghost has built-in free signup, paid subscriptions through Stripe, multiple tiers, newsletter delivery, and per-post visibility (public, members-only, paid-only). Manage members from code with the Admin API, which authenticates with a short-lived JWT built from an Admin API key (id:secret) sent as Authorization: Ghost <token>; the @tryghost/admin-api package does the signing.
import GhostAdminAPI from "@tryghost/admin-api";
const admin = new GhostAdminAPI({
url: process.env.GHOST_URL!,
key: process.env.GHOST_ADMIN_API_KEY!, // from Settings → Integrations → Custom integration
version: "v6.0",
});
await admin.members.add({ email: "[email protected]", name: "Dana Ortiz", newsletters: [] });
const paid = await admin.members.browse({ filter: "status:paid", limit: 50 });
Never expose the Admin API key to the browser; use it only on the server.
Installation
# Local or server install with the official CLI (Node.js 22, MySQL 8 in production)
npm install ghost-cli@latest -g
ghost install local # quick local try-out; `ghost install` on an Ubuntu server
# Docker: production mode needs MySQL, so use compose rather than a single container
docker run -d --name ghost-dev -p 2368:2368 -e NODE_ENV=development \
-e url=http://localhost:2368 -v ghost-content:/var/lib/ghost/conten
Установить ghost в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ghost?
Ghost is an open-source Node.js publishing platform for blogs, newsletters and paid membership sites. Use this skill to run Ghost with Docker or ghost-cli, read posts and tags from the Content API for a headless Next.js frontend, manage members through the Admin API, or set up paid newsletters with Stripe. Trigger words: Ghost CMS, Ghost blog, Ghost Content API, headless Ghost, Ghost newsletter, Ghost members.
Как установить скилл ghost?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ghost запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic