Telegram Chat Capture logo

Telegram Chat Capture

Community
sammielisha425-design
telegram-chat-capture

Capture, incrementally merge, summarize, and organize Telegram/飞机 chat records using the user's local Telethon setup. Use when the user asks to 抓飞机, 抓Telegram聊天记录, 抓归档聊天, 抓频道/群组/个人, 从上次抓取后拉取飞机消息, or add Telegram to the QQ/Discord/L站 chat-record workflow. Do not use for QQ, Discord, Linux.do, Browser/iab repair, or Telegram account setup unless the request explicitly involves Telegram capture.

Overview

Publishersammielisha425-design
Repositorychat-capture-codex-skills
Skill nametelegram-chat-capture
Stars
38
Forks
5
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by sammielisha425-design on GitHub. Read the source before you install it.

Installation

Install the Telegram Chat Capture AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/sammielisha425-design/chat-capture-codex-skills/tree/main/skills/telegram-chat-capture
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sammielisha425-design/chat-capture-codex-skills.git /tmp/chat-capture-codex-skills
mkdir -p .claude/skills
cp -r /tmp/chat-capture-codex-skills/skills/telegram-chat-capture .claude/skills/telegram-chat-capture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Telegram Chat Capture in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Telegram Chat Capture on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Telegram Chat Capture is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Telegram Chat Capture

Scope

Use this skill for:

  • Telegram/飞机 messages from the local Telethon session.
  • Groups, channels, private chats, and Telegram "已归档聊天".
  • Incremental capture and cumulative JSONL organization.

Do not use this skill for:

  • QQ -> use qq-chat-capture.
  • Discord -> use discord-chat-capture.
  • Linux.do -> use linuxdo-topic-capture.
  • Screenshot/OCR extraction.
  • Reading Telegram Desktop tdata.

Workspace

Default workspace:

text
<YOUR_CHAT_CAPTURE_WORKSPACE>

Core scripts:

text
work\telegram_sampler\telegram_login_probe.py
work\telegram_sampler\telegram_list_dialogs.py
work\telegram_sampler\telegram_fetch_recent.py
work\telegram_sampler\telegram_capture_incremental.py
work\telegram_sampler\run_login_from_config.ps1
work\telegram_sampler\run_list_dialogs_from_config.ps1
work\telegram_sampler\run_fetch_recent_from_config.ps1
work\telegram_sampler\run_capture_incremental_from_config.ps1

Important state:

text
work\samples\telegram\<LOCAL_TELEGRAM_CONFIG_FILE>
work\samples\telegram\<LOCAL_TELEGRAM_SESSION_DIR>\
work\samples\telegram\dialogs\telegram_dialogs_latest.jsonl
work\samples\telegram\messages\
work\samples\telegram\messages\runs\

<LOCAL_TELEGRAM_CONFIG_FILE> stores local login configuration through Windows CurrentUser DPAPI. Do not print or copy secret values.

Expected verified state

  • Telethon session should be created and verified with LOGIN_OK.
  • Background capture can run without opening a visible PowerShell window if the wrapper script is configured that way.
  • Telegram Desktop does not need to be open for capture if network/proxy works and the Telethon session remains valid.

Standard capture

When the user says "抓一下飞机" or asks for Telegram capture without extra constraints, run:

powershell
cd <YOUR_CHAT_CAPTURE_WORKSPACE>
powershell -ExecutionPolicy Bypass -NoProfile -File .\work\telegram_sampler\run_capture_incremental_from_config.ps1 -MaxDialogs 0 -LimitPerDialog 500 -IncludeUsers

Meaning:

  • -MaxDialogs 0: capture all currently accessible dialogs.
  • -LimitPerDialog 500: cap each group/channel/private chat at 500 fetched messages for that run.
  • -IncludeUsers: include private chats.
  • Existing per-dialog telegram_all_merged.jsonl files are used for dedup/incremental append.
  • Media is recorded as metadata summary only; media files are not downloaded by default.

Smaller tests

List dialogs:

powershell
cd <YOUR_CHAT_CAPTURE_WORKSPACE>
powershell -ExecutionPolicy Bypass -NoProfile -File .\work\telegram_sampler\run_list_dialogs_from_config.ps1

Fetch one dialog:

powershell
cd <YOUR_CHAT_CAPTURE_WORKSPACE>
powershell -ExecutionPolicy Bypass -NoProfile -File .\work\telegram_sampler\run_fetch_recent_from_config.ps1 -Entity "<TELEGRAM_DIALOG_NAME>" -Limit 100

Reporting

Report:

  • Total dialogs captured.
  • Total new messages.
  • Media summary count.
  • Run JSONL path.
  • Root per-dialog messages path.
  • Whether this was capped per dialog.
  • Whether media files were downloaded or only metadata was stored.

Use full absolute Windows paths in final replies.

Safety

  • Never output api_hash, Telegram login code, 2FA password, session content, or tokens.
  • If the user shares a screenshot with a 2FA password or code, tell them to rotate the password after setup.
  • Do not read Telegram Desktop tdata unless explicitly asked and risks are explained.
  • Do not repeatedly retry login after auth failures; avoid account risk.
  • If Telethon shows TimeoutError, check TUN/global proxy or configure a local proxy before retrying.

Storage expectations

JSONL text records are small compared with media. Storage grows mainly if media download is enabled later.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Telegram Chat Capture AI skill do?

Capture, incrementally merge, summarize, and organize Telegram/飞机 chat records using the user's local Telethon setup. Use when the user asks to 抓飞机, 抓Telegram聊天记录, 抓归档聊天, 抓频道/群组/个人, 从上次抓取后拉取飞机消息, or add Telegram to the QQ/Discord/L站 chat-record workflow. Do not use for QQ, Discord, Linux.do, Browser/iab repair, or Telegram account setup unless the request explicitly involves Telegram capture.

Why use Telegram Chat Capture on TypingMind?

Because you install it once and use it with any model. Telegram Chat Capture is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Telegram Chat Capture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/sammielisha425-design/chat-capture-codex-skills/tree/main/skills/telegram-chat-capture. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Telegram Chat Capture?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Telegram Chat Capture?

As many as you like. As long as a model supports skills, you can use Telegram Chat Capture with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Telegram Chat Capture AI skill free?

Yes. It is published on GitHub by sammielisha425-design under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