Skip to content

OneSpiral/ghost-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ghost-writer

ghost-writer

Reverse-engineer any author's writing style. Then write in their voice.

MIT License Install Compatibility


ghost-writer demo

Feed ghost-writer 3 blog posts by Paul Graham, and it builds a 24-dimension style profile β€” sentence rhythm, vocabulary tier, humor style, rhetorical devices, emotional temperature, and 19 more. Then ask it to write something new. The output reads like Graham wrote it, not like AI imitating Graham.

Not prompt engineering. Forensic stylometry.

What It Does

πŸ“₯ Input 2–5 writing samples (paste text, file paths, or URLs)
πŸ”¬ Analysis 24-dimension forensic style breakdown
πŸ“Š Output Interactive HTML report + JSON style profile
✍️ Writing New content that authentically reproduces the voice

Before / After

❌ Without ghost-writer (default AI)

In this blog post, we'll explore the fascinating world of startups. Starting a company is a challenging yet rewarding endeavor that requires dedication, perseverance, and a willingness to embrace uncertainty. Let's dive into the key factors that contribute to startup success.

βœ… With ghost-writer (Paul Graham profile loaded)

The most dangerous thing about starting a startup is that it's hard in ways you don't expect. Everyone warns you about the long hours. Nobody warns you that the hardest part is making decisions with no information and no one to ask.

The 24 Dimensions

ghost-writer doesn't just look at "tone." It performs a forensic analysis across 24 independent dimensions, grouped into 5 categories:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚   A. RHYTHM & STRUCTURE          B. WORD CHOICE             β”‚
β”‚   β”œβ”€ Sentence length dist.       β”œβ”€ Vocabulary tier          β”‚
β”‚   β”œβ”€ Paragraph architecture      β”œβ”€ Jargon handling          β”‚
β”‚   β”œβ”€ Opening moves               β”œβ”€ Verb energy              β”‚
β”‚   β”œβ”€ Transition style            β”œβ”€ Modifier philosophy      β”‚
β”‚   β”œβ”€ Closing patterns            β”œβ”€ Pronoun strategy          β”‚
β”‚   └─ Structural signature        └─ Signature phrases        β”‚
β”‚                                                             β”‚
β”‚   C. TONE & REGISTER            D. RHETORICAL DEVICES       β”‚
β”‚   β”œβ”€ Confidence level            β”œβ”€ Analogy & metaphor       β”‚
β”‚   β”œβ”€ Humor style                 β”œβ”€ Evidence strategy         β”‚
β”‚   β”œβ”€ Emotional temperature       β”œβ”€ Repetition as device      β”‚
β”‚   β”œβ”€ Reader relationship         └─ Question usage            β”‚
β”‚   └─ Formality gradient                                     β”‚
β”‚                                                             β”‚
β”‚   E. MECHANICS & FORMATTING                                 β”‚
β”‚   β”œβ”€ Punctuation personality                                β”‚
β”‚   β”œβ”€ Formatting habits                                      β”‚
β”‚   └─ Emphasis patterns                                      β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Style Report

The analysis generates an interactive HTML report. Self-contained, dark/light theme, works on mobile.

Style Report Preview

Includes:

  • Radar chart β€” all dimensions at a glance
  • Rhythm visualization β€” sentence length bar chart showing the author's "beat"
  • Signature phrases β€” highlighted with frequency counts
  • Voice DNA β€” one-paragraph summary of the author's essence
  • Do / Don't cheat sheet β€” quick reference for writing in this voice

Install

One-line install (auto-detects your agent)

curl -fsSL https://raw.githubusercontent.com/OneSpiral/ghost-writer/main/install.sh | bash

Claude Code (Marketplace)

/plugin marketplace add OneSpiral/ghost-writer

Manual install

# Claude Code
git clone https://github.com/OneSpiral/ghost-writer.git ~/.claude/skills/ghost-writer

# Codex CLI
git clone https://github.com/OneSpiral/ghost-writer.git ~/.codex/skills/ghost-writer

