电报个人

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

设置

一次性:bash scripts/setup.sh(安装 Telethon,运行交互式身份验证)。需要 https://my.telegram.org → API 开发中的 api_id + api_hash。凭证存储在~/.config/telegram-personal/credentials.json(模式 600)。会话文件位于~/.config/telegram-personal/session.session。

聊天标识符

任意:@username、+phone、数字 ID(来自tg dialogs)或聊天标题。

安全

只读 — 无发送/删除命令 会话文件 = 完全帐户访问权限。永远不要公开它 Telethon 自动处理 FloodWait(在速率限制下休眠) 全局搜索迭代对话框(较慢);如果可能的话更喜欢--chat

与 OpenClaw 集成

从技能或心跳中,通过 exec 调用:

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@000alen · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# telegram-personal

Read-only access to a personal Telegram account via Telethon (MTProto API).

## Setup

One-time: `bash scripts/setup.sh` (installs Telethon, runs interactive auth).

Requires `api_id` + `api_hash` from https://my.telegram.org → API Development.

Credentials stored at `~/.config/telegram-personal/credentials.json` (mode 600).
Session file at `~/.config/telegram-personal/session.session`.

## CLI: `scripts/tg.py`

```bash
# List all conversations
tg dialogs [--limit N]

# Read messages from a chat (username, phone, or numeric ID)
tg read <chat> [--limit 20]

# Search across all chats (or one specific chat)
tg search "query" [--chat <name>] [--limit 20]

# Show unread DMs/groups with previews
tg unread [--limit 30]

# Download media from a message
tg download <chat> <msg_id> [-o dir]

# Export chat to markdown
tg export <chat> [--since 7d] [--limit 500] [-o file.md]

# Get info about a chat or yourself
tg info [chat]
```

## Chat identifiers

Any of: `@username`, `+phone`, numeric ID (from `tg dialogs`), or chat title.

## Safety

- **Read-only** — no send/delete commands
- Session file = full account access. Never expose it
- Telethon auto-handles FloodWait (sleeps on rate limits)
- Global search iterates dialogs (slower); prefer `--chat` when possible

## Integration with OpenClaw

From a skill or heartbeat, call via exec:
```bash
cd /path/to/telegram-personal && uv run tg search "keyword" --limit 10
cd /path/to/telegram-personal && uv run tg unread
```

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。