OpenClaw skill for X/Twitter — post tweets, threads, and media via X API v2.
By Abdelkrim BOUJRAF / ALT-F1 SRL, Brussels 🇧🇪 🇲🇦
- Post tweets — text with optional image attachment
- Post threads — multi-tweet threads from inline args or file
- Reply to tweets — respond to specific tweets
- Verify connection — check API credentials and account info
# 1. Clone
git clone https://github.com/ALT-F1-OpenClaw/openclaw-skill-x-twitter.git
cd openclaw-skill-x-twitter
# 2. Install
npm install
# 3. Configure
cp .env.example .env
# Edit .env with your X API credentials
# 4. Use
node scripts/xpost.mjs verify
node scripts/xpost.mjs tweet "Hello world!"- Node.js 18+
- X/Twitter developer account with Free tier (or higher)
- API keys (Bearer Token, Consumer Key/Secret, Access Token/Secret)
# Post a tweet
node scripts/xpost.mjs tweet "Hello world!"
# Post with image
node scripts/xpost.mjs tweet "Check this out" --media ./image.png
# Reply to a tweet
node scripts/xpost.mjs tweet "Great post!" --reply 1234567890
# Post a thread (inline)
node scripts/xpost.mjs thread "Tweet 1" "Tweet 2" "Tweet 3"
# Post a thread (from file, separated by ---)
node scripts/xpost.mjs thread --file ./my-thread.md
# Verify connection
node scripts/xpost.mjs verifySee SKILL.md for full command reference.
Once installed as a skill, use natural language:
"Tweet: Just shipped a new feature! 🚀"
"Post this thread about our SharePoint integration"
"Reply to that tweet saying thanks"
- API keys stored in
.envfile (never committed) - No secrets or tokens printed to stdout
- OAuth 1.0a user context for tweet operations
Published as: x-twitter-by-altf1be
clawhub install x-twitter-by-altf1beMIT — see LICENSE
Abdelkrim BOUJRAF — ALT-F1 SRL, Brussels 🇧🇪 🇲🇦
- GitHub: @abdelkrim
- X: @altf1be
Contributions welcome! Please open an issue or PR.