TopRank Skills

Home / Claw Skills / Bot / tg
Official OpenClaw rules 38%

tg

Telegram CLI for reading, searching, and sending messages. Use when the user asks about Telegram messages, wants to check inbox, search chats, send messages, or look up contacts and groups.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 tg 技能。 若已安装,则直接安装 tg 技能。

Overview

Skill Key
arein/tg
Author
arein
Source Repo
openclaw/skills
Version
-
Source Path
skills/arein/tg
Latest Commit SHA
79ab4ea10e2e96b9382e41923cd34bb6de8b4217

Extracted Content

SKILL.md excerpt

# Telegram CLI

Fast Telegram CLI for reading, searching, and sending messages.

## When to Use

Use this skill when the user:
- Asks to check Telegram messages or inbox
- Wants to search Telegram for a topic/keyword
- Wants to send a Telegram message to someone
- Asks about a Telegram group, contact, or chat
- Wants to see unread messages
- Needs to look up group members or admins

## Install

```bash
npm install -g @cyberdrk/tg
```

Or from source:
```bash
cd ~/Code/cyberdrk305/telegram && npm install && npm run build && npm link
```

## Authentication

First-time setup requires API credentials from https://my.telegram.org/apps

```bash
tg auth
```

## Commands

### Reading
```bash
tg inbox                               # Unread messages summary
tg chats                               # List all chats
tg read "ChatName" -n 50               # Read last 50 messages
tg read "ChatName" --since "1h"        # Messages from last hour
tg read @username -n 20                # Read DM with user
tg search "query" --chat "ChatName"    # Search within chat
tg search "query" --all                # Search all chats
```

### Writing
```bash
tg send @username "message"            # Send DM
tg send "GroupName" "message"          # Send to group
tg reply "ChatName" 12345 "response"   # Reply to message ID
```

### Contacts & Groups
```bash
tg contact @username                   # Get contact info
tg members "GroupName"                 # List group members
tg admins "GroupName"                  # List admins only
tg groups --admin                      # Groups where you're admin
```

### Status
```bash
tg whoami                              # Show logged-in account
tg check                               # Verify session
```

## Output Formats

All commands support `--json` for structured output suitable for processing:

```bash
tg inbox --json                        # JSON format
tg read "Chat" --json                  # JSON with messages array
tg chats --json                        #...

README excerpt

# tg - Telegram CLI

Fast Telegram CLI for reading, searching, and sending messages. Designed for both interactive use and AI agent integration.

## Installation

```bash
npm install -g @cyberdrk/tg
```

Or install from source:

```bash
git clone https://github.com/cyberdrk305/telegram.git
cd telegram
npm install
npm run build
npm link
```

## Authentication

First, get your API credentials:
1. Go to https://my.telegram.org/apps
2. Log in with your phone number
3. Create a new application
4. Copy the `api_id` and `api_hash`

Then authenticate:

```bash
tg auth
```

## Commands

### Auth & Status

```bash
tg whoami                              # Show logged-in account
tg check                               # Verify session/credentials
```

### Reading

```bash
tg chats                               # List all chats
tg chats --type group                  # Filter by type (user, group, supergroup, channel)
tg read "MetaDAO Community" -n 50      # Read last 50 messages
tg read "MetaDAO" --since "1h"         # Messages from last hour
tg read @username -n 20                # Read DM with user
tg search "futarchy" --chat "MetaDAO"  # Search within chat
tg search "futarchy" --all             # Search all chats
tg inbox                               # Unread messages summary
```

### Writing

```bash
tg send @username "Hello"              # Send DM
tg send "GroupName" "Hello everyone"   # Send to group
tg reply "ChatName" 12345 "Response"   # Reply to message ID
```

### Contacts & Groups

```bash
tg contact @username                   # Get contact info
tg members "GroupName"                 # List group members
tg admins "GroupName"                  # List admins only
tg groups                              # List all groups
tg groups --admin                      # Groups where you're admin
```

### Utilities

```bash
tg sync --days 7                       # Sync last 7 days to markdown
tg sync --chat "MetaDAO" --days 30     # Sync specific chat
```

## Output Formats

All...

Related Claw Skills