Telegram Senderのロゴ

Telegram Sender

コミュニティ
tao12345666333
telegram-sender

Send and edit Telegram messages, and send photos via Bot API. Use when AnkaLoop needs to send text, reply to a specific message, edit an existing message, send an image, or push proactive notifications (cron results, heartbeat alerts, task status). Requires ANKA_TELEGRAM_BOT_TOKEN env var.

Add to TypingMind

概要

公開者tao12345666333
リポジトリankaloop
スキル名telegram-sender
スター
56
フォーク
10
同梱ファイル
1
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    tao12345666333がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Telegram Sender」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/tao12345666333/ankaloop/tree/main/src/ankaloop/builtin_skills/telegram-sender
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tao12345666333/ankaloop.git /tmp/ankaloop
mkdir -p .claude/skills
cp -r /tmp/ankaloop/src/ankaloop/builtin_skills/telegram-sender .claude/skills/telegram-sender
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTelegram Senderを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTelegram Senderを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Telegram Senderは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Telegram Sender

Agent-facing guide for outbound Telegram communication.

Assumption: ANKA_TELEGRAM_BOT_TOKEN is already set in the environment.

Required Inputs

  • chat_id (required) — from inbound message metadata or config
  • message content (required for send/edit)
  • photo source (required for photo): local file path, HTTP(S) image URL, or Telegram file_id
  • photo caption (optional, max 1024 characters after Telegram entity parsing)
  • reply_to_message_id (optional, for threaded reply)
  • message_id (required for edit)

Execution Policy

  1. If handling a Telegram message and message_id is known, prefer reply mode (--reply-to).
  2. If source metadata says sender is a bot (sender_is_bot=true), do not use reply mode; use --source-is-bot --source-username <USERNAME> instead.
  3. For long-running tasks: send an acknowledgment first, then edit it with the final result.
  4. Use photo when the response depends on an image artifact or generated picture.
  5. Prefer local file paths for newly generated images. Use a Telegram file_id only when reusing a previously uploaded file.
  6. Keep content concise and action-oriented.
  7. Use literal newlines in message text and captions.

Active Response Policy

When this skill is in scope, prefer proactive and timely Telegram updates:

  • Send immediate acknowledgment for newly assigned tasks
  • Send progress updates for long-running operations using message edits
  • Send completion notifications when work finishes
  • Send failure notifications immediately with cause, impact, and next action

Recommended pattern:

  1. Send a short acknowledgment reply
  2. Continue processing
  3. Edit the acknowledgment with final result (or send a new update if edit fails)

Command Templates

Paths are relative to this skill directory.

bash
# Send message
python ./scripts/telegram_send.py send \
  --chat-id <CHAT_ID> \
  --message "<TEXT>"

# Reply to a specific message
python ./scripts/telegram_send.py send \
  --chat-id <CHAT_ID> \
  --message "<TEXT>" \
  --reply-to <MESSAGE_ID>

# Bot-source: no direct reply, use @username style
python ./scripts/telegram_send.py send \
  --chat-id <CHAT_ID> \
  --message "<TEXT>" \
  --source-is-bot \
  --source-username <USERNAME>

# Edit existing message
python ./scripts/telegram_send.py edit \
  --chat-id <CHAT_ID> \
  --message-id <MESSAGE_ID> \
  --text "<TEXT>"

# Send photo from local path, URL, or Telegram file_id
python ./scripts/telegram_send.py photo \
  --chat-id <CHAT_ID> \
  --photo "<PATH_OR_URL_OR_FILE_ID>" \
  --caption "<OPTIONAL_CAPTION>"

# Reply with a photo
python ./scripts/telegram_send.py photo \
  --chat-id <CHAT_ID> \
  --photo "<PATH_OR_URL_OR_FILE_ID>" \
  --caption "<OPTIONAL_CAPTION>" \
  --reply-to <MESSAGE_ID>

For actions not covered by this script, use curl to call Telegram Bot API directly: https://api.telegram.org/bot$ANKA_TELEGRAM_BOT_TOKEN/<method>

Script Reference

telegram_send.py send

  • --chat-id, -c: required
  • --message, -m: required
  • --reply-to, -r: optional message ID
  • --token, -t: optional (normally not needed)
  • --source-is-bot: optional flag
  • --source-username: required when --source-is-bot is set

telegram_send.py edit

  • --chat-id, -c: required
  • --message-id, -i: required
  • --text, -x: required
  • --token, -t: optional (normally not needed)

telegram_send.py photo

  • --chat-id, -c: required
  • --photo, -p: required; local file path, HTTP(S) URL, or Telegram file_id
  • --caption, -m: optional caption; Markdown supported and converted to MarkdownV2
  • --reply-to, -r: optional message ID
  • --token, -t: optional (normally not needed)
  • --source-is-bot: optional flag
  • --source-username: required when --source-is-bot is set

Photo behavior:

  • Local paths are uploaded with multipart/form-data.
  • HTTP(S) URLs are downloaded to a temporary file and then uploaded, which avoids CDN content-type issues that can make direct Telegram URL sends fail.
  • Telegram file_id values are sent directly to reuse an existing upload.
  • Captions follow Telegram's sendPhoto limit: 0-1024 characters after entity parsing.

Failure Handling

  • On HTTP errors, inspect API response text and adjust identifiers/permissions.
  • If edit fails (message not editable), fall back to a new send.
  • If reply target is invalid, resend without --reply-to.
  • If photo upload fails, verify the file exists, the URL is publicly fetchable from the current environment, or the file_id belongs to this bot.
  • For task-level failures, notify the user with what failed, what completed, and next steps.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Telegram Sender」では何ができますか?

Send and edit Telegram messages, and send photos via Bot API. Use when AnkaLoop needs to send text, reply to a specific message, edit an existing message, send an image, or push proactive notifications (cron results, heartbeat alerts, task status). Requires ANKA_TELEGRAM_BOT_TOKEN env var.

TypingMindでTelegram Senderを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Telegram Senderはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTelegram Senderをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/tao12345666333/ankaloop/tree/main/src/ankaloop/builtin_skills/telegram-senderを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Telegram Senderを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Telegram Senderで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTelegram Senderを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Telegram Sender」は無料ですか?

はい。tao12345666333がApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