telegram
БесплатноБез исполняемых скриптовНе проверенOperate the joelclaw Telegram channel — primary mobile interface between Joel and the gateway. Covers grammy Bot API, text/media/reactions, inline buttons…
от joelhooks★ 69 звёзд на GitHubОб этом скилле
Telegram Channel Skill
Operate the joelclaw Telegram channel — the primary mobile interface between Joel and the gateway agent. Built on grammy (Bot API wrapper), supports text, media, reactions, replies, inline buttons, callbacks, and streaming.
Architecture
Joel (Telegram app)
→ Bot API (long polling via grammy)
→ telegram.ts channel adapter
→ enrichPromptWithVaultContext()
→ command-queue → pi session
→ outbound router → telegram.ts send → Bot API → Joel
Key files:
packages/gateway/src/channels/telegram.ts— channel adapter (inbound + outbound)packages/gateway/src/telegram-stream.ts— streaming UX (progressive text updates)packages/gateway/src/outbound/router.ts— response routingpackages/gateway/src/channels/types.ts—Channelinterface
SDK: [email protected] — Bot instance at module scope, exposed via getBot().
Multi-instance poll ownership (2026-03-05): Telegram long polling now uses a Redis lease per bot token hash.
- Owner key:
joelclaw:gateway:telegram:poll-owner:<tokenHash> - Status key:
joelclaw:gateway:telegram:poll-status:<tokenHash> - Only owner polls
getUpdates; non-owners stay passive/send-only and retry lease acquisition with backoff.
Conflict guard still applies for non-cooperative pollers: telegram.channel.start_failed (with conflict metadata) + telegram.channel.retry_scheduled + telegram.channel.polling_recovered.
Delivery audit
Telegram has three distinct delivery lanes:
- Human conversation: Telegram update → command queue → Pi session → stream/router → Bot API.
- Canonical CLI notification:
joelclaw notify send→ gateway Redis event queue → immediate send or Pi session → Bot API. - Direct system notification: producer →
gateway/send.message→ Redisjoelclaw:outbound:messages→ gateway drain → Bot API.
Both lanes emit privacy-safe OTEL receipts under one flowId. Message bodies and previews are not stored. Receipts keep only SHA-256, character count, byte count, producer, origin system, route, queue timing, reply/message IDs, and terminal status.
Canonical actions:
telegram.inbound.acceptedchannel.delivery.queuedchannel.delivery.dequeuedtelegram.delivery.attemptedtelegram.delivery.confirmedtelegram.delivery.failed
Query the whole lane, then narrow to one flow:
joelclaw otel search "telegram.delivery" --hours 24
joelclaw otel search "channel.delivery" --hours 24
joelclaw otel search "<flowId>" --hours 24
If the default ClickHouse adapter is unavailable, use the working Typesense mirror explicitly:
joelclaw otel search "telegram.delivery" --hours 24 --adapter typesense-otel
joelclaw otel search "<flowId>" --hours 24 --adapter typesense-otel
telegram.delivery.confirmed means Telegram's Bot API accepted the send and returned message ID(s). It does not mean Joel read the message.
The queue still uses LRANGE then DEL before delivery. A queued flow with no dequeue/terminal receipt exposes that gap, but does not recover the lost item. Reliable claim/ack plus a dead-letter queue is separate follow-up work.
Capabilities
Sending Messages
// Via channel adapter
await telegramChannel.send("telegram:7718912466", "Hello", { format: "html" });
// Direct grammy API (from telegram-stream or daemon)
const bot = getBot();
await bot.api.sendMessage(chatId, text, { parse_mode: "HTML" });
- Max message length: 4096 chars (Telegram API limit)
- Chunking:
TelegramConverter.chunk()for HTML-aware splitting,chunkMessage()for raw text - Format: markdown→HTML via
TelegramConverter.convert(), with plain text fallback on validation failure - Buttons:
InlineButton[][]→inline_keyboardreply markup
Reactions (ADR-0162)
// grammy API
await bot.api.setMessageReaction(chatId, messageId, [
{ type: "emoji", emoji: "👍" }
]);
Telegram supports a fixed set of emoji reactions. Common ones: 👍 👎 ❤️ 🔥 🎉 🤔 👀 ✅ ❌ 🤯 💯
Agent convention: Include <<react:EMOJI>> at the start of a response. The outbound router strips it and calls setMessageReaction before sending text.
Replies
// grammy API — reply to a specific message
await bot.api.sendMessage(chatId, text, {
reply_parameters: { message_id: targetMessageId }
});
Already wired in the adapter via RichSendOptions.replyTo. The agent uses <<reply:MSG_ID>> directive.
Media
Supports photo, video, audio, voice, and document sending/receiving:
// Send
await telegramChannel.sendMedia(chatId, "/path/to/file.jpg", { caption: "Look at this" });
// Receive — handled by bot.on("message:photo") etc.
// Downloads via Bot API getFile → local /tmp/joelclaw-media/
// Emits media/received Inngest event for pipeline processing
File size limit: 20MB download via Bot API (larger files need direct Telegram API).
Streaming (
Установить telegram в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл telegram?
Operate the joelclaw Telegram channel — primary mobile interface between Joel and the gateway. Covers grammy Bot API, text/media/reactions, inline buttons, callbacks, and streaming.
Как установить скилл telegram?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл telegram запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic