telegram-doctor
npx machina-cli add skill lycfyi/community-agent-plugin/telegram-doctor --openclawTelegram Doctor
Diagnose configuration and connectivity issues with Telegram integration.
When to Use
- User says "Telegram not working" or "diagnose Telegram"
- User reports connection or authentication errors
- User says "check Telegram setup" or "troubleshoot Telegram"
- Before asking for help with Telegram issues
- When sync or other Telegram commands fail unexpectedly
How to Execute
python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_doctor.py
What It Checks
- Environment file -
.envexists in cwd - API ID -
TELEGRAM_API_IDis set and numeric - API hash -
TELEGRAM_API_HASHis set - Session string -
TELEGRAM_SESSIONis set and valid length - Authentication - Credentials can connect to Telegram API
- Config file -
config/agents.yamlexists and is valid YAML - Group configured - A default group is selected
- Data directory -
data/is writable
Output
Displays results with:
- ✓ for passed checks
- ✗ for failed checks
For each failure, provides a suggested fix that the user can run manually.
Important: This tool only diagnoses issues - it does not modify any files.
Example Output
telegram-doctor results:
✓ Environment file (.env found)
✓ API ID (12345678)
✓ API hash (abc123...xyz9)
✗ Session string (Session appears too short)
✗ Config file (config/agents.yaml not found)
✗ Group configured (No default group set)
✓ Data directory (./data)
Some checks failed. Suggested fixes:
• Session string:
Generate a fresh session: python scripts/generate_session.py
• Config file:
Run telegram-init to create the config file
• Group configured:
Run telegram-init to select a group
(Run these steps manually - doctor does not modify files)
Next Steps
After fixing issues:
- Run
telegram-initto reconfigure if needed - Run
telegram-syncto test connectivity
Source
git clone https://github.com/lycfyi/community-agent-plugin/blob/main/plugins/telegram-connector/skills/telegram-doctor/SKILL.mdView on GitHub Overview
Telegram Doctor is a diagnostic tool for the Telegram integration. It identifies configuration and connectivity problems that disrupt sync or cause connection errors, guiding you to manual fixes.
How This Skill Works
The tool runs a Python script to perform a sequence of checks: environment file presence, API ID and API hash values, a valid session string, authentication to Telegram, a valid config YAML, a selected default group, and writable data directory. It prints a pass/fail report using checkmarks and offers suggested fixes for each failure; it does not modify any files.
When to Use It
- User says 'Telegram not working' or 'diagnose Telegram'
- User reports connection or authentication errors
- User says 'check Telegram setup' or 'troubleshoot Telegram'
- Before asking for help with Telegram issues
- When sync or other Telegram commands fail unexpectedly
Quick Start
- Step 1: Run python ${CLAUDE_PLUGIN_ROOT}/tools/telegram_doctor.py
- Step 2: Review the results and note any failed checks with suggested fixes
- Step 3: Apply fixes (e.g., regenerate session, fix config, select a default group) and re-run connectivity tests
Best Practices
- Run telegram-doctor as the first step when Telegram issues are reported
- Verify essential credentials: TELEGRAM_API_ID, TELEGRAM_API_HASH, and TELEGRAM_SESSION
- Ensure config/agents.yaml exists and is valid YAML
- Confirm a default group is configured and data directory is writable
- Review the suggested fixes and re-test with telegram-sync after fixes
Example Use Cases
- telegram-doctor results: ✓ Environment file (.env found) · ✓ API ID (12345678) · ✓ API hash (abc123...xyz9) · ✗ Session string (Session appears too short) · ✗ Config file (config/agents.yaml not found) · ✗ Group configured (No default group set) · ✓ Data directory (./data)
- Some checks failed. Suggested fixes: • Session string: Generate a fresh session: python scripts/generate_session.py
- • Config file: Run telegram-init to create the config file
- • Group configured: Run telegram-init to select a group
- (Run these steps manually - doctor does not modify files)