/ghost:build-style-guidefrom ghost
Creates or updates a per-author Ghost CMS style guide by synthesizing interview answers, reference documents, and published posts. Invoked by 'build my style guide' or automatically after a draft push.
Ships in ghost. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are synthesizing a living, per-author style guide from all available signals: interview answers, reference material, and the published corpus. The guide lives at the path set in style_guide_path (default .claude/ghost-style-guide.md).
Work through each phase in order. Do not skip a phase — each feeds the next.
Read .claude/ghost.local.md and extract the frontmatter fields:
Read(".claude/ghost.local.md")
The fields you need:
corpus_filter — NQL filter for corpus pull (default status:published).corpus_limit — max posts to pull (default 25).style_guide_path — output path for the style guide (default .claude/ghost-style-guide.md).If ghost.local.md does not exist, use the defaults above. Note it in your working notes.
Read the interview answers and reference notes written by /ghost:define-voice:
Read(".claude/ghost-voice-inputs.md")
This file is the authoritative source for Stated voice. Parse it into:
If the file does not exist, continue — this is the cold-start-without-interview path. The Stated voice section will be sparse; note that explicitly in the guide.
Read("<style_guide_path>")
If it exists: you are in merge mode — preserve the existing Stated voice section verbatim. Continue to Phase 2.
If it does not exist: you are in initial build mode — you will create it from the template. Continue to Phase 2.
ghost_site_info()
If this fails (auth error, connection refused): skip corpus pull, note "corpus unavailable — Ghost not connected", and proceed with interview-only inputs. The guide will still be valid; the Observed patterns section will be empty.
ghost_post_list(filter="<corpus_filter>", limit=<corpus_limit>, fields="id,title,published_at,url")
Capture the list. If no posts are returned, note "no published posts found" and proceed.
For each post in the list (up to corpus_limit), fetch the full content:
ghost_post_get(id="<post_id>")
Analyze the returned html (this tool returns html + lexical; there is no plaintext field).
Work through all posts before moving to Phase 3. This is the most time-consuming step — process them in order, extracting style signals as you go.
Cold start without corpus: If ghost_site_info failed or returned no posts, skip Phase 2b–2c and proceed directly to Phase 3.
Build or update each section. Keep the rules for each section strictly separate — they serve different purposes and different update policies.
In initial build mode: Derive this section from the interview answers in .claude/ghost-voice-inputs.md. Map each field directly:
If no interview exists, write placeholder values and note that /ghost:define-voice should be run first.
In merge mode: Read the existing Stated voice section from the style guide and carry it forward unchanged. Do not re-derive it from the interview. The author's edits are intentional and must be preserved. If there is new interview material (a re-run of define-voice), surface the delta for explicit confirmation before updating.
Analyze all fetched posts together. Derive:
Write these as concise observations, not prescriptions. Each observation should cite at least one example post by title.
If no corpus was available, write: "No corpus folded in. Run /ghost:build-style-guide after publishing posts to populate this section."
Combine two sources:
Also include the reading-pass tells — the ones a grep cannot catch. These are rhythm and framing rather than fixed strings, so the guide must flag them for a read (with the read-aloud test: "if you wouldn't say it, it's a tell"). Carry each with a concrete before/after so the drafting and revising skills can match against real examples:
List each anti-pattern as a short bullet with a concrete example of what to avoid.
If no corpus and no interview: write the house defaults list above as baseline anti-patterns.
In initial build mode: Create the table with one row per source:
| Date | Source | Type | Notes |
|---|---|---|---|
<today> | .claude/ghost-voice-inputs.md | interview | Initial build |
<today> | <post title> | corpus-post | Folded in on initial build |
Add one row per post fetched. If no corpus was available, note that.
In merge mode: Read the existing provenance log. Append new rows for any posts not already listed. Never delete existing rows. The log is the audit trail of what shaped the guide.
Write the complete four-section document to <style_guide_path>.
Use the following skeleton as the file structure. Update the frontmatter fields:
last_updated: today's date (ISO 8601)sources_count: total number of posts folded in across all runs (from the provenance log)Write the file with this exact structure:
---
# Ghost style guide — generated by /ghost:build-style-guide
# DO NOT hand-edit the Observed patterns or Provenance log sections — they are re-derived on each merge.
# Edit only the Stated voice section to add or refine authoritative voice guidance.
generated_by: ghost:build-style-guide
last_updated: "<YYYY-MM-DD>"
sources_count: <n>
---
# Ghost Style Guide
_Generated by `/ghost:build-style-guide`. The Stated voice section is authoritative and human-controlled; all other sections are derived and refreshable._
---
## Stated voice
<!-- SOURCE: Interview answers from .claude/ghost-voice-inputs.md — NEVER auto-overwritten. -->
<!-- Edit this section directly to add or revise authoritative voice rules. -->
**Audience:** <derived from interview Q1 or placeholder>
**Reader outcome:** <derived from interview Q2 or placeholder>
**Tone:** <derived from interview Q3 or placeholder>
**Admired references:** <derived from interview Q4 or placeholder>
**Avoid:** <derived from interview Q5 or placeholder>
**Structural preferences:** <derived from interview Q6 or placeholder>
---
## Observed patterns
<!-- SOURCE: Derived from the published corpus via ghost_post_list / ghost_post_get. -->
<!-- Re-derived on each /ghost:build-style-guide merge run — safe to overwrite this block. -->
<derived observations, or placeholder if no corpus>
---
## Anti-patterns
<!-- SOURCE: Synthesized from interview (avoid list) + cross-checked against corpus + house defaults. -->
<!-- Re-derived on each merge run — safe to overwrite this block. -->
<derived anti-patterns, or house defaults if no corpus/interview>
---
## Provenance log
<!-- SOURCE: Idempotent append-only log of every post and reference folded into this guide. -->
<!-- Append new entries; never delete existing ones. -->
| Date | Source | Type | Notes |
|------|--------|------|-------|
<one row per source>
After writing, confirm the file was saved and report:
This phase applies when build-style-guide is invoked by /ghost:push-draft after a successful push of a newly approved post, or when the author manually runs it after publishing a new post.
The caller (push-draft or the author) provides the post ID or title. Fetch it:
ghost_post_get(id="<new_post_id>")
Read the existing style guide's provenance log. If this post is already listed, this is a no-op — confirm "already folded in" and stop.
Fetch the current corpus (same filter/limit as Phase 2) plus the new post. Re-derive the Observed patterns section with the expanded dataset.
Before writing, diff the new Observed patterns against the existing ones. If any observation changed meaningfully (e.g., average post length shifted, a new structural pattern emerged), surface those changes explicitly:
"The Observed patterns section would change in these ways:
- Average post length: 850 words → 920 words
- Opening moves: adds 'problem statement' pattern (3 of 10 posts now use it)
The Stated voice section will not be changed. Approve these updates? [y/n]"
Wait for explicit confirmation before writing. If the author says no, do not update the file.
Do not touch the Stated voice section under any circumstances during continuous merge. The author's intentional edits are permanent until they explicitly re-run /ghost:define-voice and then confirm an update.
Add one row for the new post. Write the updated file.
/ghost:define-voice first, then re-run this skill./ghost:define-voice to fill it in, then re-run this skill./ghost:define-voice and explicitly confirming an update.ghost_site_info, ghost_post_list, ghost_post_get. Config keys read: corpus_filter, corpus_limit, style_guide_path from .claude/ghost.local.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/define-voiceUse when establishing or refining how an author wants to sound before writing Ghost posts, especially with no published corpus yet (cold start) — interviews the author about audience, tone, and admired references, and gathers reference material to seed the style guide. Triggers on "define my voice", "set up my writing style", "I'm starting a new blog", "here are posts I like"./draft-postUse to write the first full draft of a Ghost blog post locally, matching the author's style guide, then self-audit it against the anti-pattern checklist. Triggers on "draft a post about X", "write the first draft", "start a new blog post"./push-draftUse to push a finished local Ghost draft to the Ghost site as a draft (never published) — pull-guards against in-editor edits, uploads the feature image, creates or updates the post, verifies links, and feeds the approved post back into the style guide. Triggers on "push this to ghost", "send the draft to ghost", "publish to ghost as a draft"./revise-postUse to revise an existing local Ghost draft section by section with the author, improving formatting, voice, and accuracy. Triggers on "revise this post", "let's go through it section by section", "tighten this draft"./setup-ghostUse when first connecting a project to a Ghost site for the ghost plugin, or whenever Ghost credentials are missing/unverified — onboards the Ghost Admin API key, enables the plugin at project level, and verifies the connection. Triggers on "set up ghost", "connect my ghost site", "ghost credentials", "the ghost mcp isn't working"./write-postUse to write a Ghost blog post end to end, walking the full plan→draft→revise→push flow in one guided pass. Triggers on "write a post about X end to end", "take this from idea to a ghost draft", "guide me through writing a post".npx claudepluginhub schuettc/claude-code-plugins --plugin ghostOther plugins' skills for the same job