Repository avatar
Security
v1.0.0
active

ghost-writer

com.claudeghostwriter/ghost-writer

Write a complete book with its author, in their voice, and get the Amazon KDP files.

Documentation

Ghost Writer — Claude Code Plugin

Collaborative ghost writing assistant for books and long-form writing projects.

Latest release License: MIT Website

Official website: claudeghostwriter.com · Install · Download the latest .plugin · Guides · Gallery

Based on the writing method developed in quantum_fatalism — a philosophical essay written in explicit collaboration between a human author and Claude.


Installation

Three ways, from the simplest to the most technical. All of them, with copy buttons: claudeghostwriter.com/install.

1. From the Claude plugin directory — no terminal

Ghost Writer is listed in Anthropic's plugin directory. Install it in one click from Claude.ai (it syncs to Claude Code and Cowork):

Install Ghost Writer from the Claude plugin directory

2. Download the .plugin file — Claude desktop app

Download ghost-writer.plugin (always the latest release) and drag it into the Claude app, or upload it from Settings → Plugins. Every version is also on GitHub Releases.

3. Two commands in Claude Code

# Step 1 — add the repo as marketplace
/plugin marketplace add simonediroma/claude-ghost-writer

# Step 2 — install the plugin
/plugin install ghost-writer@simonediroma-ghost-writer

Then run /ghost-writer:check to verify the setup, and /ghost-writer:wizard to start your book.

Using GitHub with Ghost Writer

Versioning, backup, Claude Desktop/Code setup and free hosting for the book site: see the GitHub guide.

Local testing

git clone https://github.com/simonediroma/claude-ghost-writer.git
claude --plugin-dir ./claude-ghost-writer
/ghost-writer:check

The one command to remember

/ghost-writer:session-start

Run this whenever you open the project. It reads project-state.md (a compact digest updated at the end of every session) and briefs you in seconds — where you left off, what's pending, what to do today.

On the very first session, or if the digest is older than 7 days, it does a full read and regenerates the digest automatically.


Quick Start — Macro Commands

Four commands cover the entire book lifecycle. Use these if you don't want to manage the sequence manually.

CommandWhat it runs
/ghost-writer:checkRun this first — verifies installation and setup in 60 seconds
/ghost-writer:wizardStart here if you don't know where to begin — conversational setup from scratch
/ghost-writer:startFull onboarding — author interview + book definition + voice fingerprint
/ghost-writer:chapterFull chapter cycle — dialogue + write + demolish + integrate
/ghost-writer:review [file]Full persona review — all 5 readers + integrate
/ghost-writer:finishBook closing — introduction + conclusion + final audit + manuscript

Not sure which to use? → /ghost-writer:wizard

The atomic commands (below) remain available for authors who want to control the sequence directly.


Skills

Onboarding — run once, in order

CommandWhat it does
/ghost-writer:session-startOpens any session — reads full project state, suggests what to do today
/ghost-writer:setup-authorInterview: who you are, your authority, your emotional stake
/ghost-writer:setup-bookBrainstorm: premise, reader, structure — selects the genre preset
/ghost-writer:setup-voiceDefines tone of voice via interview + writing sample analysis

Writing cycle — repeated per chapter

CommandWhat it does
/ghost-writer:ask-before-writingStructured dialogue before writing anything
/ghost-writer:freeflowFor blocked authors — dump everything, plugin organizes
/ghost-writer:write [section]Generates the section after dialogue is confirmed
/ghost-writer:write [section] --quickSkips dialogue — asks one question, writes directly
/ghost-writer:demolish [file]Hostile critical analysis — one objection at a time
/ghost-writer:demolish [file] --lightFast stress-test — finds only the 3 most critical issues
/ghost-writer:demolish-persona [persona]Demolition from a specific reader's perspective
/ghost-writer:integrateIncorporates responses into the text — one change at a time

Consistency — periodic

CommandWhen
/ghost-writer:consistency-checkEvery 3-4 completed chapters
/ghost-writer:revise [file]After integrate — grammar, punctuation vs style guide, timeline, character details, cross-chapter continuity
/ghost-writer:revise --allBefore manuscript-final — full editorial pass on the whole book
/ghost-writer:rules [add "..."]Any time — store a writing rule (e.g. "never use a colon before a subordinate clause") in style-rules.md
/ghost-writer:corrections printBefore re-reading — review PDF with paragraph IDs in the margin
/ghost-writer:corrections import [pdf]After re-reading — imports highlights/comments, notes or photos and applies them

Book graph — automatic

CommandWhat it does
/ghost-writer:graphSync now (normally automatic)
/ghost-writer:graph checkWhich chapters are waiting, suspended or aligned
/ghost-writer:graph find [name]Show the card for a name

