Skills x-twitter-by-altf1be
Post tweets, threads, and media to X/Twitter via API v2 — secure OAuth 1.0a signing, minimal dependencies (commander + dotenv only).
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/abdelkrim/x-twitter-by-altf1be" ~/.claude/skills/clawdbot-skills-x-twitter-by-altf1be && rm -rf "$T"
manifest:
skills/abdelkrim/x-twitter-by-altf1be/SKILL.mdsource content
X/Twitter by @altf1be
Post tweets, threads, and media to X/Twitter via the X API v2 with secure OAuth 1.0a signing.
Setup
- Get API keys from https://developer.x.com
- Set environment variables (or create
in.env
):{baseDir}
X_CONSUMER_KEY=your-api-key X_CONSUMER_SECRET=your-api-secret X_ACCESS_TOKEN=your-access-token X_ACCESS_TOKEN_SECRET=your-access-token-secret
- Install dependencies:
cd {baseDir} && npm install
Commands
# Verify connection node {baseDir}/scripts/xpost.mjs verify # Post a tweet node {baseDir}/scripts/xpost.mjs tweet "Hello from OpenClaw! 🦞" # Post with image node {baseDir}/scripts/xpost.mjs tweet "Check this out!" --media ./screenshot.png # Reply to a tweet node {baseDir}/scripts/xpost.mjs tweet "Great point!" --reply 1234567890 # Post a thread (inline) node {baseDir}/scripts/xpost.mjs thread "First tweet" "Second tweet" "Third tweet" # Post a thread (from file, tweets separated by ---) node {baseDir}/scripts/xpost.mjs thread --file ./thread.md
Thread file format
Create a file with tweets separated by
---:
🚀 Announcing something cool! --- Here's why it matters... --- Check it out: https://example.com #OpenSource #AI
Security
- OAuth 1.0a user context signing (no app-only auth for write operations)
- No credentials printed to stdout
- API calls use pure Node.js
+ built-infetch
(no third-party HTTP or OAuth libraries)node:crypto - Minimal dependencies: only
(CLI framework) andcommander
(env loading)dotenv
Author
Abdelkrim BOUJRAF — ALT-F1 SRL, Brussels 🇧🇪 X: @altf1be