{"slug": "show-hn-distill-anyone-s-writing-style-into-a-skill", "title": "Show HN: Distill anyone's writing style into a skill", "summary": "A developer released a tool called mimic that distills an author's writing style into a reusable agent skill — a system prompt built from stylometry measurements plus extracted rhetorical moves — rather than fine-tuning a model. The tool's stylometry script measures function-word rates, punctuation, sentence rhythm and lexical richness from 2–8k words of a corpus, while the agent reads 15–25 passages to extract performable moves; in a worked example, a fresh model given the skill as a system prompt dropped mean sentence length from 19 to 8 words and cut cosine distance to the author from 1.11 to 0.85. On a de-contaminated benchmark of 6 authors × 4 tasks, surface stylometry could not reliably distinguish the skill from a plain \"write as X\" prompt (Elo 1047 versus 1066, with no-style at 887), but a blind LLM judge preferred the skill's output on 24 of 24 items.", "body_md": "Distill a writing voice into a reusable **agent skill** — a system prompt that makes an\nLLM write like a specific author or persona on any topic. No fine-tuning, no gradients, no\nmodel of its own. Just measurement and a prompt.\n\nPoint your agent at ~2–8k words of someone's writing. It fingerprints the voice, writes the skill, checks its own work against the corpus, and — if you want — installs the skill into your agent for future sessions. It asks first.\n\nA voice is not a word list. It's a **distribution over structure**: how long sentences run,\nhow often they repeat, which function words and punctuation recur, and — the part most\nimitations miss — the **rhetorical moves** the writer keeps performing. Authorship attribution\nidentifies writers almost entirely from these structural statistics, not from topic words. So\nif you can *measure* them and write explicit instructions to reproduce them, a prompt can\ncarry a voice.\n\nMimic fingerprints in two layers:\n\n- **L1 — the distribution the writer can't help.** Function-word rates, punctuation, sentence\nrhythm, lexical richness. Measured by`stylometry.py` . This gets you the right*shape* .\n- **L2 — the moves the writer performs.** The agent reads the corpus closely and extracts*performable* rhetorical moves — \"a move is something the writer**does** , not a word they\nreach for\": digress-and-snap-back, embedded mini-anecdote, vague-authority sourcing, the\nescalation ladder, ring composition. These are written into the skill as \"deploy this\"\nactions, and the model is told to perform 2–3 per passage. This is what separates voice from\ncaricature.\n\nEverything is driven by the skill. There's no distillation script — **the agent does the\nwork** by following [`skills/author-voice/SKILL.md`](https://github.com/xatuke/mimic/blob/main/skills/author-voice/SKILL.md):\n\n1. **Corpus.** Collect ~2–8k words of the author's own writing →`corpus.txt` .\n2. **Measure (L1).**`python3 skills/author-voice/scripts/stylometry.py corpus.txt` — read off\nrhythm, richness, function words.\n3. **Analyze (L2).** The agent reads 15–25 passages closely and extracts the moves, with real\nexamples quoted from the corpus.\n4. **Write the skill.** Grounded in the numbers and the moves, following the template.\n5. **Validate.** Generate a few neutral prompts with the draft as system prompt, save to`SAMPLE.txt` , and re-run`stylometry.py corpus.txt SAMPLE.txt` — it prints exactly what to\npush. Iterate two or three times.\n6. **Offer to install — asking first.** On an explicit yes, the skill is copied to`~/.claude/skills/<author>-voice/SKILL.md` . Never silently.\n\nIf you're using Claude Code, just drop this repo in and say *\"use the author-voice skill to\nmimic  from this corpus.\"*\n\nFrom the [worked Trump example](https://github.com/xatuke/mimic/blob/main/skills/author-voice/SKILL.md) — a fresh model, skill as system\nprompt vs. baseline:\n\n|  | baseline | with skill | real corpus | \n|---|---|---|---|\n| mean sentence length | 19 | **8** | ~11 | \n| lexical richness (TTR) | 0.65 | **0.51** | 0.10 | \n| cosine distance to the author | 1.11 | **0.85** | — | \n\nIt moves from orthogonal to clearly in-voice — capturing the short-punchy-repetitive\n*structure* a vocabulary list alone never would.\n\nOn the de-contaminated benchmark (6 authors × 4 tasks, scorer blind to which output is which), two measurements disagree in a telling way:\n\n- **Surface stylometry** (`score.py` : function words + rhythm + char-grams)*cannot* reliably\ntell the skill from plain \"write as X\" — both land far closer to the real voice than no-style,\nbut neck-and-neck with each other (Elo ≈ skill 1047, plain 1066, no-style 887). A function-word\nmetric is blind to the rhetorical*moves* the skill adds.\n- **A blind LLM judge** that actually reads the text — and so can see the moves — preferred the\nskill's output on**24 of 24 items** (24–0 over plain; no-style last every time).\n\nThat disagreement *is* the argument for L2: the moves are real, but only a measurement deep\nenough to read them rewards them. Both results reproduce from the shipped data — see\n[`bench/`](https://github.com/xatuke/mimic/blob/main/bench/README.md).\n\n```\nskills/author-voice/     the meta-skill — the agent reads this to distill a voice\n  SKILL.md               the full method (measure → analyze → write → validate → install)\n  scripts/stylometry.py  the L1 measurement instrument the skill invokes (stdlib only)\nexamples/                real distilled voice skills + the benchmark dataset\n  trump.md  hemingway.md  poe.md  austen.md  shakespeare.md  obama.md  paulgraham.md\nbench/                   verify a skill actually matches the voice (de-contaminated)\n  score.py               model-free stylometric Elo\n  build_judge.py         blind X/Y/Z set for an LLM judge\n  stylo.py               measurement library (Delta, rhythm, function words)\n```\n\nMimic is for **style, not deception**. Imitate public figures, authors, your own writing, or\na persona you have permission to use. Don't impersonate a private individual, and don't use a\nvoice skill to pass off generated text as genuinely theirs. The install step always asks\nbefore touching your agent's skills directory.\n\nNo dependencies — Python 3 stdlib only. MIT licensed.", "url": "https://wpnews.pro/news/show-hn-distill-anyone-s-writing-style-into-a-skill", "canonical_source": "https://github.com/xatuke/mimic", "published_at": "2026-11-05 10:24:38+00:00", "updated_at": "2026-11-05 10:55:57.841943+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "generative-ai"], "entities": ["mimic", "Claude Code", "stylometry.py", "score.py"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-distill-anyone-s-writing-style-into-a-skill", "markdown": "https://wpnews.pro/news/show-hn-distill-anyone-s-writing-style-into-a-skill.md", "text": "https://wpnews.pro/news/show-hn-distill-anyone-s-writing-style-into-a-skill.txt", "jsonld": "https://wpnews.pro/news/show-hn-distill-anyone-s-writing-style-into-a-skill.jsonld"}}