
Settings And Tuning
- 101 installs
- 62 repo stars
- Updated August 3, 2026
- terrylica/cc-skills
Helps with ai & agent building tasks.
About
settings-and-tuning is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- settings-and-tuning
- AI & Agent Building
- AI-coding skill
Settings And Tuning by the numbers
- 101 all-time installs (skills.sh)
- +1 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #4,322 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/terrylica/cc-skills --skill settings-and-tuningAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 101 |
|---|---|
| repo stars | ★ 62 |
| Last updated | August 3, 2026 |
| Repository | terrylica/cc-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Settings 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)
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
When to Use This Skill
- Changing TTS voice (English, Chinese, or macOS
sayvoices) - 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
---
Requirements
| Component | Required | Installation |
|---|---|---|
| mise | Yes | brew install mise (for env loading) |
| Bot running | Recommended | Changes to TTS/queue settings require bot restart |
---
Workflow Phases
Phase 0: Read Current Configuration
Read the current mise.toml to see all active settings:
cat ~/.claude/automation/claude-telegram-sync/mise.tomlAll configurable values live in the [env] section. The file is the single source of truth for the entire stack.
Phase 1: Identify What to Change
Present the config groups to the user via AskUserQuestion. Config groups:
| Group | Settings | Description |
|---|---|---|
| TTS Voice | TTS_VOICE_EN, TTS_VOICE_ZH, TTS_VOICE_SAY_EN, TTS_VOICE_SAY_ZH | Voice selection per language |
| TTS Speed | TTS_SPEED | Speech rate multiplier |
| TTS Timeouts | TTS_GENERATE_TIMEOUT_MS, TTS_SAY_TIMEOUT_MS | Generation and playback timeouts |
| TTS Queue | TTS_MAX_QUEUE_DEPTH, TTS_STALE_TTL_MS, TTS_MAX_TEXT_LEN | Queue limits and staleness |
| TTS Signal | TTS_SIGNAL_SOUND | Signal sound path (empty to disable) |
| Rate Limiting | NOTIFICATION_MIN_INTERVAL_MS, SUMMARIZER_* | Notification and summarizer throttling |
| Prompt Executor | PROMPT_* | Prompt execution throttling and circuit breaker |
| Session Picker | SESSION_* | Session scanning and display limits |
| Audit | AUDIT_RETENTION_DAYS | Log retention period |
| Model | HAIKU_MODEL | Claude model for Agent SDK calls |
Phase 2: Edit Configuration
Edit the appropriate line(s) in ~/.claude/automation/claude-telegram-sync/mise.toml. Use the Edit tool to make precise changes to specific values.
Phase 3: Validate and Apply
1. Verify the edited value is within the valid range (see Config Reference) 2. If TTS, queue, or rate limiting settings changed, restart the bot:
# Option A: If using mise tasks
cd ~/.claude/automation/claude-telegram-sync && mise run bot:restart
# Option B: Manual restart
pkill -f "bun.*main.ts" && cd ~/.claude/automation/claude-telegram-sync && bun --watch run src/main.ts1. Confirm new settings are active by checking bot logs or testing the affected feature
---
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 active---
Post-Change Checklist
After modifying this skill:
1. [ ] Verify all config groups in SKILL.md match current mise.toml 2. [ ] Update config-reference.md if new env vars were added 3. [ ] Test that changed settings take effect after bot restart 4. [ ] Update references/evolution-log.md with change description
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 |
---
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
Post-Execution Reflection
After this skill completes, reflect before closing the task:
0. Locate yourself. — Find this SKILL.md's canonical path (Glob for this skill's name) before editing. All corrections target THIS file and its sibling references/ — never other documentation. 1. What failed? — Fix the instruction that caused it. If it could recur, add it as an anti-pattern. 2. What worked better than expected? — Promote it to recommended practice. Document why. 3. What drifted? — Any script, reference, or external dependency that no longer matches reality gets fixed now. 4. Log it. — Every change gets an evolution-log entry with trigger, fix, and evidence.
Do NOT defer. The next invocation inherits whatever you leave behind.
---
---
Configuration Reference
Complete reference for all environment variables in ~/.claude/automation/claude-telegram-sync/mise.toml.
Config SSoT
All settings live in the [env] section of mise.toml. The bot and shell scripts read these as environment variables. All values are strings in TOML (mise convention).
---
TTS Voice Configuration
| Variable | Default | Valid Values | Component |
|---|---|---|---|
TTS_VOICE_EN | af_heart | Any Kokoro voice name | tts_kokoro.sh, bot TTS |
TTS_VOICE_ZH | zf_xiaobei | Any Kokoro Chinese voice | tts_kokoro.sh, bot TTS |
TTS_VOICE_SAY_EN | Samantha | macOS say voice name | tts_read_clipboard.sh |
TTS_VOICE_SAY_ZH | Ting-Ting | macOS say voice name | tts_read_clipboard.sh |
Notes:
- Kokoro voices are case-sensitive. Use
tts_kokoro_audition.shto preview voices. - macOS
sayvoices: list available withsay -v '?' TTS_VOICE_ENandTTS_VOICE_ZHare used by the Kokoro engine (higher quality)TTS_VOICE_SAY_ENandTTS_VOICE_SAY_ZHare fallback voices using macOSsay
TTS Speed
| Variable | Default | Valid Range | Component |
|---|---|---|---|
TTS_SPEED | 1.25 | 0.5 to 2.0 | tts_kokoro.sh, bot TTS |
Notes:
1.0is normal speed1.25is the default (slightly faster for efficiency)- Values below
0.5or above2.0may produce distorted audio
TTS Timeouts
| Variable | Default | Valid Range | Component |
|---|---|---|---|
TTS_GENERATE_TIMEOUT_MS | 15000 | 5000 to 60000 | bot kokoro-client |
TTS_SAY_TIMEOUT_MS | 60000 | 10000 to 300000 | bot kokoro-client |
Notes:
TTS_GENERATE_TIMEOUT_MS: Maximum time to wait for Kokoro to generate a WAV chunkTTS_SAY_TIMEOUT_MS: Maximum time for the entire TTS playback (all chunks)- First-run generation is slower due to model warmup; subsequent calls are faster
TTS Queue
| Variable | Default | Valid Range | Component |
|---|---|---|---|
TTS_MAX_QUEUE_DEPTH | 5 | 1 to 20 | bot TTS queue |
TTS_STALE_TTL_MS | 120000 | 30000 to 600000 | bot TTS queue |
TTS_MAX_TEXT_LEN | 800 | 100 to 5000 | bot TTS queue |
Notes:
TTS_MAX_QUEUE_DEPTH: Maximum pending TTS jobs. New requests are dropped if queue is full.TTS_STALE_TTL_MS: Time-to-live for queued items. Stale items are discarded (2 min default).TTS_MAX_TEXT_LEN: Maximum text length accepted for TTS. Longer text is truncated.
TTS Signal Sound
| Variable | Default | Valid Range | Component |
|---|---|---|---|
TTS_SIGNAL_SOUND | /System/Library/Sounds/Tink.aiff | Any .aiff/.wav path, or empty | tts-common.sh |
Notes:
- Plays a short sound to indicate TTS is processing (non-blocking)
- Set to empty string
""to disable the signal sound - macOS system sounds are in
/System/Library/Sounds/
Notification Rate Limiting
| Variable | Default | Valid Range | Component |
|---|---|---|---|
NOTIFICATION_MIN_INTERVAL_MS | 5000 | 1000 to 60000 | bot notification-watcher |
SUMMARIZER_MIN_INTERVAL_MS | 10000 | 5000 to 120000 | bot summarizer |
SUMMARIZER_CIRCUIT_BREAKER_MS | 300000 | 60000 to 3600000 | bot summarizer |
SUMMARIZER_MAX_FAILURES | 3 | 1 to 10 | bot summarizer |
Notes:
NOTIFICATION_MIN_INTERVAL_MS: Minimum gap between Telegram notifications (prevents spam)SUMMARIZER_MIN_INTERVAL_MS: Minimum gap between summarization API callsSUMMARIZER_CIRCUIT_BREAKER_MS: Cooldown period afterSUMMARIZER_MAX_FAILURESconsecutive failures (5 min default)- Circuit breaker resets after the cooldown period, allowing retries
Prompt Executor
| Variable | Default | Valid Range | Component |
|---|---|---|---|
PROMPT_MIN_INTERVAL_MS | 30000 | 10000 to 300000 | bot prompt-executor |
PROMPT_EXECUTION_TIMEOUT_MS | 120000 | 30000 to 600000 | bot prompt-executor |
PROMPT_EDIT_THROTTLE_MS | 1500 | 500 to 10000 | bot prompt-executor |
PROMPT_CIRCUIT_BREAKER_MS | 600000 | 60000 to 3600000 | bot prompt-executor |
PROMPT_MAX_FAILURES | 3 | 1 to 10 | bot prompt-executor |
Notes:
PROMPT_MIN_INTERVAL_MS: Minimum gap between prompt executions (30s default)PROMPT_EXECUTION_TIMEOUT_MS: Maximum time for a single prompt execution (2 min default)PROMPT_EDIT_THROTTLE_MS: Debounce for edit detection (prevents rapid re-execution)PROMPT_CIRCUIT_BREAKER_MS: Cooldown after consecutive failures (10 min default)
Session Picker
| Variable | Default | Valid Range | Component |
|---|---|---|---|
SESSION_SCAN_LIMIT | 200 | 50 to 1000 | bot session-lister |
SESSION_DISPLAY_LIMIT | 30 | 5 to 100 | bot session-lister |
SESSION_MAX_AGE_DAYS | 7 | 1 to 90 | bot session-lister |
SESSION_PENDING_TTL_MS | 300000 | 60000 to 3600000 | bot session-lister |
Notes:
SESSION_SCAN_LIMIT: Maximum sessions to scan from filesystemSESSION_DISPLAY_LIMIT: Maximum sessions shown in Telegram picker UISESSION_MAX_AGE_DAYS: Sessions older than this are excludedSESSION_PENDING_TTL_MS: Time to wait for user to pick a session before timing out (5 min default)
Audit Logging
| Variable | Default | Valid Range | Component |
|---|---|---|---|
AUDIT_RETENTION_DAYS | 14 | 1 to 365 | bot audit |
Notes:
- Audit logs older than this are eligible for cleanup
- Logs are stored in
~/.claude/automation/claude-telegram-sync/logs/audit/
Model Configuration
| Variable | Default | Valid Range | Component |
|---|---|---|---|
HAIKU_MODEL | claude-haiku-4-5-20251001 | Valid Anthropic model ID | bot Agent SDK calls |
Notes:
- Used for summarization and other Agent SDK calls in the bot
- Change this when a newer Haiku model is released
settings-and-tuning Evolution Log
| Date | Change | Reason |
|---|---|---|
| 2026-02-13 | Initial creation | Plugin bootstrap |
mise.toml Architecture Reference
How the tts-tg-sync bot uses mise.toml for configuration, secret loading, and task orchestration.
Hub/Spoke Structure
~/.claude/automation/claude-telegram-sync/
├── mise.toml # Hub: [tools] + [env] (SSoT for all config)
├── .mise.local.toml # Secrets: _.file loads BOT_TOKEN/CHAT_ID (gitignored)
├── .mise/
│ └── tasks/
│ ├── bot.toml # Spoke: bot lifecycle tasks (start, stop, restart, logs)
│ └── validate.toml # Spoke: validation DAG tasks
└── src/ # TypeScript bot sourceHub: mise.toml
The root mise.toml owns two responsibilities:
1. [tools]: Runtime versions (Bun) 2. [env]: All configuration as environment variables
[tools]
bun = "1.3"
[env]
# All 30+ config values live here
TTS_VOICE_EN = "af_heart"
TTS_SPEED = "1.25"
# ... (see config-reference.md for full list)
[task_config]
includes = [".mise/tasks/bot.toml", ".mise/tasks/validate.toml"]Secrets: .mise.local.toml
Secrets are loaded from a separate file that is gitignored:
# .mise.local.toml (NEVER committed to git)
[env]
_.file = "{{env.HOME}}/.claude/.secrets/ccterrybot-telegram"The secrets file contains:
BOT_TOKEN=<telegram-bot-token>
CHAT_ID=<telegram-chat-id>Why \_.file for Secrets
The _.file directive loads a dotenv-style file as environment variables. Benefits:
- Secrets stay in a single file at
~/.claude/.secrets/(not in mise.toml) - The
.mise.local.tomlis gitignored, so the_.filepath itself is not committed - Same pattern used across all projects with secrets
Spoke: Task Files
Task files are included via [task_config].includes in the hub. They define bot lifecycle operations.
bot.toml (Core Tasks)
Typical tasks:
| Task | Purpose |
|---|---|
bot:start | Start the bot with bun --watch run src/main.ts |
bot:stop | Stop the bot process |
bot:restart | Stop then start |
bot:logs | Tail bot log output |
bot:status | Show bot process status |
validate.toml (Validation DAG)
Validation tasks for checking configuration and health. Tasks can depend on each other to form a validation DAG.
Environment Variable Flow
mise.toml [env] (default values, committed)
│
├── .mise.local.toml (secrets via _.file, gitignored)
│
└── Environment Variables
│
├── TypeScript bot (process.env.VAR)
├── Shell scripts (${VAR:-default})
└── Python scripts (os.environ.get("VAR", "default"))All components use the same environment variables with fallback defaults, so they work both with and without mise.
Editing Guidelines
When editing mise.toml:
1. All values are strings in TOML (mise convention). Use quotes: TTS_SPEED = "1.25" 2. Group related settings with comment headers (e.g., # --- TTS Voice Configuration ---) 3. Never put secrets in mise.toml. Use .mise.local.toml with _.file 4. Restart the bot after changing values (mise loads env on process start, not dynamically)
Template Syntax
mise uses Tera templates in TOML values:
[env]
# Reference HOME directory
KOKORO_VENV = "{{env.HOME}}/.local/share/kokoro/.venv"
# Reference config_root (directory containing mise.toml)
LOCAL_SCRIPTS = "{{config_root}}/scripts"Common template variables:
| Variable | Description |
|---|---|
{{env.HOME}} | User home directory |
{{env.VAR}} | Any existing environment variable |
{{config_root}} | Directory containing the mise.toml file |