一些skill分享(有不是原创的,只是分享)

大佬的

ask-continue

  • MistEO总结而来的一个skill。
  • 这个是他的GitHubhttps://github.com/MistEO,一位大佬

name: ask-continue
description: >-
每次回复结束前,无条件使用 AskQuestion 基于当前 context 生成 2-3 个最有价值的 follow-up 选项,
引导用户一键选中下一步,降低用户打字成本。所有选项都必须与当前 context 挂钩,禁止硬编码
"done / thinking / 没有了 / 让我想想" 这类模板化话术。必须在每次回复的最末尾主动调用,无任何例外。
Use proactively at the END of EVERY single response, unconditionally, no exceptions.

每次回复结束前追问延伸

无条件规则:每次回复的最后必须调用 AskQuestion。没有例外(Agent / Plan / Ask / Debug / SwitchMode 首次回复后都要)。

核心目标

不是单纯问"继续吗",而是从当前 context 推断用户下一步可能想做什么,把这些可能性作为具体可执行的选项暴露出来 —— 让用户能一键选中或直接在文本框修正,显著降低打字成本。

如果只给出 "没有了 / 让我想想" 两个选项,用户大概率要打字描述需求,这一轮就白费了 AskQuestion 的机会。

AskQuestion 选项结构(强制)

每次 2-3 个选项,少而精。所有选项都基于当前 context 生成不要硬编码 "done / thinking" 这种泛化兜底。选项太多反而让用户眼花;2-3 个最有价值的预测就够了。

候选方向(挑最契合当前 context 的 2-3 类,不要每类都塞):

  • 深化当前结论:对刚完成的内容追问细节、重审决策正确性("刚才 approved 的 PR-X 真的合理吗")
  • 验证 / double-check:把刚做的事情再核对或补一条测试("跑一遍相关 test 确认没 regression")
  • 相邻内容:合了 PR-A,探一下 PR-B / issue-B("顺便看下 sister PR #1232")
  • 上游 / 下游:刚处理了 symptom,去追 root cause("F13 nudge 最终上游是谁引入的")
  • 补充沉淀:把新得到的洞察记入 KNOWLEDGE / 项目文档("把这个教训写进 KNOWLEDGE.md")
  • 转向 / 收尾:如果当前话题已结束,提示 user 换个合理的下一主题("开始处理 daily 没做完的 issue triage")

注意:不设硬性的"退出"选项。用户如果想结束,可以直接在文本框说"够了" / 直接关掉对话。硬编码"结束本次对话"反而制造噪音。

label 书写要求

  • 动词开头说明具体要做什么:看 / 审 / 补 / 追问 / 记录 / 重审
  • 带上具体对象:PR 号、issue 号、模块名、文件名、作者 handle
  • 暗示背后原因(可选但推荐):让用户一眼知道为什么建议这个
  • 单行控制:30 字以内最佳,不要折行

反面示例

- id: "continue", label: "继续"              # 太泛化
- id: "next_pr", label: "看下一个 PR"         # 没指明哪个
- id: "deeper", label: "深入看看"             # 没说看什么
- id: "more", label: "做更多事"               # 完全没信息量
- id: "done", label: "结束本次对话"           # 硬编码兜底,不带 context
- id: "thinking", label: "让我想想…"          # 硬编码兜底,用户可以直接在文本框说

正面示例(基于 "刚合了 MaaEnd PR #2334" 的上下文)

从以下候选里挑 2-3 个最有价值的,不要全列:

- id: "followup_2334", label: "在 #2334 补 follow-up,追问 fatal reason 语义"
- id: "recheck_logic", label: "看 pipeline 配置,确认删 PostStop 后是否会循环刷 fatal_error"
- id: "review_other", label: "今天其他 approved 的 PR 也重新对照新 KNOWLEDGE 过一遍"

生成选项的启发式

