full-stack-bootstrap
One-time bootstrap for Kokoro TTS engine, Telegram bot, and BotFather setup. TRIGGERS - setup tts, install kokoro, botfather, bootstrap tts-tg-sync, configure telegram bot, full stack setup.
Best use case
full-stack-bootstrap is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
One-time bootstrap for Kokoro TTS engine, Telegram bot, and BotFather setup. TRIGGERS - setup tts, install kokoro, botfather, bootstrap tts-tg-sync, configure telegram bot, full stack setup.
Teams using full-stack-bootstrap should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/full-stack-bootstrap/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How full-stack-bootstrap Compares
| Feature / Agent | full-stack-bootstrap | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
One-time bootstrap for Kokoro TTS engine, Telegram bot, and BotFather setup. TRIGGERS - setup tts, install kokoro, botfather, bootstrap tts-tg-sync, configure telegram bot, full stack setup.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Full Stack Bootstrap
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.
## When to Use This Skill
- First-time setup of the tts-tg-sync plugin
- Reinstalling after a clean OS install or hardware migration
- Setting up a new machine with the full TTS + Telegram stack
- Recovering from a broken installation (run `kokoro-install.sh --uninstall` first)
---
## Requirements
| Component | Required | Installation |
| ------------------- | -------- | --------------------------------------- |
| Bun | Yes | `brew install oven-sh/bun/bun` |
| mise | Yes | `brew install mise` |
| uv | Yes | `brew install uv` |
| Python 3.13 | Yes | `uv python install 3.13` |
| Homebrew | Yes | Already installed on macOS dev machines |
| Apple Silicon (M1+) | Yes | Required for MLX Metal acceleration |
---
## Workflow Phases
### Phase 0: Preflight Check
Verify all prerequisites are installed and accessible:
```bash
command -v bun # Bun runtime for TypeScript bot
command -v mise # Environment manager
command -v uv # Python package manager
uv python list | grep 3.13 # Python 3.13 available
```
If any tool is missing, install via Homebrew (`brew install <tool>`). Python 3.13 is installed via `uv python install 3.13`.
### Phase 1: Kokoro TTS Engine Install
Run the bundled installer script:
```bash
bash scripts/kokoro-install.sh --install
```
<!-- SSoT-OK: kokoro-install.sh is the SSoT for versions and deps -->
This performs:
1. Requires Apple Silicon (fails fast on Intel/Linux)
2. Creates venv at `~/.local/share/kokoro/.venv` with Python 3.13 via uv
3. Installs PyPI deps (mlx-audio, soundfile, numpy)
4. Copies `kokoro_common.py` and `tts_generate.py` from plugin bundle to `~/.local/share/kokoro/`
5. Downloads Kokoro-82M-bf16 MLX model from HuggingFace (`mlx-community/Kokoro-82M-bf16`)
6. Writes `version.json` with mlx_audio version, backend, and model ID
### Phase 2: BotFather Token Setup
Guide the user through Telegram BotFather to create a bot token:
1. Open Telegram, search for `@BotFather`
2. Send `/newbot`, follow prompts (name + username)
3. Copy the HTTP API token
4. Verify token: `curl -s "https://api.telegram.org/bot<TOKEN>/getMe" | jq .ok`
5. Get chat_id by sending a message to the bot, then: `curl -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.
### Phase 3: Secrets Storage
Store the bot token securely:
```bash
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:
```toml
# ~/.claude/automation/claude-telegram-sync/.mise.local.toml
[env]
_.file = "{{env.HOME}}/.claude/.secrets/ccterrybot-telegram"
```
### Phase 4: Environment Configuration
Add Kokoro paths to `mise.toml`:
```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"
```
### Phase 5: Shell Symlinks
Create symlinks in `~/.local/bin/` pointing to plugin shell scripts:
```bash
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
```
### Phase 6: Verification
1. Generate a test WAV and play it:
```bash
~/.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
```
1. Verify bot responds to /status via Telegram API:
```bash
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/getMe" | jq .ok
```
---
## TodoWrite Task Templates
### Template: Full Stack Bootstrap
```
1. [Preflight] Verify Bun installed
2. [Preflight] Verify mise installed
3. [Preflight] Verify uv installed
4. [Preflight] Verify Python 3.13 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
```
---
## Post-Change Checklist
After modifying this skill:
1. [ ] Verify `kokoro-install.sh --health` passes all 6 checks
2. [ ] Confirm `.mise.local.toml` is gitignored
3. [ ] Test symlinks resolve correctly (`ls -la ~/.local/bin/tts_*.sh`)
4. [ ] Verify bot token works via `getMe` API call
5. [ ] Run a full TTS round-trip: clipboard text to audio playback
6. [ ] Update `references/evolution-log.md` with change description
## Troubleshooting
| Issue | Cause | Solution |
| ----------------------------------- | ----------------------------------- | ----------------------------------------------------------- |
| uv not found | Not installed | `brew install uv` |
| Python 3.13 not available | Not installed via uv | `uv python install 3.13` |
| 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 |
---
## Reference Documentation
- [Kokoro Bootstrap](./references/kokoro-bootstrap.md) - Detailed venv setup, Python 3.13 via uv, MLX-Audio, model download
- [BotFather Guide](./references/botfather-guide.md) - Step-by-step Telegram bot creation and token management
- [Upstream Fork](./references/upstream-fork.md) - MLX-Audio Kokoro upstream and bundled script rationale
- [Evolution Log](./references/evolution-log.md) - 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.
---
---Related Skills
run-full-release
Run the current repo's mise release pipeline, or bootstrap one if missing. Use when user wants to release, version bump, publish a package, or set up release automation for a new repo. Detects ecosystem (Python/Rust/Node/mixed) and scaffolds individualized mise release tasks.
bootstrap-monorepo
Autonomous polyglot monorepo bootstrap meta-prompt. TRIGGERS - new monorepo, polyglot setup, scaffold Python+Rust+Bun, monorepo from scratch.
static-page-stack
SOTA stack recommendations for elegant, controlled, semantic static HTML pages — dashboards, post-mortems, technical-investigation reports, documentation sites with embedded SVG/charts. Use when the user asks to create a new static HTML page, build a dashboard, design a post-mortem report, set up a technical-doc site, choose a chart library, or pick a whiteboard tool. Also use when the user is dissatisfied with current ad-hoc HTML output (e.g., Tailwind CDN + utility-class soup) and wants a proper design system. Do NOT use for: dynamic web apps, server-rendered sites, single-page React/Vue applications, or one-off prose-only pages with no diagrams or structure.
full-workflow
Full workflow - record + backup + convert + analyze. TRIGGERS - full workflow, complete recording, end-to-end.
bootstrap
Pre-session bootstrap - generates script to start recording BEFORE entering Claude Code. Chunking handled by daemon. TRIGGERS - bootstrap, pre-session, start recording, before claude.
voice-quality-audition
Audition Kokoro TTS voices to compare quality and grade. TRIGGERS - audition voices, kokoro voices, voice comparison, tts voice, voice quality, compare voices.
settings-and-tuning
Configure TTS voices, speed, timeouts, queue depth, and bot settings. TRIGGERS - configure tts, change voice, tts speed, queue depth, tts timeout, bot config, tune settings, adjust parameters.
diagnostic-issue-resolver
Diagnose and resolve TTS and Telegram bot issues. TRIGGERS - tts not working, bot not responding, kokoro error, audio not playing, lock stuck, telegram bot troubleshoot, diagnose issue.
component-version-upgrade
Upgrade Kokoro model, bot dependencies, or TTS components. TRIGGERS - upgrade kokoro, update model, upgrade bot, update dependencies, version bump, component update.
clean-component-removal
Remove TTS and Telegram sync components cleanly. TRIGGERS - uninstall tts, remove telegram bot, uninstall kokoro, clean tts, teardown, component removal.
send-message
Use when user wants to send a text message on Telegram as their personal account via MTProto, text someone, or message a contact by username, phone, or chat ID.
send-media
Use when user wants to send or upload a file, photo, video, voice note, or document on Telegram via their personal account.