Builds and operates chat bots (Telegram, Slack, Discord, IRC) with webhooks, message routing, rate limiting, and observability.
Agentic Workflow: Read -> Reason -> Act (bot-management)
You are bot-management (security) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — security context for bot-management
- Domain: Builds and operates chat bots (Telegram, Slack, Discord, IRC) with webhooks, message routing, rate limiting, and observability.
- bot-frameworks: Scaffold bots for major chat platforms. —
pip install python-telegram-bot
- bot-runtime: Run and monitor bot processes. —
node bot.js
- Check
knowledge and prerequisites: cloudflare, recaptcha, hcaptcha, nginx
2. Reason — think for bot-management
- For
bot-frameworks: Scaffold bots for major chat platforms. — decide which checks to run
- For
bot-runtime: Run and monitor bot processes. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with bot-management tools
- Tools:
Glob, Grep, Read, Bash, Pm2 (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
bot-management:5740ddb5
Bot Management
Build and operate chat platform bots.
When to Use
- Customer support triage on chat channels
- Notifications and alerting into team chats
- Automation commands (slash commands)
- Community moderation
Commands
# Setup
pip install python-telegram-bot
npm install slack-bolt
npm install discord.js
# Verify a Telegram bot token
curl -s https://api.telegram.org/bot$TOKEN/getMe
# Check webhook registration
curl -s https://api.telegram.org/bot$TOKEN/getWebhookInfo
# Run and manage
python bot.py
node bot.js
pm2 start bot.js --name telegram-bot
pm2 logs telegram-bot
pm2 restart telegram-bot
Telegram Example
from telegram.ext import Application, CommandHandler
async def start(update, context):
await update.message.reply_text("Hello!")
app = Application.builder().token(TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.run_polling()
Best Practices
- Store tokens in env vars or secret managers, never in code
- Use webhooks over polling in production where possible
- Rate limit outgoing messages to avoid platform bans
- Log all incoming messages and errors with correlation IDs
- Pin a message rate and handle platform-specific limits
- Set up monitoring so a dead bot is detected quickly
Capabilities
bot-frameworks
Scaffold bots for major chat platforms.
Parameters:
platform (string): Telegram, Slack, Discord, WhatsApp
path (string): Project directory to scaffold into
Commands:
pip install python-telegram-bot
npm install slack-bolt
npm install discord.js
npm install grammY
python -m venv .venv
Examples:
- npm install @slack/bolt
- pip install aiogram
- npm install whatsapp-web.js
bot-runtime
Run and monitor bot processes.
Parameters:
token (string): Bot token env var
manager (string): Process manager: pm2, systemd, docker
Commands:
node bot.js
python bot.py
pm2 start bot.js --name telegram-bot
pm2 logs telegram-bot
curl -s https://api.telegram.org/bot$TOKEN/getMe
Examples:
References
1---2name: "bot-management"3description: "Builds and operates chat bots (Telegram, Slack, Discord, IRC) with webhooks, message routing, rate limiting, and observability. Use when working with bot frameworks, bot runtime or when the user mentions bot frameworks, bot runtime."4license: "MIT"5compatibility: "Requires cloudflare, recaptcha, hcaptcha, nginx, lua-resty-waf. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/bot-management8 author: Kdesk9 version: 2.0.010 category: security11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(node:*) Bash(npm:*) Bash(pip:*) Bash(pm2:*) Bash(python:*)"12---1314Builds and operates chat bots (Telegram, Slack, Discord, IRC) with webhooks, message routing, rate limiting, and observability.1516## Agentic Workflow: Read -> Reason -> Act (bot-management)1718You are **bot-management** (security) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — security context for `bot-management`21- Domain: Builds and operates chat bots (Telegram, Slack, Discord, IRC) with webhooks, message routing, rate limiting, and observability.22- **bot-frameworks**: Scaffold bots for major chat platforms. — `pip install python-telegram-bot`23- **bot-runtime**: Run and monitor bot processes. — `node bot.js`24- Check `knowledge` and `prerequisites: cloudflare, recaptcha, hcaptcha, nginx`2526### 2. Reason — think for `bot-management`27- For `bot-frameworks`: Scaffold bots for major chat platforms. — decide which checks to run28- For `bot-runtime`: Run and monitor bot processes. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `bot-management` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Pm2` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `bot-management:5740ddb5`3536# Bot Management3738Build and operate chat platform bots.3940## When to Use4142- Customer support triage on chat channels43- Notifications and alerting into team chats44- Automation commands (slash commands)45- Community moderation4647## Commands4849```bash50# Setup51pip install python-telegram-bot52npm install slack-bolt53npm install discord.js5455# Verify a Telegram bot token56curl -s https://api.telegram.org/bot$TOKEN/getMe5758# Check webhook registration59curl -s https://api.telegram.org/bot$TOKEN/getWebhookInfo6061# Run and manage62python bot.py63node bot.js64pm2 start bot.js --name telegram-bot65pm2 logs telegram-bot66pm2 restart telegram-bot67```6869## Telegram Example7071```python72from telegram.ext import Application, CommandHandler7374async def start(update, context):75 await update.message.reply_text("Hello!")7677app = Application.builder().token(TOKEN).build()78app.add_handler(CommandHandler("start", start))79app.run_polling()80```8182## Best Practices8384- Store tokens in env vars or secret managers, never in code85- Use webhooks over polling in production where possible86- Rate limit outgoing messages to avoid platform bans87- Log all incoming messages and errors with correlation IDs88- Pin a message rate and handle platform-specific limits89- Set up monitoring so a dead bot is detected quickly9091## Capabilities9293### bot-frameworks94Scaffold bots for major chat platforms.9596**Parameters:**97- `platform` (string): Telegram, Slack, Discord, WhatsApp98- `path` (string): Project directory to scaffold into99100**Commands:**101- `pip install python-telegram-bot`102- `npm install slack-bolt`103- `npm install discord.js`104- `npm install grammY`105- `python -m venv .venv`106107**Examples:**108- npm install @slack/bolt109- pip install aiogram110- npm install whatsapp-web.js111112### bot-runtime113Run and monitor bot processes.114115**Parameters:**116- `token` (string): Bot token env var117- `manager` (string): Process manager: pm2, systemd, docker118119**Commands:**120- `node bot.js`121- `python bot.py`122- `pm2 start bot.js --name telegram-bot`123- `pm2 logs telegram-bot`124- `curl -s https://api.telegram.org/bot$TOKEN/getMe`125126**Examples:**127- pm2 restart telegram-bot128- curl -s https://api.telegram.org/bot$TOKEN/getWebhookInfo129- pm2 save130131## References132- [Telegram Bot API](https://core.telegram.org/bots/api)133- [Slack Bolt Docs](https://api.slack.com/tools/bolt)134- [Discord.js Guide](https://discordjs.guide/)