回复完成后,写 AskQuestion 之前,挑其中 2-3 个最值得问的自省问题,再转化为选项:

  1. 我刚做的事情最薄弱的环节是什么? → "深化 / 验证"方向
  2. 这件事还有没做的相关部分? → "相邻内容"方向
  3. 我是在治标还是治本? → "上游 / 下游"方向
  4. 这次的新认知值得留存到文档吗? → "补充沉淀"方向
  5. 话题结束了的话,下一个自然的话题是什么? → "转向"方向

不是 5 个都要生成,只保留最契合当前 context 的 2-3 个。

处理逻辑

  • 用户输入文字 → 视为新需求,立即执行,完成后再次追问(基于新 context 重新生成选项)
  • 用户选某个延伸选项 → 执行对应操作,完成后再次追问(用执行后的新 context 重新生成选项,不要复用上一轮的选项池)
  • 用户选的是"收尾 / 转向"类选项 → 执行对应操作后追问允许更偏向"你本次的下一主题"方向,但仍然不要加硬编码 done

自己的一些劣质skill

在使用hermes的过程中总结出来了的

webgal-development

--- name: webgal-development title: WebGAL Terre Visual Novel Development description: Scaffold, structure, and write branch-based visual novels using the WebGAL Terre engine. Covers scene architecture, branching strategies, audio integration, and template patterns for slice-of-life and narrative-driven projects. tags: - webgal - galgame - visual-novel - scene-structure - branching ---

WebGAL Terre Visual Novel Development

When to use

  • User wants to create or expand a WebGAL Terre project
  • User asks for scene templates, branching structures, or narrative structuring
  • User needs to understand the WebGAL scene file format and capabilities

Project structure overview

A WebGAL project at game/ has:

game/
├── scene/          ← Scene scripts (.txt files)
├── figure/         ← Character sprites (stand.webp, etc.)
├── background/     ← Background images (bg.webp, etc.)
├── bgm/            ← Background music (.mp3 or other audio)
├── vocal/          ← Voice clips (.wav)
├── animation/      ← Custom animations
├── video/          ← Cutscene videos
├── tex/            ← Textures
├── template/       ← UI templates
├── config.txt      ← Project config (title, title image, BGM)
└── userStyleSheet.css  ← Custom styling

Scene script syntax

Scene files are .txt files under scene/. Key syntax:

; 注释以分号开头
bgm:filename.mp3;                    ← Set background music
changeBg:bg.webp -next;              ← Switch background
changeFigure:stand.webp -left -next; ← Show character sprite
setAnimation:enter-from-left -target=fig-left -next;
角色名:对话内容;                       ← Dialogue
miniAvatar:avatar.webp;              ← Small portrait
带有小头像的对话;                       ← Dialogue with portrait
setTextbox:hide;                     ← Hide text box
choose:选项:目标场景|选项2:场景2;      ← Branch
jump:filename.txt;                   ← Jump to scene
end;                                 ← End game
unlockCg:bg.webp -name=标题;         ← Unlock CG
unlockBgm:file.mp3 -name=名称;       ← Unlock BGM

Split by time-of-day chapters, each as its own scene file:

scene/
├── start.txt       ← Opening / title entry → jump:morning.txt
├── morning.txt     ← Wake up / leave
├── class.txt       ← Class / work
├── lunch.txt       ← Lunch break
├── afternoon.txt   ← Free time
├── evening.txt     ← Evening / commute
└── night.txt       ← Wrap-up / reflection → end;

Branching pattern

Each time block uses choose: for choices leading to sub-scenes. Keep each branch 10–20 lines.

choose:早起:morning_early|赖床:morning_lazy;

Sub-scenes end with jump:next_chapter.txt; to return to the main timeline.

Emotional arc suggestions

Section Tone Typical branch
morning sleepy, reluctant lazy vs disciplined
class bored, distracted focus vs phone
lunch neutral, social alone vs together
afternoon free, open study vs game vs walk
evening reflective choice of activity
night closure, quiet introspection / end

Audio integration

  • BGM: Place in bgm/, reference with bgm:filename;
  • Voice: Place in vocal/, suffix dialogue with -v filename.wav;
  • Conversion: ffmpeg -i input.m4a -vn -c:a libvorbis -q:a 4 output.ogg — the -vn flag is critical when the source has embedded cover art, otherwise ffmpeg fails with "Automatic encoder selection failed"

