Telegram Search
A skill and CLI for exporting and fuzzy-searching Telegram chat history: local database, vector search, read-only
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Works with private conversations through an authorized Telegram session
- Bulk history export needs account access via Telegram Takeout
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/telegram-searchDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a claude-code -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .claude/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .claude/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a cursor -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a github-copilot -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .github/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .github/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a codex -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a gemini-cli -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .devin/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .devin/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Formerly Windsurf.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a cline -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .cline/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .cline/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a roo -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .roo/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .roo/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
A fork of Roo Code, same .roo folders.
Run in a terminal in the project folder
npx skills add groupultra/telegram-search --skill telegram-search-cli -a opencode -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit 5d73488
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/groupultra/telegram-search.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /.agents/skills/telegram-search-cli/
git -C "$tmp" checkout 5d734888401f0a63a86e3dd29f942a5275da0207
mkdir -p .agents/skills
cp -R "$tmp/.agents/skills/telegram-search-cli" .agents/skills/telegram-search-cliCommands for macOS and Linux, on Windows run them in Git Bash.
Build the CLI: git clone https://github.com/groupultra/telegram-search.git && cd telegram-search && pnpm install && cp .env.example .env, then pnpm -F @tg-search/cli build. The skill lives in .agents/skills/telegram-search-cli; commands start with pnpm cli --profile=<profile> ...
Other ways from the author
git clone https://github.com/groupultra/telegram-search.git
cd telegram-search
pnpm install
cp .env.example .env
pnpm run devBrowser-only mode for local development.
This is third-party code. Review the repository files before installing.
What it does
Telegram Search gives an agent the tg-search CLI to work with Telegram chat history through an authorized local profile. It can list chats and read a bounded message range without persistence, and after explicit user consent it syncs history via Telegram Takeout into a local database with full-text and vector search, including semantic image search. From there the agent queries, searches and pulls message context locally, with no calls to Telegram, and can export history to deterministic JSONL. The skill explicitly forbids sending or modifying messages and requesting secrets like login codes or 2FA passwords.
Who it is for. For anyone who needs to quickly find old messages in large Telegram chats, including cross-language and meaning-based search, not just exact keyword matches.
Good fit when
- You need to find a message by meaning rather than exact wording in a large chat
- You need a summary of unread messages or an answer based on chat history
- You need an exported archive of the conversation in a structured format
Not a fit when
- You need to send or modify messages: the skill is read-only
- You are not ready to explicitly confirm the chats, range and data scope for Telegram Takeout
Example request
Find every message about postponing the release in our team chat over the last month and show the contextLimitations
Bulk history sync goes through the official Telegram Takeout mechanism and requires authorizing the data export request on one of your Telegram devices, so it is not instant. It needs a locally running service (PGlite or PostgreSQL, optionally MinIO for media).
How to disable. Stop the service (docker compose down), remove the CLI profile, and delete the telegram-search-cli skill from your agent's skills directory.
Security check
- Works with private conversations through an authorized Telegram session
- Bulk history export needs account access via Telegram Takeout
README in short
The main README, in Chinese, presents the product as a way to back up and find Telegram messages with local tokenization and vector search, including image search and smart unread summaries. There is a hosted demo, a server Docker image, and dev modes for browser-only or server with PGlite/PostgreSQL and MinIO. A separate English SKILL.md for agents sets hard contracts: bounded remote reads with no persistence, sync only after user consent, and a ban on sending messages or requesting secrets. AGPL-3.0 licensed.
SKILL.md
--- name: telegram-search-cli description: Operate the Telegram Search CLI through an authorized local profile. Use when an agent needs to discover Telegram chats, read bounded remote messages, explicitly synchronize history with user-approved Telegram Takeout, query/search/contextualize persisted messages, compute statistics, export deterministic JSONL, or run a real CLI end-to-end canary. Never send or modify Telegram messages. --- # Telegram Search CLI Use the CLI as a local-first data tool. Let the agent compose atomic commands; do not require the web UI or a daemon. ## Contracts - Treat stdout as exactly one JSON envelope. Read diagnostics, prompts, migration output, and progress from stderr. - Use `chats list` and `messages list` for bounded remote reads without persistence. - Use local `messages query`, `search`, `context`, `stats`, and `export` without connecting to Telegram. - Use `sync --takeout` for message persistence and bulk history. Add `--takeout` only after the user explicitly approves the selected chats, time range, and data scope. - Never send messages or modify Telegram data.
FAQ
Could the agent accidentally send a message?
No, the skill explicitly forbids sending or modifying Telegram messages; it is a read-only tool.
Does every sync need confirmation?
Yes, bulk sync via Takeout only runs after explicit user approval of specific chats and a range, and needs confirmation on a Telegram device.
Related
A self-hosted knowledge base with block-level references and a built-in MCP server for connecting AI agents to your notes
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI