
Show HN: Distill anyone's writing style into a skill
Distill a writing voice into a reusable agent skill — a system prompt that makes an
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Distill a writing voice into a reusable agent skill — a system prompt that makes an LLM write like a specific author or persona on any topic. No fine-tuning, no gradients, no model of its own. Just measurement and a prompt.
Point 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.
A voice is not a word list. It's a distribution over structure: how long sentences run, how often they repeat, which function words and punctuation recur, and — the part most imitations miss — the rhetorical moves the writer keeps performing. Authorship attribution identifies writers almost entirely from these structural statistics, not from topic words. So if you can measure them and write explicit instructions to reproduce them, a prompt can carry a voice.
Everything is driven by the skill. There's no distillation script — the agent does the work by following skills/author-voice/SKILL.md:
If you're using Claude Code, just drop this repo in and say "use the author-voice skill to mimic from this corpus."
From the worked Trump example — a fresh model, skill as system prompt vs. baseline:
It moves from orthogonal to clearly in-voice — capturing the short-punchy-repetitive structure a vocabulary list alone never would.
On the de-contaminated benchmark (6 authors × 4 tasks, scorer blind to which output is which), two measurements disagree in a telling way:
That disagreement is the argument for L2: the moves are real, but only a measurement deep enough to read them rewards them. Both results reproduce from the shipped data — see bench/.
skills/author-voice/ the meta-skill — the agent reads this to distill a voice SKILL.md the full method (measure → analyze → write → validate → install) scripts/stylometry.py the L1 measurement instrument the skill invokes (stdlib only) examples/ real distilled voice skills + the benchmark dataset trump.md hemingway.md poe.md austen.md shakespeare.md obama.md paulgraham.md bench/ verify a skill actually matches the voice (de-contaminated) score.py model-free stylometric Elo build_judge.py blind X/Y/Z set for an LLM judge stylo.py measurement library (Delta, rhythm, function words)
Scope & consent
Mimic is for style, not deception. Imitate public figures, authors, your own writing, or a persona you have permission to use. Don't impersonate a private individual, and don't use a voice skill to pass off generated text as genuinely theirs. The install step always asks before touching your agent's skills directory.
No dependencies — Python 3 stdlib only. MIT licensed.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。