360 Secure SkillHub
360 安全技能中心

SocialKit X Post

该 Skill 通过 X 官方 API v2 发布文本帖、图片或视频帖以及投票,要求用户先完成浏览器登录授权,再创建 post 文件夹、校验内容、展示按次计费成本并请用户批准,最后发布并反馈结果;同时提供针对 X_402、X_403、AUTH_EXPIRED 等错误的处理说明。

分类:营销
ahmadhussain0335
ahmadhussain0335
热度 36.62
最近更新 2026-11-06 15:10:56

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ahmadhussain0335/socialkit-x-post
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
socialkit-x-post
description
Publishes a post, image or video post, or poll on X (Twitter) through the official X API v2 after showing the pay-per-use cost and getting the user's approval. Use when the user wants to post or tweet on X.
license
MIT
metadata
{"author":"Ahmad Hussain","platform":"x","requires":"socialkit-social-core"}

X post

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

Rules

  • X charges per post: about $0.015, or $0.20 when the post contains a link. The cost is shown at approval.
  • No identical cross-posting and no unsolicited @mentions (X developer guidelines).
  • Media must be local files: up to 4 images or 1 video.

Steps

  1. Sign in once (browser, local redirect): node scripts/auth.mjs --platform x
  2. Create the post folder with the socialkit-social-core post script: node <socialkit-social-core>/scripts/post.mjs --init --dir x-<slug> --platform x --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 x-<slug>
  5. Stop. Show the post. Ask the user to approve in their own terminal: node <socialkit-social-core>/scripts/post.mjs --approve --dir x-<slug>
  6. Publish: node scripts/publish.mjs --publish --dir x-<slug> and report the result.

Failure handling

  • X_402 or usage-capped: X API credits are used up; add credits in the X Developer Console.
  • X_403: write access, credits or duplicate content; show the detail to the user.
  • AUTH_EXPIRED: sign in again with the auth script.
  • APPROVAL_REQUIRED: the post changed after approval; ask again.
  • ALREADY_PUBLISHED: this folder was posted; use --allow-repost only if the user asks.