See Book Graph below. Requires pip install pyyaml.

Re-reading away from the computer

  1. /ghost-writer:corrections print → manuscript/review-[date].pdf, every paragraph numbered (3.12 = chapter 3, paragraph 12).
  2. Read it on a tablet, phone or on paper and annotate the easiest way: highlights + comments in any PDF app, notes/dictation with the paragraph ID (3.12 recieve → receive), or photos of the marked-up printed pages.
  3. /ghost-writer:corrections import annotated.pdf (or paste the notes / send the photos). Everything lands in corrections.md; typos are applied in one go, the rest one at a time. Notes like "always…" / "never…" become rules in style-rules.md.

Requires pip install reportlab pymupdf. | /ghost-writer:character-interview [name] | Optional — before writing scenes with key characters | | /ghost-writer:character-check [name] [file] | Optional — after writing scenes with profiled characters |

Closing — run once, at the end

CommandWhat it does
/ghost-writer:write-openingWrites the introduction — last, after all chapters are complete
/ghost-writer:write-closingWrites the conclusion — closes the arc
/ghost-writer:manuscript-finalArc audit + assembles submission-ready manuscript

Podcast — optional, after the book is done

CommandWhat it does
/ghost-writer:podcastTurns the book into a narrated podcast: voice choice with samples, one script per chapter adapted for the ear (you approve each one), MP3 episodes + RSS feed
/ghost-writer:podcast jingleComposes an original intro jingle offline (warm, upbeat, mysterious, playful, grime) or a seamless grime-loop beat made from real CC0 recordings
/ghost-writer:podcast voicePick or retune the narrator voice (speed, pauses) and optional character voices

Free and open source by default: Piper (offline TTS) + ffmpeg. Requires pip install piper-tts numpy and ffmpeg. Optional: ElevenLabs (paid API, podcast.engine: "elevenlabs") for premium or cloned voices, with a local cache and /ghost-writer:podcast cost to see the characters before each build. Chapters are never modified — scripts live in podcast/scripts/.

Utility

CommandWhat it does
/ghost-writer:statusProject overview and suggested next step

Website — optional

CommandWhat it does
/ghost-writer:siteBuilds the book's website for GitHub Pages: opening, the book + download, characters or key ideas, podcast episodes, explorable graph, "Written with Ghost Writer" badge in the footer

See Book Website below.

Gallery — optional

CommandWhat it does
/ghost-writer:gallerySubmits the book to the gallery on claudeghostwriter.com: drafts the entry with you (title, genres, description, links, cover), validates it, then opens a pull request on the website repository with the GitHub CLI — or a pre-filled issue without it. Then offers the "Written with Ghost Writer" badge for the book's README

Complete Workflow

ONBOARDING (once)
─────────────────────────────────────
session-start         → orient to the project (reads project-state.md digest)
setup-author          → who are you, your authority, your stake
setup-book            → what is the book + genre preset + first outline draft
setup-voice           → tone of voice via interview + sample analysis

PER CHAPTER (repeated)
─────────────────────────────────────
session-start                   → briefing: where we left off
ask-before-writing              → concept dialogue, one question at a time
  └─ blocked? → freeflow        → dump everything, plugin organizes
  └─ clear idea? → write --quick → skip dialogue, one question, write directly
write [section]                 → generates draft in author's voice
demolish [file]                 → hostile critique, logic and structure (7 vectors)
  └─ time-limited? → demolish --light  → 3 most critical issues only
demolish-persona editor         → structural diagnosis
demolish-persona target-reader  → does it work for the intended reader?
demolish-persona hostile-reader → does the argument hold under pressure?
integrate                       → incorporates all responses, one change at a time
revise [file]                   → grammar, punctuation, timeline, character details, continuity
  → chapter complete ✅
  → graph sync (automatic)       → new cards / re-anchored sources, one-line report

EVERY 3-4 CHAPTERS
─────────────────────────────────────
consistency-check     → term drift, contradicted claims, broken promises, tone arc
                         (streams findings as found; uses summaries first, full
                          text only on flagged chapters)

OPTIONAL (narrative books)
─────────────────────────────────────
character-interview [name]   → psychological profile before writing key scenes
character-check [name] [ch]  → behavioral consistency check after writing

CLOSING (once, at the end)
─────────────────────────────────────
write-opening         → introduction — written last
write-closing         → conclusion — resolves open promises
revise --all          → full editorial pass before assembly
manuscript-final      → arc audit + optional process note + assembled manuscript

Genre Presets

Selected during setup-book. Adapts vocabulary, questions, and demolition logic.

