360 Secure SkillHub
360 安全技能中心

SocialKit Mastodon Post

该 Skill 通过 Node 脚本校验并发布 Mastodon 帖子,支持文本、媒体替代文本和投票选项;流程包含创建帖子目录、校验、等待用户终端审批后调用实例 API 发布并返回结果。

分类:营销
ahmadhussain0335
ahmadhussain0335
热度 37.37
最近更新 2026-11-06 14:58:36

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ahmadhussain0335/socialkit-mastodon-post
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
socialkit-mastodon-post
description
Publishes or schedules a Mastodon post with optional media or a poll on the user's instance after the user approves it. Use when the user wants to toot or post on Mastodon or the fediverse.
license
MIT
metadata
{"author":"Ahmad Hussain","platform":"mastodon","requires":"socialkit-social-core"}

Mastodon post

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

Rules

  • The character limit comes from the user's instance; the publish step re-checks it.
  • Add alt text (descriptions) to every attachment.
  • options.visibility defaults to public.

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 masto-<slug> --platform mastodon --kind <text|media|poll>
  3. Write post.json (text, media with alt text, options). See node scripts/publish.mjs --help.
  4. Validate: node scripts/publish.mjs --check --dir masto-<slug>
  5. Stop. Show the post. Ask the user to approve in their own terminal: node <socialkit-social-core>/scripts/post.mjs --approve --dir masto-<slug>
  6. Publish: node scripts/publish.mjs --publish --dir masto-<slug> and report the result.

Failure handling

  • MASTODON_401/403: the token is invalid or lacks write:statuses or write:media.
  • APPROVAL_REQUIRED: the post changed after approval; ask again.
  • ALREADY_PUBLISHED: this folder was posted; use --allow-repost only if the user asks.