x-post
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePost to X using the CLI tool at .
~/.claude/skills/x-post/x-post.py使用位于的CLI工具发布内容到X。
~/.claude/skills/x-post/x-post.pySetup
配置步骤
Requires Python packages:
pip install xdk requests_oauthlibCredentials file at (JSON):
~/.claude/skills/x-post/x.keyjson
{
"api_key": "...",
"api_secret": "...",
"access_token": "...",
"access_token_secret": "..."
}需要安装以下Python包:
pip install xdk requests_oauthlib凭据文件位于(JSON格式):
~/.claude/skills/x-post/x.keyjson
{
"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.jpgPost with video:
bash
python ~/.claude/skills/x-post/x-post.py post "Your tweet text" --media /path/to/video.mp4Check 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 meRules
规则说明
- 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),处理可能需要一分钟时间
- 脚本会根据文件扩展名自动检测媒体类型