$npx -y skills add joshferrara/ghostwriter --skill ghostwriterUse when the user wants to create, generate, build, update, refresh, or improve their personal writing style guide from their own sent writing (Generate mode), OR when they ask the agent to write, draft, reply, rewrite, edit, polish, or humanize something in their voice (Use mode
| 1 | # Ghostwriter |
| 2 | |
| 3 | **Teach your agent how to write like you.** |
| 4 | |
| 5 | Ghostwriter turns your sent writing into a practical style guide your agent can use for drafts that sound like you, not like AI. It has two modes: |
| 6 | |
| 7 | - **Generate mode** builds your personal style guide (usually `ghostwriter-guide.md`) by analyzing email, texts, Slack, or other writing you've actually sent. |
| 8 | - **Use mode** loads that guide and drafts or edits in your voice, with your personal style as the primary authority. |
| 9 | |
| 10 | Once your personal guide is in place, agent-written drafts should feel spooky good. |
| 11 | |
| 12 | This skill is agent-agnostic. It works with Claude Code, Codex, OpenCode/OpenClaw-style agents, Hermes, and similar local agents. It does not require any single vendor, tool, or data source — it adapts to whatever access the current environment already has. |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## Step 0: Route to a mode |
| 17 | |
| 18 | Read the user's request and pick a mode. Do this before anything else. |
| 19 | |
| 20 | **Generate mode** — the user wants to *create or update the guide itself*. Triggers include: |
| 21 | > "create / generate / build / make my Ghostwriter guide", "update / refresh / improve my style guide", "analyze how I write", "teach you how I write", "learn my voice". |
| 22 | |
| 23 | **Use mode** — the user wants the agent to *produce or edit writing* in their voice. Triggers include: |
| 24 | > "write / draft / reply / respond as me", "rewrite / edit / polish / humanize this in my voice", "make this sound like me", "draft an email/text/Slack message for me". |
| 25 | |
| 26 | If the request is ambiguous (e.g. "help me with my writing"), ask one short clarifying question: are they building/updating the guide, or do they want something written now? |
| 27 | |
| 28 | --- |
| 29 | |
| 30 | ## Generate mode |
| 31 | |
| 32 | Goal: produce a standalone markdown style guide the user can paste into *any* agent without the rest of this skill. Walk through five stages. Keep the user in control at each decision point. |
| 33 | |
| 34 | Reference files (read the one that matches the chosen source — don't preload all of them): |
| 35 | |
| 36 | - `references/source-detection.md` — how to inventory what access already exists |
| 37 | - `references/gmail-gogcli.md` — Gmail via `openclaw/gogcli` |
| 38 | - `references/gmail-googleworkspace-cli.md` — Gmail via `googleworkspace/cli` |
| 39 | - `references/local-email-exports.md` — `.mbox` / `.eml` / Takeout exports |
| 40 | - `references/imessage-macos.md` — local iMessage database on macOS |
| 41 | - `references/slack.md` — Slack via MCP or API |
| 42 | - `references/generic-corpora.md` — `.txt` / `.json` / `.csv` / mailbox / pasted text |
| 43 | - `references/analysis-framework.md` — what dimensions to extract and how |
| 44 | - `references/humanizer-cleanup.md` — the secondary AI-artifact cleanup pass |
| 45 | |
| 46 | > **The user can point you at any source.** If they name a specific method they want used — a connector, MCP server, CLI, plugin, app integration, built-in tool, an export they've already made, or even "use the email access you already have" — **use that method** and skip ahead to privacy + collection. You don't need a reference file for it: apply the same guidelines to any source (sent messages only, filter noise, analyze the dimensions, write the guide). The reference files are examples, not an allow-list. When a tool behaves differently than a reference describes, adapt — the reference shows the *shape* of the workflow, not the only way to do it. |
| 47 | |
| 48 | ### Stage 1 — Detect existing access (do this first) |
| 49 | |
| 50 | **Before suggesting any new setup, check what the current agent environment already has.** Least setup wins. Look for: |
| 51 | |
| 52 | - Email access through a connector, MCP server, plugin, app integration, or built-in tool (e.g. a Gmail/Outlook connector, an email MCP). |
| 53 | - Slack access through an MCP server or app integration. |
| 54 | - A local messages database (iMessage on macOS). |
| 55 | - Any already-connected writing source. |
| 56 | |
| 57 | Inventory what's available, then **recommend the existing path first** because it requires no new setup. See `references/source-detection.md` for how to probe each agent environment. |
| 58 | |
| 59 | If nothing is connected, move to setup-based options in Stage 2. |
| 60 | |
| 61 | ### Stage 2 — Select source(s) |
| 62 | |
| 63 | Present the available source methods and let the user choose one or more. Explain tradeoffs briefly (one line each), don't lecture: |
| 64 | |
| 65 | - **Existing connector / MCP / plugin / built-in tool** — least setup; use if detected in Stage 1. |
| 66 | - **Gmail via `openclaw/gogcli`** — `gog` CLI, simple `gmail search`/`get`; good for quick local pulls. See `references/gmail-gogcli.md`. |
| 67 | - **Gmail via `googleworkspace/cli`** — `gws` CLI, dynamic Discovery-based access; good if you want the full Workspace surface. See `references/gmail-googleworkspace-cli.md`. |
| 68 | - **Local sent email export** — `.mbox` from Google Takeout or `.eml` files; no API access |