360 Secure SkillHub
360 安全技能中心

SocialKit Telegram Post

该 Skill 借助 Telegram 官方 Bot API,以用户自建机器人身份向频道或群组发布文本、图片、视频或相册。流程为初始化 post 目录、编写 post.json、校验、由用户在终端自行批准,再发布并报告结果;含常见错误码的处理指引。

分类:营销
ahmadhussain0335
ahmadhussain0335
热度 35.65
最近更新 2026-11-06 15:05:37

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ahmadhussain0335/socialkit-telegram-post
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
socialkit-telegram-post
description
Posts a message, photo, video or album to a Telegram channel or group through the official Bot API, as the user's own bot, after the user approves it. Use when the user wants to post to their Telegram channel.
license
MIT
metadata
{"author":"Ahmad Hussain","platform":"telegram","requires":"socialkit-social-core"}

Telegram post

Apply socialkit-social-core. Official API only. Setup: setup.

Rules

  • The bot must be an administrator of the channel with permission to post.
  • Captions are limited to 1,024 characters; text messages to 4,096.
  • Plain text by default; set options.parseMode to HTML only when formatting is needed.

Steps

  1. Check the credentials in setup are set (environment variables only).
  2. Create the post folder with the socialkit-social-core post script: node <socialkit-social-core>/scripts/post.mjs --init --dir tg-<slug> --platform telegram --kind <text|photo|video|album>
  3. Write post.json (text, media with alt text, options). See node scripts/publish.mjs --help.
  4. Validate: node scripts/publish.mjs --check --dir tg-<slug>
  5. Stop. Show the post. Ask the user to approve in their own terminal: node <socialkit-social-core>/scripts/post.mjs --approve --dir tg-<slug>
  6. Publish: node scripts/publish.mjs --publish --dir tg-<slug> and report the result.

Failure handling

  • TELEGRAM_403: add the bot as an admin of the channel.
  • TELEGRAM_400 chat not found: check TELEGRAM_CHAT_ID.
  • APPROVAL_REQUIRED: the post changed after approval; ask again.
  • ALREADY_PUBLISHED: this folder was posted; use --allow-repost only if the user asks.