Config.txt format

1|Game_name:Title;
2|Game_key:key;
3|Title_img:image.webp;
4|Title_bgm:music.mp3;
5|Textbox_theme:imss;

User Preference: Template-First Delivery

When the user says 给我模板 / 直接给模板 / 给我代码 — they want complete, copy-pasteable working files, not explanations, not outlines, not "you could do X". Deliver:

  1. The exact file contents they need
  2. Ready to write to disk
  3. With comments inline so they can modify

Do not follow up with more questions or suggestions unless they ask.

Reference Templates

For a complete set of daily-life slice scene templates covering morning → class → lunch → afternoon → evening → night with branching:
skill_view(name="webgal-development", file_path="references/webgal-daily-life-template.md")

Pitfalls

  • m4a→ogg conversion fails: Add -vn to strip embedded cover art
  • Silent asset failure: WebGAL doesn't warn about missing sprites/backgrounds — always verify asset paths exist
  • Jump target: jump: expects a filename in scene/ (may need .txt suffix depending on version)
  • Choose targets: Branch scene filenames, placed in the same scene/ directory

doubao-tts-2

还有一些文件没有,音色列表索引,和示例脚本(可以让它自己去找,篇幅太长不放了)

--- name: doubao-tts-2 description: "调用火山引擎豆包语音合成模型 2.0(Doubao-Seed-TTS-2.0)生成中文语音" author: agent version: 2.1.0 created_by: agent metadata: platforms: [linux] ---

Doubao TTS 2.0

调用火山引擎 ByteSpeech V3 API 生成高质量中文语音。

⭐ 推荐优先使用 TTS 2.0(seed-tts-2.0),支持语音指令控制语气情感。


TTS 工作流(必须遵循)

每次用户要求生成语音时,按以下步骤思考并执行:

Step 0: 文本预处理

用户发来的原始文本可能包含舞台指示/语气标签,必须先清理再送去合成。

规则

  • 删除 (笑) (叹气) (低声) 等括号内的舞台指示 → 其内容融入 Step 3 的 voice_instruction
  • 删除 *动作* 类标注(如 轻笑 低语)→ 同样融入指令
  • 保留 …… 等语气词和标点 → 这些是自然语言风格的一部分
  • 长文本按情感转折点切成段落(每段不超过 150 字为佳)

示例

原始:停下吧……(笑)你走不掉的哦~
处理后文本:停下吧……你走不掉的哦~
指令补充:说到走不掉时轻笑一声

Step 1: 文本分析

分析文本的类型和情感基调:

  • 文本类型:叙事/独白/对话/旁白/广告/教学/新闻/角色扮演
  • 情感基调:温柔/愤怒/悲伤/开心/病娇/撒娇/傲娇/中性/悬疑/激动/冷漠
  • 说话人身份:叙述者/角色(男/女/少年/老人/特殊角色)
  • 语速预期:快/中/慢

Step 2: 选择音色

根据 Step 1 的分析选择 speaker:

  • 对话/角色扮演 → Saturn 系列或角色扮演类音色(如 病娇姐姐、傲娇女友、知性灿灿)
  • 通用叙事 → 通用场景音色(如 知性灿灿、小何、魅力苏菲)
  • 有声阅读 → 有声阅读类音色(如 霸气青叔、温柔淑女)
  • 视频配音 → 视频配音类音色(如 广告解说、磁怀解说男声)
  • 教育/客服 → 对应场景音色
  • 多语种 → 选择对应语种音色

优先选 TTS 2.0(uranus_bigtts 或 saturn 系列),TTS 1.0 作为备用。

Step 3: 确定语气参数

根据文本情感选择控制方式,建议三个参数配合使用

  • voice_instruction(推荐,TTS 2.0 全系列支持):用自然语言描述想要的语气

    • 关键技巧:指令要具体、精炼,描述开篇→中间→结尾的情感变化
    • 示例:"用病娇的语气,开头低沉冰冷压抑,逐渐激动充满占有欲和愤怒,后半段带着近乎崩溃的偏执和绝望的爱意"
    • 示例:"用温柔舒缓的语气,像在耳边轻声诉说"
    • 示例:"用悲伤颤抖的语气,带着哭腔"
    • ⚠️ 避免过长的指令描述整个情感弧线(模型记不住),应当配合分段来使用
  • emotion(Saturn 系列/多情感音色专用):从枚举值中选择

    • 中文:happy/sad/angry/surprised/fear/hate/excited/coldness/neutral/depressed/lovey-dovey/shy/comfort/tension/tender/storytelling/radio/magnetic/advertising/vocal-fry/asmr/news/entertainment/dialect
    • 英文:neutral/happy/angry/sad/excited/chat/asmr/warm/affectionate/authoritative
  • speed_ratio(所有音色都支持):控制语速,范围 0.5~2.0

    • 压抑/阴森 → 0.7~0.85(慢速)
    • 正常叙事 → 0.9~1.1(中速)
    • 愤怒/激动 → 1.2~1.4(快速,急促感)
    • 崩溃/歇斯底里 → 1.1~1.3(越来越快)

Step 3.5: 分段策略(重要!)

对于较长或情感复杂的文本,必须分段处理。

复杂的情感弧线(如病娇台词从压抑警告→愤怒占有→崩溃偏执→绝望收尾)无法在一次 TTS 调用中准确表达。模型只能在一个片段内维持一种情感基调。

分段规则:

  • 每段应有一个主导情感(如「冰冷警告」「愤怒占有」「崩溃偏执」「绝望收尾」)
  • 每段分别设置 voice_instruction + emotion + speed_ratio
  • 分段长度以 30~60 字为宜,最长不超过 150 字
  • 分别生成各段后再拼接播放

Step 4: 生成音频

调用 API 生成音频。

单段式:整段文本一次性合成,适合短文本或情感单一的内容。

python3 scripts/tts.py "文本" -o out.mp3 -s SPEAKER_ID -i "语气指令" -e emotion --speed 1.0

多段式(推荐 for 长文本/复杂情感):将文本按情感变化拆分成多个段落,每段独立合成后合并。

长文本(特别是角色扮演台词)必须拆分段落逐段合成,原因:

  • 一段 90 秒的音频,情感弧线太复杂,模型无法精准跟随
  • 拆分成 3-5 段,每段给独立的 voice_instruction + emotion + speed_ratio
  • 每段的语气指令聚焦于单一情感,效果远好于一个复杂的全局指令
echo '[
  {"text":"段1文本","instruction":"低沉冰冷警告","emotion":"coldness","speed":0.7},
  {"text":"段2文本","instruction":"愤怒咆哮","emotion":"angry","speed":1.35},
  {"text":"段3文本","instruction":"崩溃颤抖","emotion":"depressed","speed":1.05},
  {"text":"段4文本","instruction":"阴森低语","emotion":"tender","speed":0.75}
]' | python3 scripts/tts.py --multi -o merged.mp3

文本分段原则:按情感基调的自然转折点切分——

  • 开篇/铺垫 → 慢速 (0.7-0.85),emotion 偏冷淡/中性
  • 冲突/爆发 → 快速 (1.2-1.4),emotion 偏 angry/hate/excited
  • 转折/崩溃 → 中速 (0.95-1.1),emotion 偏 depressed/fear
  • 收尾/余韵 → 慢速 (0.7-0.85),emotion 偏 tender/neutral/coldness

Step 5: 反馈优化

用户说语气不对时,分维度调整:

  • 语速太慢/太快 → 调 speed_ratio(±0.1-0.2)
  • 情感不够 → 强化 voice_instruction 的描述,或换更匹配的 emotion
  • 音色不合适 → 换 speaker
  • 整段情感太平 → 拆成多段,每段单独控制

前置条件

凭证(内存中已有):

