with one click
telegram
Telegram — send messages, read inbox, manage bot interactions
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Telegram — send messages, read inbox, manage bot interactions
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
GitHub — repos, issues, PRs, gists, Pages, branches via API
Gmail orchestrator — triage inbox, search, draft replies in-thread
Session closing (log, commit, push)
Mid-session checkpoint (log, database, commit, push) without closing
Brain package manager — install, update, list skills from registries
AI email auto-responder — monitors inbox, drafts context-aware replies, never sends without approval
| name | telegram |
| description | Telegram — send messages, read inbox, manage bot interactions |
| user-invocable | true |
| argument-hint | [manda: testo | inbox | leggi | status] |
| requires | {"env":["TELEGRAM_BOT_TOKEN","TELEGRAM_CHAT_ID"],"packages":["requests","python-dotenv"]} |
Invia e riceve messaggi tramite Telegram Bot API. Supporta testo, foto, file e lettura messaggi in arrivo.
@BotFather/newbot → scegli nome e usernameAvvia una conversazione con il bot, poi chiama l'endpoint getUpdates delle Telegram API.
Il campo chat.id del tuo messaggio è il TELEGRAM_CHAT_ID.
.envTELEGRAM_BOT_TOKEN=1234567890:ABCdef...
TELEGRAM_CHAT_ID=123456789
TELEGRAM_OWNER_USER_ID=123456789 # opzionale — per auth check
TELEGRAM_OWNER_USERNAME=tuousername # opzionale — per auth check
Il wrapper usa un'architettura webhook → SQLite:
get_messages() legge dal DB locale (no polling, nessuna race condition)Per setup semplice senza webhook: usa requests.get sull'endpoint getUpdates di Telegram Bot API.
/telegram manda: testo Manda messaggio al TELEGRAM_CHAT_ID
/telegram manda foto: /path/img.jpg Invia foto
/telegram inbox Leggi messaggi non letti
/telegram leggi Leggi ultimi messaggi
/telegram status Verifica bot attivo + chat_id
import sys
sys.path.insert(0, '.claude/skills/telegram')
from telegram import (
send_message, # (chat_id, text, parse_mode='HTML') → dict
send_photo, # (chat_id, photo_path, caption=None) → dict
send_document, # (chat_id, file_path, caption=None) → dict
get_messages, # (unread_only=True, env_file=None) → List[dict]
get_chat_id, # () → dict con chat_id o None
is_authorized, # (user_id, username) → bool
sanitize_html, # (text) → str — escape HTML per parse_mode HTML
)
import sys, os
sys.path.insert(0, '.claude/skills/telegram')
from telegram import send_message
chat_id = os.getenv('TELEGRAM_CHAT_ID')
# Testo semplice
send_message(chat_id=chat_id, text="Ciao dal brain! 🦉")
# HTML formattato
send_message(
chat_id=chat_id,
text="<b>Deploy completato</b>\n<code>v2.3.1</code> su produzione",
parse_mode='HTML'
)
<b>grassetto</b> <i>corsivo</i> <code>codice inline</code>
<pre>blocco codice</pre> <a href="url">link</a>
Usa sanitize_html(text) per fare escape del testo dinamico prima di inserirlo in tag HTML.
args = "$ARGUMENTS".strip().lower()
if any(w in args for w in ["manda", "invia", "send"]):
action = "send"
elif any(w in args for w in ["foto", "photo", "immagine"]):
action = "send_photo"
elif any(w in args for w in ["inbox", "leggi", "read", "unread"]):
action = "read"
elif any(w in args for w in ["status", "check", "stato"]):
action = "status"
else:
action = "send" # default: testo come messaggio