Install
openclaw skills install twitter-autopilotAutomate Twitter/X posting, engagement, and growth for OpenClaw AI agents. Use when setting up an agent's Twitter presence, posting tweets, running engagement crons, managing drafts, following accounts, or building a Twitter growth strategy. Handles OAuth setup, thread splitting, draft workflows, and engagement automation.
openclaw skills install twitter-autopilotEnd-to-end Twitter/X automation for AI agents running on OpenClaw.
| Variable | Required | Description |
|---|---|---|
TWITTER_API_KEY | ✅ | OAuth 1.0a consumer key |
TWITTER_API_SECRET | ✅ | OAuth 1.0a consumer secret |
TWITTER_ACCESS_TOKEN | ✅ | OAuth 1.0a user token |
TWITTER_ACCESS_SECRET | ✅ | OAuth 1.0a user secret |
TWITTER_BEARER_TOKEN | Optional | OAuth 2.0 bearer (needed for reads/follows) |
tweepy (pip install)| Path | Access | Purpose |
|---|---|---|
twitter/MODE.md | Read | Draft vs auto mode flag |
twitter/queue.md | Read/Write | Approved tweets waiting to post |
twitter/drafts/pending.md | Read/Write | Unapproved drafts |
twitter/posted-log.md | Read/Write | Full history of posted tweets (duplicate check) |
twitter/logs/ | Write | Engagement and posting logs |
curl -u "API_KEY:API_SECRET" -d "grant_type=client_credentials" "https://api.twitter.com/oauth2/token"TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET=your_api_secret
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_SECRET=your_access_token_secret
TWITTER_BEARER_TOKEN=your_bearer_token
pip install tweepy
All commands via scripts/tweet.py:
# Post (auto-threads if >280 chars)
python tweet.py post "your tweet text here"
# Reply to a tweet
python tweet.py reply TWEET_ID "your reply"
# Quote tweet
python tweet.py quote TWEET_ID "your take"
# Retweet
python tweet.py retweet TWEET_ID
# Delete
python tweet.py delete TWEET_ID
# Follow / Unfollow
python tweet.py follow @username
python tweet.py unfollow @username
# Check mentions
python tweet.py mentions
# Account stats
python tweet.py me
Free API tier limits single tweets to 280 chars. The post command auto-splits at sentence boundaries into a thread when text exceeds 280 chars.
For manual threads, call thread from Python:
from tweet import thread
thread(["Tweet 1", "Tweet 2", "Tweet 3"])
For agents that need human approval before posting:
twitter/MODE.md with content DRAFT or AUTOtwitter/drafts/pending.md for queued draftstwitter/logs/time.sleep(1) between batch operations (follows, thread posts)See references/content-strategy.md for the full tweet writing playbook:
See references/strategy-templates.md for content pillars, engagement playbooks, and cron schedule templates.
twitter/posted-log.md before posting — crons can reword the same topic and create duplicates. Compare ideas, not just exact text.twitter/posted-log.md with full text, ID, date, and source.