PresetCentral conceptDemolition focusGraph cards
essayThesisFalsifiability, circularity, scopeconcepts, terms, theses, sources, people
fictionDramatic questionMotivation, consequence, earned changecharacters, organizations, objects, places, concepts, terms, events
manualTransformationEvidence, context dependency, prerequisitesconcepts, terms, procedures, tools, sources
biographyInterpretationEvidence, selection bias, alternative readingspeople, organizations, places, objects, events, sources, terms
fableThe moralEarned ending, displacement, narrative necessitycharacters, places, objects, events, concepts
childrens-bookThe heartAge appropriateness, child logic, pacing, read-aloud qualitycharacters, places, objects, events, terms

Reader Personas

Used with /ghost-writer:demolish-persona or run all five sequentially with /ghost-writer:review.

PersonaWhat they find
target-readerAccessibility, relevance, engagement
hostile-readerUnsupported assertions, avoided objections
domain-expertTechnical gaps, overclaims
editorStructure, pacing, prose problems
out-of-targetUnexplained jargon, invisible assumptions

Each persona file opens with a ## Quick Summary (role, focus, key questions, feedback style) that demolish-persona uses by default. The full behavioral profile is in the same file for deeper reads.

Custom personas: copy personas/custom-template.md and fill in.


Book Graph

A map of everything that exists in the book — for fiction: characters, organizations, objects, places, concepts (rules, procedures, habits), terms (the glossary) and events, linked to each other and to the line of the chapter they come from. Card types depend on the preset (table above). Skill: /ghost-writer:graph; script: graph.py.

It feeds itself — you never run it by hand.

  • Only chapters with status: complete enter the graph. Drafts are never analyzed, even when their version changes.
  • The trigger is the chapter version: for each complete chapter, graph.py check compares the frontmatter version with the version analyzed in the graph. No hooks, no file watchers.
  • The graph is born when the first chapter becomes complete.
  • integrate, revise, corrections, retune, chapter and review end with a sync when they complete a chapter or change the version of a complete one. session-start, resume and status run check as a safety net (e.g. a chapter edited by hand and re-versioned).
  • A chapter that goes back in progress is suspended: its cards stay at the analyzed version until it is complete again.
  • No confirmation is asked: the graph is derived. Each sync ends with one line, e.g. Graph synced (c4 v2.1): 3 new cards, 5 modified, 0 removed, 12 sources re-anchored · open questions: +2, 14 total.

A new version costs no re-read. Every source is c3:19 (chapter 3, line 19) plus a short exact quote. graph.py keeps a copy of the analyzed text, diffs it against the new one, finds each quote again and re-anchors the sources that moved. Claude reads only the changed paragraphs and the cards whose quote disappeared; facts the text no longer says are removed from the cards.

Rules. Nothing enters a card that the chapters don't say — not from the outline, not from book-memory. What the text doesn't say goes in not_said, doubts in open. Only graph/cards/ is edited; views, index and JSON are regenerated. The script stops (and rolls back a commit) on non-existent ids, malformed sources, quotes not found at their line, or sources citing a chapter that is not analyzed.

Who reads it. revise, consistency-check, character-check and write read only the pertinent cards (graph.py find <name>, graph.py find --chapter N) instead of re-reading chapters. Never the whole graph.

graph/
  cards/<type>/<id>.yaml    the only files to edit
  view/…, INDEX.md          readable cards, backlinks, event chain per chapter (generated)
  graph.json                nodes + edges (generated)
  chapters.yaml             analyzed chapters and versions (generated)
  snapshots/cNN.md          analyzed text, for diffs (generated)

A card entry:

traits:
  - {text: "Climbs the lighthouse at six every morning", source: "c1:8", quote: "alle sei del mattino, come ogni giorno"}
CommandWhat it does
python3 graph.py checkChapters to analyze, to re-analyze, suspended (read-only)
python3 graph.py startBegins a sync: prints new chapters, changed paragraphs, moved and lost sources
python3 graph.py commit N …Re-anchors sources, saves snapshot and version, rebuilds, prints the report
python3 graph.py find <name> / --chapter NPertinent cards (lazy reading)
python3 graph.py apply patch.txtAdds/removes card entries without hand-editing YAML
python3 graph.py build / validateRegenerate views / validate only
python3 graph.py migrate grafo/Convert a graph in the earlier Italian format

Migrating an existing graph (grafo/ with schede/, capitoli.yaml, Italian fields, sources without quotes):

  1. python3 graph.py migrate grafo/ — converts folders and fields and derives each quote from the cited line. Sources it can't convert are listed in graph/MIGRATION.md and graph/migration-quotes.yaml; nothing is invented.
  2. Fill quote (and new_ref if the fact is on another line) in migration-quotes.yaml — or ask Claude to — then python3 graph.py fill-quotes graph/migration-quotes.yaml.
  3. python3 graph.py build. Delete grafo/ once it builds.

