npx skills add https://github.com/andrejones92/canifi-life-os --skill telegram-webSKILL.md
Telegram Web Skill
Overview
Automates Telegram Web interactions including messaging, group management, channel operations, and file sharing through browser automation.
Quick Install
curl -sSL https://canifi.com/skills/telegram-web/install.sh | bash
Or manually:
cp -r skills/telegram-web ~/.canifi/skills/
Setup
Configure via canifi-env:
# First, ensure canifi-env is installed:
# curl -sSL https://canifi.com/install.sh | bash
canifi-env set TELEGRAM_PHONE "+1234567890"
Privacy & Authentication
Your credentials, your choice. Canifi LifeOS respects your privacy.
Option 1: Manual Browser Login (Recommended)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
Option 2: Environment Variables
If you're comfortable sharing credentials, you can store them locally:
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
Capabilities
- Send and receive text messages
- Create and manage groups
- Administer channels and broadcasts
- Share files, photos, and media
- Search messages and contacts
- Manage notification settings
- Handle stickers and GIFs
- Create and manage bots (via BotFather)
Usage Examples
Example 1: Send a Message
User: "Send a Telegram message to Mom saying I'll be home for dinner"
Claude: I'll send that message on Telegram.
- Navigate to web.telegram.org
- Search for Mom in contacts
- Open chat and type message
- Send: "I'll be home for dinner"
- Confirm message delivered
Example 2: Create a Group
User: "Create a Telegram group called 'Project Team' with Alex and Sarah"
Claude: I'll create that group.
- Navigate to Telegram Web
- Click New Group
- Add Alex and Sarah
- Name group "Project Team"
- Confirm group created
Example 3: Post to Channel
User: "Post an update to my Telegram channel about the new feature"
Claude: I'll post that update.
- Navigate to channel admin view
- Compose update message
- Add any relevant media
- Publish to channel
- Confirm post live
Example 4: Search Messages
User: "Find all messages with flight confirmation in Telegram"
Claude: I'll search your Telegram messages.
- Open global search
- Search "flight confirmation"
- Collect matching messages
- Present results with chat context
Authentication Flow
- Navigate to web.telegram.org via Playwright MCP
- Enter phone number from canifi-env
- Wait for SMS/Telegram code (notify user via iMessage)
- Enter verification code when provided
- Handle 2FA password if enabled
- Verify access to chats
- Maintain session via local storage
Error Handling
- Login Failed: Request new verification code, retry 3x
- Session Expired: Re-authenticate with phone number
- Rate Limited: Wait 30-60 seconds before retry
- Code Expired: Request new verification code
- 2FA Required: iMessage for password input
- Contact Not Found: Search by name variations and phone number
- Group Limit Reached: Notify user of Telegram limits
- File Too Large: Notify user of size restrictions
Self-Improvement Instructions
When encountering new Telegram features:
- Document new UI patterns and selectors
- Add support for new message types
- Log successful channel management patterns
- Update capabilities for new features
Notes
- Telegram Web requires phone verification each session
- Some features only available in Telegram Desktop
- File size limits apply (2GB for premium, 4GB for non-premium)
- Secret chats not available on web version
- Session may be terminated by mobile app logout
- Channels have different admin roles and permissions
Repository Stats
Stars1
Forks0