telegram-contacts

$npx mdskill add aAAaqwq/AGI-Super-Team/telegram-contacts

Export, import, and lookup Telegram contacts instantly.

  • Retrieves names, usernames, and phone numbers for any contact.
  • Fetches last messages and message counts alongside contact data.
  • Accepts CSV or JSON input formats for bulk contact management.
  • Outputs structured CSV or JSON files with optional message history.

SKILL.md

.github/skills/telegram-contactsView on GitHub ↗
---
name: telegram-contacts
description: Export/import/lookup Telegram contacts
---
# Telegram Contacts

> Export, import, and lookup Telegram contacts

## When to use

- "export contacts from telegram"
- "find a contact in telegram"
- "import contacts to telegram"
- "who is this @username"
- "find by phone number"

## Tool

`$TG_TOOLS_PATH/tools/tg_contacts.py`

## How to run

### Export contacts

```bash
# CSV to stdout
python3 $TG_TOOLS_PATH/tools/tg_contacts.py export

# CSV to file
python3 $TG_TOOLS_PATH/tools/tg_contacts.py export --output contacts.csv

# JSON with last messages
python3 $TG_TOOLS_PATH/tools/tg_contacts.py export --output contacts.json --messages 50
```

CSV columns: user_id, username, first_name, last_name, phone.
JSON additionally: messages, last_message_date, messages_count.

### Lookup contact

```bash
# By username
python3 $TG_TOOLS_PATH/tools/tg_contacts.py lookup @username

# By phone number
python3 $TG_TOOLS_PATH/tools/tg_contacts.py lookup +380671234567
```

Shows: name, username, phone, ID + last 5 messages.
If the contact is not in the list -- temporarily adds and automatically removes after checking.

### Import contacts

```bash
python3 $TG_TOOLS_PATH/tools/tg_contacts.py import --input contacts.csv
```

CSV format: `first_name,last_name,phone`

## Limitations

- JSON export with messages can be slow (0.3 sec per contact)
- Progress is saved every 100 contacts
- Not all phone numbers are registered on Telegram

## Related skills

- `telegram-send` -- sending messages
- `telegram-check` -- checking replies
- `update-lead` -- update CRM after lookup

More from aAAaqwq/AGI-Super-Team

SkillDescription
a-fund-monitor监控 A 股基金实时估值与盘后净值,自动判断交易日并生成提醒或分析。
add-leadAdd company/person/relationship to CRM
ads-agentAI-агент для управления Facebook рекламой. Вызывай для анализа, оптимизации, создания кампаний и отчётов.
afrexai-compliance-auditRun internal compliance audits against major governance and security
afrexai-personal-financeComplete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.
after-salesUse when managing post-purchase experience, building customer loyalty, or increasing repeat purchases
agent-contactsAI agent contacts — add, list, remove MCP contacts. Use when someone gives an agent URL, or when you need to view/remove contacts.
agent-model-switcher批量查看和切换子 agent 的模型配置,用于统一调整多 agent 的 provider/model 设置。
agent-patternsFormat SPAWN REQUEST messages to launch parallel agents, generate structured agent status reports, and define communication protocols within the sprint system. Use when the user needs to coordinate multiple agents, format spawn requests, produce agent reports, or establish inter-agent communication patterns.
agent-task-confirmUse when confirming whether a dispatched agent task was actually received, activated, and progressing after sessions_send or other task handoff actions.