Tests: python3 tests/test_graph.py.


Book Website

/ghost-writer:site turns what the project already has into one page, ready to publish for free on GitHub Pages: docs/index.html, mobile first, no external fonts, scripts or trackers. All the content is in the HTML; JavaScript only draws the graph.

SectionAppears whenSource
Openingalwayssite.yaml + cover.jpg / cover.png
The bookalwayssite.yaml → book + optional download (PDF / EPUB)
Characters / People / Key ideasfeatured is filledsite.yaml → featured (links to the graph card when id is set)
PodcastMP3s existpodcast/scripts/ + podcast/episodes/ + podcast/feed.xml (/ghost-writer:podcast)
Graphgraph/ existsthe book graph: search, filters by type, event chain per chapter, open points, every card in full

The skill drafts every text in the book's language and the author's voice, one block at a time, and saves it to site.yaml. For serial publication, graph.up_to_chapter: N shows only what happens up to chapter N. The site is rebuilt automatically after a graph sync and after new podcast episodes; publishing is a commit + push of docs/.

python3 build_site.py --init     # site.yaml skeleton from book.config.json
python3 build_site.py --check    # validate, write nothing
python3 build_site.py            # build docs/

Publish: repository Settings → Pages → Deploy from a branch → main / docs. With a podcast, set podcast.base_url to https://<user>.github.io/<repository>/episodes and run python3 export_podcast.py feed before the build. Requires pip install pyyaml (Pillow optional, for the 720 px cover).


Core Principles

  • Claude formalizes, doesn't invent. Concepts come from the author.
  • One question at a time. Always.
  • No change without confirmation. The author approves every modification to the text (the graph is derived and syncs on its own).
  • Demolition strengthens. Every weakness found now is one less for hostile readers.
  • Genre adapts everything. Vocabulary, questions, structure — all shaped by the preset.
  • Memory is explicit. Every term, promise, and demolition cycle is written down.
  • The introduction is written last.
  • The graph only knows what the chapters say. Every card entry cites a line and quotes it.

Project Files

Files the plugin reads and writes automatically. You don't need to edit these manually.

FilePurposeUpdated by
book.config.jsonProject metadata, voice profile, preset digestsetup-book, wizard, retune
style-rules.mdPunctuation conventions and the author's writing ruleswrite, integrate, revise, rules, corrections
corrections.mdQueue of corrections from re-reading sessionscorrections
podcast/Episode plan, scripts, voices, MP3 episodes, feed.xmlpodcast
book-memory.mdDefined terms, promises, claims, chapter logwrite, integrate, consistency-check
outline.mdChapter list with statuseswrite, chapter, longform-upgrade
voice-sample.md3 paragraphs extracted from the last written chapter — style referencewrite, integrate (silently)
project-state.mdCompact session digest — chapter counts, last step, open issuessession-start (silently, at end of session)
demolition-history.mdBook-level issue log, active + archiveddemolish
chapters/NN-slug.mdChapter text with frontmatter (title, version, claim, status, summary)write, write-opening, write-closing, integrate, retune, revise, corrections
sessions/Macro session state for resume supportchapter, review, finish
memory/part-N.mdPer-part memory (longform mode only)longform-upgrade, write
graph/cards/Book graph cards (the only graph files edited)graph sync (from integrate, revise, corrections, retune, chapter, review, session-start, resume, status)
graph/view/, graph/INDEX.md, graph/graph.json, graph/snapshots/Generated by graph.py — never editgraph.py
site.yamlTexts of the book websitesite
docs/The website (GitHub Pages) — generated by build_site.py, never editsite, graph sync, podcast

Written with Ghost Writer

Finished a book? Add it to the gallery with /ghost-writer:gallery, and put the badge on your book's website or repository. /ghost-writer:gallery offers to add it to your README; /ghost-writer:site puts it in the footer of the book's website.

Written with Ghost Writer

[![Written with Ghost Writer](https://claudeghostwriter.com/badge/written-with-ghost-writer.svg)](https://claudeghostwriter.com/)
<a href="https://claudeghostwriter.com/"><img src="https://claudeghostwriter.com/badge/written-with-ghost-writer.svg" alt="Written with Ghost Writer" width="200" height="40"></a>

For dark backgrounds use written-with-ghost-writer-dark.svg.


Publishing to claude.com/plugins

  1. Push to a public GitHub repo
  2. Update .claude-plugin/plugin.json with your name and repo URL
  3. Test locally: claude --plugin-dir ./ghost-writer
  4. Submit at: claude.ai/settings/plugins/submit

Credits

Original method: Simone Di Roma — quantum_fatalism License: MIT

No installation packages available.