x-post

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Post to X using the CLI tool at
~/.claude/skills/x-post/x-post.py
.
使用位于
~/.claude/skills/x-post/x-post.py
的CLI工具发布内容到X。

Setup

配置步骤

Requires Python packages:
pip install xdk requests_oauthlib
Credentials file at
~/.claude/skills/x-post/x.key
(JSON):
json
{
  "api_key": "...",
  "api_secret": "...",
  "access_token": "...",
  "access_token_secret": "..."
}
需要安装以下Python包:
pip install xdk requests_oauthlib
凭据文件位于
~/.claude/skills/x-post/x.key
(JSON格式):
json
{
  "api_key": "...",
  "api_secret": "...",
  "access_token": "...",
  "access_token_secret": "..."
}

Commands

命令说明

Post text:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text"
Post with image:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text" --media /path/to/image.jpg
Post with video:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text" --media /path/to/video.mp4
Check profile:
bash
python ~/.claude/skills/x-post/x-post.py me
发布文本:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text"
发布带图片的内容:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text" --media /path/to/image.jpg
发布带视频的内容:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text" --media /path/to/video.mp4
查看个人资料:
bash
python ~/.claude/skills/x-post/x-post.py me

Rules

规则说明

  • Always show the user the exact tweet text before posting and get confirmation
  • Never post without explicit user approval
  • Video uploads use chunked upload (INIT/APPEND/FINALIZE) and may take a minute for processing
  • The script auto-detects media type from file extension
  • 发布前必须向用户展示确切的推文文本并获得确认
  • 未经用户明确批准,不得发布任何内容
  • 视频上传采用分片上传(INIT/APPEND/FINALIZE),处理可能需要一分钟时间
  • 脚本会根据文件扩展名自动检测媒体类型