telegram-builder-0ebdcc — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited telegram-builder-0ebdcc (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Activate when the user wants to add new commands, integrations, or services to their Telegram bot.
This skill guides you through building new Telegram bot integrations following the project's established patterns.
Telegram/
├── telegram_listener.py # Main daemon - handles incoming messages
├── telegram_helpers.py # Helper functions - add new services here
├── templates/
│ └── helper_template.py # Full integration pattern reference
├── .env # API credentials
├── .claude/
│ └── user_profile.json # User preferences
└── logs/
└── telegram_listener.logEdit telegram_helpers.py to add your service:
def get_my_service(query=None):
"""
Description of what this helper does.
Args:
query: Optional search parameter
Returns:
str: Formatted Markdown response
"""
# 1. Load user profile if needed
profile = _load_profile()
# 2. Make API call or process data
try:
r = requests.get("https://api.example.com/data",
params={"q": query},
timeout=10)
data = r.json()
except Exception as e:
return f"**Error**\n{e}"
# 3. Format response as Markdown
lines = ["**My Service Results**", ""]
for item in data.get("items", [])[:5]:
lines.append(f"• {item.get('name')}: {item.get('value')}")
return "\n".join(lines)Add to telegram_listener.py imports (around line 37):
from telegram_helpers import (
# ... existing imports ...
get_my_service, # Add your new helper
)Find the handle_message() function in telegram_listener.py and add:
elif text.startswith("/myservice"):
parts = text.split(maxsplit=1)
query = parts[1] if len(parts) > 1 else None
result = get_my_service(query)
await event.reply(result)Add to .env:
MY_SERVICE_API_KEY=your_key_hereReference in telegram_helpers.py:
MY_SERVICE_API_KEY = os.getenv("MY_SERVICE_API_KEY", "")# Restart the daemon
python telegram_listener.py --stop
python telegram_listener.py --daemon
# Check logs
tail -f logs/telegram_listener.logUse Markdown for rich formatting:
# Headers
"**Bold Header**"
# Lists
"• Item 1\n• Item 2"
# Status indicators
"✅ Success"
"❌ Error"
"⏳ Loading..."
"🔄 Processing..."
# Code blocks
"```\ncode here\n```"
# Links
"[Link Text](https://example.com)"def get_api_data(endpoint, params=None):
"""Generic API client pattern."""
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
try:
r = requests.get(
f"{API_BASE}/{endpoint}",
headers=headers,
params=params,
timeout=10
)
r.raise_for_status()
return r.json()
except requests.exceptions.HTTPError as e:
return None, f"API error: {e.response.status_code}"
except Exception as e:
return None, f"Error: {e}"def get_personalized_data():
"""Use user profile for personalization."""
profile = _load_profile()
# Get user preferences
location = profile.get("location", {})
preferences = profile.get("preferences", {})
# Use in API calls
lat = location.get("latitude", 0)
lon = location.get("longitude", 0)
# Return personalized response
return f"**Personalized for {location.get('name', 'You')}**\n..."Add to telegram_listener.py in the scheduled alerts section:
async def send_my_alert():
"""Send scheduled alert for your service."""
result = get_my_service()
await client.send_message(USER_ID, result)
# Add to scheduler (find the scheduling section)
schedule.every().day.at("09:00").do(send_my_alert)For a complete integration example, see:
templates/helper_template.py - Full integration pattern| Issue | Solution |
|---|---|
| Command not recognized | Check import in telegram_listener.py |
| No response | Check logs: tail -f logs/telegram_listener.log |
| API error | Verify credentials in .env |
| Import error | Ensure helper is exported from telegram_helpers.py |
# In telegram_helpers.py
WEATHER_API_KEY = os.getenv("WEATHER_API_KEY", "")
def get_weather(location=None):
"""Get weather for a location."""
profile = _load_profile()
# Use profile location if not specified
if not location:
loc = profile.get("location", {})
location = loc.get("name", "New York")
try:
r = requests.get(
"https://api.weatherapi.com/v1/current.json",
params={"key": WEATHER_API_KEY, "q": location},
timeout=10
)
data = r.json()
temp = data["current"]["temp_f"]
cond = data["current"]["condition"]["text"]
return f"**Weather — {location}**\n{temp}°F\n{cond}"
except Exception as e:
return f"**Weather Error**\n{e}"
# In telegram_listener.py - add import
from telegram_helpers import get_weather
# In handle_message() - add handler
elif text.startswith("/weather"):
parts = text.split(maxsplit=1)
location = parts[1] if len(parts) > 1 else None
result = get_weather(location)
await event.reply(result)~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.