A Telegram bot that monitors Claude Code for permission prompts and lets you approve them remotely from your phone.
cd claude_approver
pip install pillow pytesseract pyautogui mss requests pyperclip numpyDownload and install from: https://github.com/UB-Mannheim/tesseract/wiki
Make sure to add it to your PATH.
Edit watcher.py and set your bot token and chat ID:
TELEGRAM_BOT_TOKEN = "your_bot_token_here"
TELEGRAM_CHAT_ID = "your_chat_id_here"To get these:
- Message @BotFather on Telegram to create a bot and get the token
- Message @userinfobot to get your chat ID
Run calibration for each region (a semi-transparent overlay appears - click and drag to select):
# Main prompt detection area (where Yes/No options appear)
python calibrate.py
# Input area (where you type prompts to Claude)
python calibrate.py input
# Context area (main output feed)
python calibrate.py context
# Summary area (where Claude shows what it did)
python calibrate.py summary
# Loader area (status text like "vibing...", "coding...")
python calibrate.py loaderNote: Edit MONITOR_INDEX in calibrate.py if Claude Code is on a different monitor (1 = primary, 2 = second, etc.)
python watcher.py| Command | Description |
|---|---|
/help |
Show all commands |
/library |
Browse prompt library (.md files) |
/context |
View current Claude Code screen |
/summary |
Get task summary |
/commit |
Tell Claude to commit changes |
/md <topic> |
Create new .md file based on topic |
/pause |
Toggle heartbeat notifications |
/folder |
Show current prompts folder |
/folder <path> |
Set prompts folder to new path |
Or just type any message to send it directly to Claude!
When a permission prompt is detected, you'll get buttons:
- YES (don't ask again) - Approve and remember
- Yes (once) - Approve just this time
- No - Reject
- Auto-approve ON (5 min) - Auto-approve all prompts for 5 minutes
- Context - See what Claude is doing
- Summary - Get task summary
- Prompt Library - Browse saved prompts
The bot automatically sends a summary when:
- The loader text (e.g., "vibing...", "coding...") disappears for 12 seconds
- No permission prompt is active
Put .md files in the prompts/ folder (or set custom folder with /folder).
Example prompts included:
add-types.md- Add TypeScript/Python type annotationsdebug-this.md- Find and fix bugsexplain-code.md- Explain code in plain English
Settings are stored in config.json:
{
"region": {"x": 100, "y": 200, "width": 800, "height": 400},
"input_region": {...},
"context_region": {...},
"summary_region": {...},
"loader_region": {...},
"prompts_dir": "L:\\path\\to\\prompts"
}- Re-run
python calibrate.pyto recalibrate the prompt region - Make sure Claude Code window is visible and not minimized
- Re-run
python calibrate.py loader - Select just the area where status text appears (e.g., "vibing...")
- Check console for
[LOADER] content=X% visible=True/False
- Edit
MONITOR_INDEXincalibrate.py(1 = primary, 2 = second monitor)
- Install Tesseract OCR and add to PATH
- Or set path manually:
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'