원클릭으로
telegram
Telegram — send messages, read inbox, manage bot interactions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Telegram — send messages, read inbox, manage bot interactions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| 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
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