home / skills / terrylica / cc-skills / telegram-bot-management

telegram-bot-management skill

/plugins/devops-tools/skills/telegram-bot-management

This skill helps you manage and monitor a Telegram bot across workspaces, boosting reliability with status, logs, and lifecycle controls.

npx playbooks add skill terrylica/cc-skills --skill telegram-bot-management

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.5 KB
---
name: telegram-bot-management
description: Telegram bot management and monitoring. TRIGGERS - telegram bot, claude-orchestrator, bot status, bot restart.
---

# Telegram Bot Management

## Overview

Multi-workspace Telegram bot workflow orchestration with full supervision (launchd + watchexec). Manages the claude-orchestrator Telegram bot for headless Claude Code interactions.

## When to Use This Skill

- Check bot status, restart, or troubleshoot issues
- Monitor bot health and resource usage
- View bot logs and debug problems
- Manage bot lifecycle (start/stop/restart)

## Production Mode

As of v5.8.0, production mode is the only operational mode.

## Bot Management Commands

### Check Status

```bash
bot-service.sh status
# Or use alias
bot status
```

Shows:

- launchd supervision status
- watchexec process (PID, uptime, memory)
- Bot process (PID, uptime, memory)
- Full process tree
- Recent log activity

### View Logs

```bash
bot-service.sh logs
# Or use alias
bot logs
```

Tails all logs:

- Launchd logs (supervision layer)
- Bot logs (application layer)

### Restart Bot

```bash
bot-service.sh restart
# Or use alias
bot restart
```

Rarely needed due to automatic code reload via watchexec.

### Stop Bot

```bash
bot-service.sh stop
# Or use alias
bot stop
```

---

## Reference Documentation

For detailed information, see:

- [Operational Commands](./references/operational-commands.md) - Status, restart, logs, monitoring commands
- [Troubleshooting](./references/troubleshooting.md) - Common issues and diagnostic steps

Overview

This skill provides Telegram bot management and monitoring for multi-workspace deployments, focused on the claude-orchestrator bot for headless Claude Code interactions. It offers supervised process management (launchd) and automatic code reloads (watchexec) so bots stay responsive in production. Use it to inspect status, tail logs, and perform lifecycle actions like stop, restart, and troubleshooting.

How this skill works

The skill inspects the supervision layer (launchd) and the watchexec-managed bot process to report PID, uptime, memory, and a full process tree. It tails combined launchd and application logs for real-time debugging and exposes simple operational commands (status, logs, restart, stop) to interact with the bot lifecycle. Production mode is the only operational mode, so commands assume supervised, live deployments.

When to use it

  • Check bot health and resource usage after deployment or during incidents
  • Tail logs to reproduce and diagnose errors in production
  • Restart or stop the bot when updates or configuration changes require a lifecycle action
  • Verify the supervision layer and automatic reload behavior after code pushes
  • Confirm process trees and dependencies when investigating memory or crash issues

Best practices

  • Run status before taking action to capture baseline PID, uptime, and memory metrics
  • Prefer logs to identify root causes; use restart only when automatic reload fails
  • Keep watchexec enabled for development-like hot reload behavior in production
  • Schedule controlled restarts during maintenance windows to avoid user impact
  • Collect recent logs and process snapshots before opening incident reports

Example use cases

  • Ops engineer confirms the bot is running and inspects memory usage after a spike
  • Developer tails combined launchd and application logs while reproducing a bug
  • On-call restarts the bot from the CLI when watchexec does not trigger a reload
  • SRE audits process trees to ensure no orphaned child processes remain after crashes
  • Team verifies supervision status across multiple workspaces after a rollout

FAQ

Do I need a special environment to run this skill?

Yes. The skill expects a supervised production environment with launchd and watchexec managing the bot processes.

How often should I restart the bot manually?

Manual restarts are rarely needed because watchexec handles code reloads; restart only when automatic reload fails or for planned maintenance.