360 Secure SkillHub
360 安全技能中心

Cross-Post

通过 Python 脚本把文本内容发布到 Twitter/X、Reddit 和 LinkedIn:可指定单个或全部平台、将长文拆为 Twitter 线程、为 Reddit 设置标题与子版块、从文件读取内容,并在发帖前预览各平台格式。需自行配置三个平台的 API 凭据。

drspx
drspx
热度 35.21
最近更新 2026-05-11 17:45:41
分类:营销依赖:代码执行 / 第三方 API应用场景:社交媒体 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cross-post
Metadata
name
cross-post
description
Cross-post content to Twitter/X, Reddit, and LinkedIn from one prompt. Use when user wants to publish the same content to multiple social platforms, schedule social posts, or post to Twitter/X + Reddit + LinkedIn at once. Supports thread posting on Twitter, custom titles/subreddits on Reddit, and professional formatting for LinkedIn. Use when user says post this, publish to social, cross-post, share on twitter/reddit/linkedin, or post to all my platforms.

Cross-Post

Post content to Twitter/X, Reddit, and LinkedIn via official APIs.

Setup

First time use:

python3 scripts/cross_post.py init-config

Config stored at ~/.config/cross-post/config.json.

Usage

# Post to all platforms
python3 scripts/cross_post.py post "Your content here"

# Post to specific platform
python3 scripts/cross_post.py post "Content" -p twitter

# Post as Twitter thread
python3 scripts/cross_post.py post "Long content..." -p twitter --thread

# Post to Reddit with title
python3 scripts/cross_post.py post "Body text" -p reddit -t "Title" -s python

# Read from file
python3 scripts/cross_post.py post -f draft.txt

# Preview formatting
python3 scripts/cross_post.py preview "Content" -p twitter
python3 scripts/cross_post.py preview "Content" -p reddit
python3 scripts/cross_post.py preview "Content" -p linkedin

Platform Requirements

Twitter/X

  • Bearer Token (API v2)
  • User ID
  • Setup: developer.twitter.com

Reddit

  • Client ID, Client Secret, Username
  • Password via REDDIT_PASSWORD env var
  • Setup: reddit.com/prefs/apps

LinkedIn

  • Access Token
  • Person URN
  • Setup: developers.linkedin.com

Tips

  • Use --thread for long Twitter content (auto-splits at 280 chars)
  • Use --file to post from files
  • Use preview before posting to check formatting
  • Each platform has different length limits:
    • Twitter: 280 chars per tweet
    • Reddit: 100 char title, unlimited body
    • LinkedIn: 3000 chars

Security

Config file is chmod 600. Never commit config.json.