---
name: voice-distill
description: "Read the voice corpus (emails, PRs, review comments, blog posts) and (re)generate the voice.md style guide. Preserves hand-edits to rules.md. Use when the user says \"distill my voice\", \"rebuild my style guide\", \"update voice.md\", \"regenerate my voice profile\", or after they've added new material to the corpus. Also invocable as /skill:voice-distill."
---

You are distilling the user's corpus into a style guide.

## Step 1: Locate the corpus

Resolve `$VOICE_HOME` (default `~/.claude/voice/`). If it doesn't exist, tell the user to run `/skill:voice-init` and stop.

## Step 2: Read what's there

Inventory `$VOICE_HOME/corpus/`:
- `emails/*.jsonl` — sample 30-50 substantive sent emails
- `blog/*.md` — read all
- `github_prs/*.jsonl` — sample by length (skew toward 100-2000 char bodies, drop one-line acks)
- `slack/*.jsonl` — sample 30-50 substantive messages

Filtering rules to apply during sampling:
- Drop bodies < 30 chars unless clearly content
- Drop one-line acks ("LGTM", "ok", "thanks", "👍", etc.)
- Drop content matching `Generated with .* (Claude Code|Cursor|Copilot)` footers — these are agent-co-authored, not pure voice
- Drop forwards-with-no-commentary (body is just a quoted forward block)
- Drop self-notes (body is a single URL or token)

If the user has tagged certain repos as "agentic-mode" in `manifest.md`, skip those entirely.

## Step 3: Read existing rules

Open `$VOICE_HOME/rules.md`. **Do not modify it.** Treat it as authoritative input. The style guide you're writing must be consistent with these rules; if a corpus pattern conflicts with a rule, the rule wins.

## Step 4: Distill

Produce `$VOICE_HOME/voice.md` with the following structure:

```markdown
---
name: Voice profile
description: Distilled style guide for drafting in this user's voice. Generated by /skill:voice-distill.
---

# Voice profile

**Authoritative rules live in `rules.md`.** This file supplements with corpus-derived patterns.

## Default mode

Two-sentence statement of the through-line (length, directness, register tendencies).

## Register matrix

| Register | When | Greeting | Sign-off |
|---|---|---|---|
| ... | ... | ... | ... |

## Phrase bank

Group by register or function (openers, closers, affirmations, hedge stacks, push-back). Pull verbatim phrases that recur across the corpus.

## Structural habits

Numbered list of patterns: how the user opens, transitions, hedges, lands a counterargument, closes. Each item includes a one-sentence explanation and an inline example.

## Anti-voice

Patterns to avoid. Include both what the user explicitly avoids (per rules.md) and patterns absent from the corpus despite the topic warranting them.

## Vocabulary hot list

High-frequency words/phrases the user reaches for. Group by register.

## Verbatim grounding samples

5-10 unedited samples per register, kept as blockquotes. These are what `/skill:voice` pulls from for grounding.
```

## Step 5: Self-check

Before writing the file, scan your output for the patterns the rules forbid (em dashes, leading "I"/"I'm", whatever the user has listed). Fix violations inline.

## Step 6: Update the manifest

Append to `$VOICE_HOME/manifest.md`:

```
## Distillation log

- <today's date>: distilled from <N> emails, <N> PRs, <N> review comments, <N> blog posts.
```

Tell the user the file count, the registers covered, and that voice.md is ready for `/skill:voice` to use.
