From tts-tg-sync
One-time bootstrap for Kokoro TTS engine, Telegram bot, and BotFather setup. TRIGGERS - setup tts, install kokoro, botfather
How this skill is triggered — by the user, by Claude, or both
Slash command
/tts-tg-sync:full-stack-bootstrapThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
One-time bootstrap of the entire TTS + Telegram bot stack: Kokoro TTS engine (MLX-Audio on Apple Silicon), Telegram bot via BotFather, secrets management, environment configuration, and shell symlinks.
One-time bootstrap of the entire TTS + Telegram bot stack: Kokoro TTS engine (MLX-Audio on Apple Silicon), Telegram bot via BotFather, secrets management, environment configuration, and shell symlinks.
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.
kokoro-install.sh --uninstall first)| Component | Required | Installation |
|---|---|---|
| Bun | Yes | brew install oven-sh/bun/bun |
| mise | Yes | brew install mise |
| uv | Yes | brew install uv |
| Python 3.14 | Yes | uv python install 3.14 |
| Homebrew | Yes | Already installed on macOS dev machines |
| Apple Silicon (M1+) | Yes | Required for MLX Metal acceleration |
Verify all prerequisites are installed and accessible:
command -v bun # Bun runtime for TypeScript bot
command -v mise # Environment manager
command -v uv # Python package manager
uv python list | grep 3.14 # Python 3.14 available
If any tool is missing, install via Homebrew (brew install <tool>). Python 3.14 is installed via uv python install 3.14.
Run the bundled installer script:
bash scripts/kokoro-install.sh --install
This performs:
~/.local/share/kokoro/.venv with Python 3.14 via uvkokoro_common.py and tts_generate.py from plugin bundle to ~/.local/share/kokoro/mlx-community/Kokoro-82M-bf16)version.json with mlx_audio version, backend, and model IDGuide the user through Telegram BotFather to create a bot token:
@BotFather/newbot, follow prompts (name + username)curl -s "https://api.telegram.org/bot<TOKEN>/getMe" | jq .okcurl -s "https://api.telegram.org/bot<TOKEN>/getUpdates" | jq '.result[0].message.chat.id'If a token already exists at ~/.claude/.secrets/ccterrybot-telegram, verify it works and skip this phase.
Store the bot token securely:
mkdir -p ~/.claude/.secrets
chmod 700 ~/.claude/.secrets
echo "BOT_TOKEN=<token>" > ~/.claude/.secrets/ccterrybot-telegram
echo "CHAT_ID=<chat_id>" >> ~/.claude/.secrets/ccterrybot-telegram
chmod 600 ~/.claude/.secrets/ccterrybot-telegram
Create .mise.local.toml (gitignored) in the bot directory to load secrets:
# ~/.claude/automation/claude-telegram-sync/.mise.local.toml
[env]
_.file = "{{env.HOME}}/.claude/.secrets/ccterrybot-telegram"
Add Kokoro paths to mise.toml:
# In ~/.claude/automation/claude-telegram-sync/mise.toml [env] section
KOKORO_VENV = "{{env.HOME}}/.local/share/kokoro/.venv"
KOKORO_SCRIPT = "{{env.HOME}}/.local/share/kokoro/tts_generate.py"
Create symlinks in ~/.local/bin/ pointing to plugin shell scripts:
mkdir -p ~/.local/bin
ln -sf <plugin>/scripts/tts_kokoro.sh ~/.local/bin/tts_kokoro.sh
ln -sf <plugin>/scripts/tts_read_clipboard.sh ~/.local/bin/tts_read_clipboard.sh
ln -sf <plugin>/scripts/tts_read_clipboard_wrapper.sh ~/.local/bin/tts_read_clipboard_wrapper.sh
ln -sf <plugin>/scripts/tts_speed_up.sh ~/.local/bin/tts_speed_up.sh
ln -sf <plugin>/scripts/tts_speed_down.sh ~/.local/bin/tts_speed_down.sh
ln -sf <plugin>/scripts/tts_speed_reset.sh ~/.local/bin/tts_speed_reset.sh
~/.local/share/kokoro/.venv/bin/python ~/.local/share/kokoro/tts_generate.py \
--text "Hello, bootstrap complete." --voice af_heart --lang en-us --speed 1.0 --output /tmp/test-bootstrap.wav
afplay /tmp/test-bootstrap.wav
rm -f /tmp/test-bootstrap.wav
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/getMe" | jq .ok
1. [Preflight] Verify Bun installed
2. [Preflight] Verify mise installed
3. [Preflight] Verify uv installed
4. [Preflight] Verify Python 3.14 available via uv
5. [Kokoro] Run kokoro-install.sh --install
6. [Kokoro] Verify MLX-Audio acceleration
7. [BotFather] Guide BotFather token creation (or verify existing)
8. [Secrets] Store token in ~/.claude/.secrets/ccterrybot-telegram
9. [Secrets] Create .mise.local.toml with _.file reference to secrets
10. [Environment] Add KOKORO_VENV and KOKORO_SCRIPT to mise.toml
11. [Symlinks] Create ~/.local/bin/ symlinks for all TTS shell scripts
12. [Verify] Generate test WAV with Kokoro and play with afplay
13. [Verify] Check bot responds to /status via Telegram API
After modifying this skill:
kokoro-install.sh --health passes all 6 checks.mise.local.toml is gitignoredls -la ~/.local/bin/tts_*.sh)getMe API callreferences/evolution-log.md with change description| Issue | Cause | Solution |
|---|---|---|
| uv not found | Not installed | brew install uv |
| Python 3.14 not available | Not installed via uv | uv python install 3.14 |
| Not Apple Silicon | Intel Mac or Linux | Requires M1 or newer Mac (MLX Metal) |
| Model download fails | Network issue or HuggingFace outage | Check internet connectivity, retry |
| BotFather token invalid | Typo or revoked token | Verify via curl https://api.telegram.org/bot<TOKEN>/getMe |
| kokoro-install.sh permission denied | Script not executable | chmod +x scripts/kokoro-install.sh |
| Venv already exists | Previous partial install | Run kokoro-install.sh --uninstall then --install |
| tts_generate.py not found | Bundle copy failed | Check scripts/tts_generate.py exists in plugin |
After this skill completes, reflect before closing the task:
Do NOT defer. The next invocation inherits whatever you leave behind.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Synthesizes the current conversation into a structured spec (PRD) and publishes it to the project issue tracker with a ready-for-agent label, without interviewing the user.
npx claudepluginhub terrylica/cc-skills --plugin tts-tg-sync