# Pi
git clone https://github.com/OneSpiral/ghost-writer.git ~/.pi/agent/skills/ghost-writer

# OpenCode
git clone https://github.com/OneSpiral/ghost-writer.git ~/.opencode/skills/ghost-writer

Any other agent

Copy SKILL.md into your agent's skills directory. That's it β€” it's a single file.

Usage

Analyze an author's style

> /ghost-writer analyze

Paste 3 Paul Graham essays and I'll build his style profile.

Or point to files:

> /ghost-writer analyze ~/essays/pg-essay-1.md ~/essays/pg-essay-2.md ~/essays/pg-essay-3.md

Output:

  • paul-graham-style-profile.json β€” machine-readable profile
  • paul-graham-style-report.html β€” interactive visual report

Write in their voice

> /ghost-writer write paul-graham

Write a 1000-word essay about why most productivity advice is wrong.

The agent loads the style profile and writes as if Paul Graham wrote it β€” matching his sentence rhythm, vocabulary tier, opening moves, humor placement, and all 24 dimensions.

How It Works

Samples (essays, blog posts, emails)
        β”‚
        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   FORENSIC ANALYSIS  β”‚
β”‚                      β”‚
β”‚   24 dimensions      β”‚
β”‚   measured across    β”‚
β”‚   all samples        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
     β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
     β–Ό           β–Ό
  Style       HTML
  Profile     Report
  (.json)     (.html)
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   VOICE SYNTHESIS    β”‚
β”‚                      β”‚
β”‚   Load profile       β”‚
β”‚   Generate draft     β”‚
β”‚   Self-audit vs      β”‚
β”‚     all 24 dims      β”‚
β”‚   Revise mismatches  β”‚
β”‚   Uncanny valley     β”‚
β”‚     final check      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
    New content in
    the author's voice

Why "24 dimensions" and not just "match the tone"?

Because tone is one dimension out of 24. Two authors can have identical tone (confident, casual) but completely different:

  • Rhythm β€” one writes 8-word sentences, the other writes 25-word sentences
  • Openings β€” one starts with anecdotes, the other starts with claims
  • Evidence β€” one uses data, the other uses personal stories
  • Punctuation β€” one loves em dashes, the other uses semicolons

Readers detect these unconscious patterns before they can name them. Miss even 2–3 dimensions and the writing feels "off" even if the tone is right. ghost-writer captures all 24 so nothing slips through.

Compatibility

Agent Status Install Location
Claude Code βœ… ~/.claude/skills/ghost-writer/
Codex CLI βœ… ~/.codex/skills/ghost-writer/
Pi βœ… ~/.pi/skills/ghost-writer/
OpenCode βœ… ~/.opencode/skills/ghost-writer/
Gemini CLI βœ… Copy SKILL.md to skills directory
Any agent βœ… Single SKILL.md file, universal

Why Not Just "Write Like X" in Your Prompt?

Approach What happens
"Write like Paul Graham" AI produces generic "smart casual tech essay" voice. Misses rhythm, openings, evidence strategy, punctuation habits, emotional arc.
ghost-writer Analyzes actual samples across 24 dimensions. Produces content that would fool someone who reads the author regularly.

The difference: generic pattern matching vs. forensic style replication.

FAQ

How many samples does it need? Minimum 2, ideal 3–5. More samples = more accurate profile, especially for dimensions like "signature phrases" and "sentence length distribution."

Can I mix sample types? Yes. Blog posts + emails + tweets all contribute. The profile captures the author's range, not just one register.

Does it work for non-English? The dimensions are language-universal. Tested primarily on English, but the framework applies to any language.

Can I edit the style profile? Absolutely. The JSON is human-readable. Bump up the humor, dial down the formality, change the vocabulary tier β€” it's your profile to tune.

Also By OneSpiral

  • code-autopsy β€” Forensic codebase analysis. 16 diagnostics, health score, complexity heatmap, risk matrix, interactive HTML reports.

License

MIT β€” do whatever you want with it.

About

Reverse-engineer any author's writing style from samples, then write in their voice. 24-dimension forensic style analysis.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages