settings-and-tuning
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSettings and Tuning
设置与调优
Configure all adjustable parameters for the TTS engine, Telegram bot, and supporting infrastructure. All settings are centralized in the mise.toml SSoT.
Platform: macOS (Apple Silicon)
配置TTS引擎、Telegram机器人及配套基础设施的所有可调参数。所有设置都集中存放在作为唯一真实数据源(SSoT)的mise.toml文件中。
平台: macOS (Apple Silicon)
When to Use This Skill
何时使用该技能
- Changing TTS voice (English, Chinese, or macOS voices)
say - Adjusting speech speed
- Tuning TTS timeouts or queue depth
- Configuring notification rate limiting or circuit breakers
- Adjusting prompt executor throttling
- Modifying session picker limits
- Changing audit log retention
- 更换TTS语音(英文、中文,或是macOS 命令自带语音)
say - 调整语音播放速度
- 调优TTS超时时间或队列深度
- 配置通知限流或熔断机制
- 调整提示词执行器节流规则
- 修改会话选择器限制
- 更改审计日志保留时长
Requirements
前置要求
| Component | Required | Installation |
|---|---|---|
| mise | Yes | |
| Bot running | Recommended | Changes to TTS/queue settings require bot restart |
| 组件 | 要求 | 安装说明 |
|---|---|---|
| mise | 必须 | |
| 运行机器人 | 推荐 | 修改TTS/队列设置后需要重启机器人 |
Workflow Phases
工作流阶段
Phase 0: Read Current Configuration
阶段0:读取当前配置
Read the current mise.toml to see all active settings:
bash
cat ~/.claude/automation/claude-telegram-sync/mise.tomlAll configurable values live in the section. The file is the single source of truth for the entire stack.
[env]读取当前的mise.toml文件查看所有生效设置:
bash
cat ~/.claude/automation/claude-telegram-sync/mise.toml所有可配置值都位于 区块下,该文件是整个技术栈的唯一真实数据源。
[env]Phase 1: Identify What to Change
阶段1:确认要修改的配置项
Present the config groups to the user via AskUserQuestion. Config groups:
| Group | Settings | Description |
|---|---|---|
| TTS Voice | | Voice selection per language |
| TTS Speed | | Speech rate multiplier |
| TTS Timeouts | | Generation and playback timeouts |
| TTS Queue | | Queue limits and staleness |
| TTS Signal | | Signal sound path (empty to disable) |
| Rate Limiting | | Notification and summarizer throttling |
| Prompt Executor | | Prompt execution throttling and circuit breaker |
| Session Picker | | Session scanning and display limits |
| Audit | | Log retention period |
| Model | | Claude model for Agent SDK calls |
通过AskUserQuestion向用户展示配置分组,配置分组如下:
| 分组 | 设置项 | 说明 |
|---|---|---|
| TTS语音 | | 各语言的语音选择 |
| TTS语速 | | 语速倍数 |
| TTS超时 | | 生成与播放超时 |
| TTS队列 | | 队列限制与过期时长 |
| TTS提示音 | | 提示音文件路径(为空则禁用) |
| 限流 | | 通知和摘要生成器节流 |
| 提示词执行器 | | 提示词执行节流与熔断 |
| 会话选择器 | | 会话扫描与展示限制 |
| 审计 | | 日志保留周期 |
| 模型 | | Agent SDK调用使用的Claude模型 |
Phase 2: Edit Configuration
阶段2:编辑配置
Edit the appropriate line(s) in . Use the Edit tool to make precise changes to specific values.
~/.claude/automation/claude-telegram-sync/mise.toml编辑 文件中的对应行,使用编辑工具对特定值进行精确修改。
~/.claude/automation/claude-telegram-sync/mise.tomlPhase 3: Validate and Apply
阶段3:验证并生效
- Verify the edited value is within the valid range (see Config Reference)
- If TTS, queue, or rate limiting settings changed, restart the bot:
bash
undefined- 确认编辑后的值处于合法范围内(参考配置参考)
- 如果修改了TTS、队列或限流设置,重启机器人:
bash
undefinedOption A: If using mise tasks
选项A:使用mise任务
cd ~/.claude/automation/claude-telegram-sync && mise run bot:restart
cd ~/.claude/automation/claude-telegram-sync && mise run bot:restart
Option B: Manual restart
选项B:手动重启
pkill -f "bun.*main.ts" && cd ~/.claude/automation/claude-telegram-sync && bun --watch run src/main.ts
1. Confirm new settings are active by checking bot logs or testing the affected feature
---pkill -f "bun.*main.ts" && cd ~/.claude/automation/claude-telegram-sync && bun --watch run src/main.ts
3. 通过查看机器人日志或测试受影响功能,确认新设置已生效
---TodoWrite Task Templates
待编写任务模板
Template: Settings Adjustment
模板:设置调整
1. [Read] Read current mise.toml configuration
2. [Identify] Present config groups to user via AskUserQuestion
3. [Select] User selects setting category to modify
4. [Edit] Update mise.toml with new values
5. [Validate] Verify values are in valid range
6. [Apply] Restart bot to apply changes (if TTS or queue settings changed)
7. [Verify] Confirm new settings are active1. [Read] Read current mise.toml configuration
2. [Identify] Present config groups to user via AskUserQuestion
3. [Select] User selects setting category to modify
4. [Edit] Update mise.toml with new values
5. [Validate] Verify values are in valid range
6. [Apply] Restart bot to apply changes (if TTS or queue settings changed)
7. [Verify] Confirm new settings are activePost-Change Checklist
修改后检查清单
After modifying this skill:
- Verify all config groups in SKILL.md match current mise.toml
- Update config-reference.md if new env vars were added
- Test that changed settings take effect after bot restart
- Update with change description
references/evolution-log.md
修改该技能后:
- 确认SKILL.md中的所有配置分组与当前mise.toml一致
- 如果新增了环境变量,更新config-reference.md
- 测试修改后的设置在机器人重启后能正常生效
- 在 中更新修改说明
references/evolution-log.md
Troubleshooting
故障排查
| Issue | Cause | Solution |
|---|---|---|
| Settings not taking effect | Bot not restarted | Restart bot after changing mise.toml |
| mise.toml parse error | Invalid TOML syntax | Check for missing quotes or unescaped chars |
| Voice not found | Invalid voice name | Check voice catalog (Kokoro voices are case-sensitive) |
| Speed too fast/slow | Value out of range | Use 0.5 to 2.0 range for TTS_SPEED |
| Circuit breaker stuck open | Too many failures | Wait for breaker timeout or restart bot |
| Timeout too short | TTS generation slow on first run | Model warmup takes longer; increase timeout |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 设置不生效 | 机器人未重启 | 修改mise.toml后重启机器人 |
| mise.toml解析错误 | TOML语法无效 | 检查是否缺少引号或存在未转义字符 |
| 找不到语音 | 语音名称无效 | 检查语音目录(Kokoro语音区分大小写) |
| 语速过快/过慢 | 值超出范围 | TTS_SPEED取值范围为0.5到2.0 |
| 熔断器处于打开状态 | 失败次数过多 | 等待熔断器超时或重启机器人 |
| 超时时间过短 | 首次运行时TTS生成速度慢 | 模型预热需要更长时间,调高超时时间 |
Reference Documentation
参考文档
- Config Reference - Full reference table with all env vars, defaults, valid ranges, and component ownership
- mise.toml Reference - Hub/spoke mise architecture, secret loading, and task file structure
- Evolution Log - Change history for this skill
- 配置参考 - 包含所有环境变量、默认值、合法范围和所属组件的完整参考表
- mise.toml参考 - 中心/分支mise架构、密钥加载和任务文件结构说明
- 迭代日志 - 该技能的修改历史