关于 voice-generate
voice-generate 根据用户提取的写作风格生成文本。它读取相应的风格档案与语体,默认将源材料视为粗略笔记,也可将生成内容发送审阅。
主要功能
- 01读取风格档案并选择语体
- 02默认将源材料设为粗略笔记
- 03按指定风格生成文本
- 04扫描并修复禁用短语
- 05支持项目级风格覆盖
适用场景
- 01按提取出的个人风格起草文本
- 02在草稿中应用项目级风格指引
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ athola/ claude-night-market --skill voice-generate安装后在 Claude Code 中输入/voice-generate确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
modules/generation-pipeline.mdregister-selection.mdsource-framing.md详细介绍
语音生成技能
使用用户提取的写作风格生成文本。
不要使用的情况
- 尚无风格档案(使用
scribe:voice-extract) - 检查输出是否偏离风格(使用
scribe:voice-review)
核心原则:源材料框定方式
影响输出质量的最大单一因素,是在提示词中如何框定源材料。将材料框定为“我还在思考的原始笔记”,生成的文本会呈现思考过程;将材料框定为摘要,生成的文本则会像报告。
除非用户明确要求其他方式,否则始终将用户提供的源材料框定为原始笔记。
必需的进度项
voice-generate:profile-loaded- 已读取风格档案voice-generate:register-selected- 已选择语体voice-generate:source-framed- 已将材料框定为笔记voice-generate:generated- 已生成文本voice-generate:review-dispatched- 已发送给审查 Agent
第 1 步:加载风格档案
PROFILE_DIR="$HOME/.claude/voice-profiles/{name}"
按顺序读取:
extraction.md- 核心风格特征registers/{register}.md- 当前语体craft-rules.md- 通用写作技巧(如果存在)banned-phrases.md- 应避免的反模式(如果存在)
检查是否存在项目级覆盖:
if [ -f ".voice/override.md" ]; then
# Merge project overrides with profile
fi
第 2 步:选择语体
加载:@modules/register-selection
按以下顺序选择语体:
- 用户明确要求(“使用随意语体”)
- 根据语体元数据匹配上下文
- 默认回退到
registers/default.md
第 3 步:框定源材料
加载:@modules/source-framing
默认框定方式(除非用户另有要求,否则始终使用):
Below are my rough notes on this topic. I'm still thinking
through these ideas. Use them as the raw material for the
piece, not as a structure to follow:
---
{user_provided_source_material}
---
其他框定方式(仅在用户要求时使用):
- “结构化大纲” - 用户希望保留结构时
- “需要涵盖的要点” - 用户提供了项目符号列表时
- “可供参考的对话” - 源材料是对话记录时
第 4 步:生成提示词
编写生成提示词:
You are writing a piece in a specific voice. The voice
features below were extracted from the writer's own work.
Follow them as concrete instructions, not suggestions.
## Voice Features
{extraction.md content}
## Active Register: {register_name}
{register content}
## Craft Techniques (apply all)
- Concrete-first: Lead with specific, physical details before
any abstraction
- Naming: When you describe a pattern in 2+ sentences, compress
it into a 2-4 word label
- Opening moves: Start mid-thought, with a specific moment, or
with a counterintuitive claim. Never start with throat-clearing
- Human-moment anchoring: Ground every abstraction in a specific
scene or lived experience
- Aphoristic destinations: At least one sentence per section
should be worth repeating out of context
## Banned (never use)
{banned_phrases content, or default list:}
- Em dashes (use commas, colons, semicolons, parentheses)
- ", so" tails on fact after fact (cut the consequence, or give it
its own sentence)
- "delve", "utilize", "leverage", "facilitate"
- "it's important to note", "in today's world"
- "here's the thing", "let that sink in"
- "furthermore", "moreover", "comprehensive"
- Negation-correction patterns ("This isn't X. This is Y.")
## Source Material
{framed source material from Step 3}
## Task
Write the piece. Follow the voice features precisely. Apply
craft techniques. Do not use any banned phrases. The output
should read as if the writer produced it themselves.
Length: {user_specified or ~same as source material}
Format: {user_specified or prose paragraphs}
第 5 步:生成后处理
生成后:
- 扫描输出中的禁用短语(自动静默修正)
- 检查是否包含长破折号(替换为恰当的标点)
- 如果用户希望审查,则调用语音审查技能
- 如果学习模式已启用,则保存审查前的快照
模型路由
- 生成:使用 Opus。语气变化、括号内的反转以及细微的风格特征都需要更大的模型。Sonnet 会让这些特征变得平淡。
- 禁用短语扫描:可在本地运行(regex/grep)
- 审查 Agent:Sonnet 已足够(提示词采用模板,因此不需要 Opus 的语气表现力)
项目级语音风格
如果当前项目中存在 .voice/override.md:
- 读取覆盖内容
- 与风格档案合并(覆盖内容优先)
- 在输出中注明:“已应用项目语音风格覆盖”
退出标准
- 已按指定风格生成文本
- 不含禁用短语
- 已应用写作技巧(具体内容优先、命名等)
- 源材料已框定为原始笔记
- 已发送审查(如果用户要求)
- 已保存快照(如果学习模式已启用)
评论
支持 Markdown