变量
APP_ID 1005636266
ACCESS_TOKEN 开头 1vWjOm...
RESOURCE_ID seed-tts-2.0(推荐)或 seed-tts-1.0

API 调用方式

端点: https://openspeech.bytedance.com/api/v3/tts/unidirectional

鉴权:

  • X-Api-Resource-Id: 资源 ID
  • X-Api-App-Id: APP_ID
  • X-Api-Access-Key: ACCESS_TOKEN

请求体:

{
  "req_app": {"app_id": "...", "token": "..."},
  "req_params": {
    "text": "要合成的文本",
    "speaker": "音色ID",
    "sample_rate": 24000,
    "format": "mp3",
    "voice_instruction": "用病娇的语气(可选,TTS 2.0 全系列支持)",
    "emotion": "angry(可选,Saturn 系列/多情感音色专用)",
    "speed_ratio": 1.0
  }
}

参数说明

  1. voice_instruction: 自然语言描述语气。TTS 2.0 全系列(uranus/saturn)均支持。
  2. emotion: 情感参数枚举值。适用于 _emo_ 后缀音色及 Saturn 系列。
  3. speed_ratio: 语速,范围 0.5~2.0。默认 1.0。
    • 压抑/慢速 → 0.7~0.85
    • 正常 → 0.9~1.1
    • 愤怒/急促 → 1.2~1.4
    • 极致效果可尝试 0.5(极慢)或 1.5(极快)

响应格式

NDJSON,多行 JSON,每行 data 为 base64 音频片段,必须遍历拼接所有行

all_audio = b''
for line in resp.text.strip().split('\n'):
    r = json.loads(line)
    if r.get('code') == 0 and r.get('data') and len(r['data']) > 100:
        all_audio += base64.b64decode(r['data'])

语音指令示例

效果 指令内容
病娇 用病娇的语气,开头温柔带着爱意,逐渐变得偏执疯狂充满占有欲和威胁感
吵架 用吵架的语气怼我,凶狠不耐烦
撒娇 用撒娇的语气,嗲嗲的
哭腔 用颤抖沙哑、带着崩溃与绝望的哭腔
傲娇 用傲娇的语气,嘴上不饶人但藏不住关心

快速示例

# 使用参考脚本
python3 scripts/tts.py "你好世界" -o hello.mp3

# 指定音色 + 语气指令
python3 scripts/tts.py "别再挣扎了" -o yandere.mp3 \
  -s saturn_zh_female_bingjiaojiejie_tob \
  -i "用病娇的语气,带着占有欲和危险感"

音色列表索引

完整列表在参考文件中:

文件 内容
references/tts2-speakers.md TTS 2.0 全部音色(50+)
references/saturn-speakers.md Saturn 角色扮演系列(30+)
references/tts1-speakers.md TTS 1.0 全部音色(100+)

常用推荐

音色 Speaker ID 特点
知性灿灿 2.0 zh_female_cancan_uranus_bigtts 角色扮演,情感丰富
病娇姐姐 2.0 saturn_zh_female_bingjiaojiejie_tob 病娇专属,支持 emotion
傲娇女友 2.0 saturn_zh_female_aojiaonvyou_tob 傲娇,适合对话
撒娇学妹 2.0 zh_female_sajiaoxuemei_uranus_bigtts 可爱撒娇
小何 2.0 zh_female_xiaohe_uranus_bigtts 通用女声,稳定
云舟 2.0 zh_male_m191_uranus_bigtts 通用男声
Vivi 2.0 zh_female_vv_uranus_bigtts 多语种+方言

要点

  • 响应是 NDJSON,必须遍历所有行拼接 audio chunks
  • 判断音频行:code==0data 长度 > 100
  • 最后一行是 {"code":20000000,"message":"OK","data":null}
  • TTS 2.0 和 1.0 的 resource ID / speaker 不能混用
  • ICL 开头音色是声音复刻,部分需额外授权
  • scripts/tts.py 提供一键调用;也可以直接 curl/Python 调 API
posted @ 2026-06-09 16:01  myflycat  阅读(93)  评论(0)    收藏  举报