Install
openclaw skills install auto-tweetPost, search, like, retweet, bookmark, and manage a Twitter/X account via a local twikit-based API server on port 19816. Use when the user asks to tweet, search tweets, check timeline, like/retweet posts, or manage their X account. Replaces openclaw-x with fully auditable open-source Python code.
openclaw skills install auto-tweetSafe, open-source Twitter/X automation via twikit. Replaces openclaw-x with fully auditable Python code.
This skill lets you control a Twitter/X account through natural language.
The local API runs on http://localhost:19816 and wraps the open-source
twikit library (4.1K+ ⭐, MIT license).
No closed-source binaries. No cookie theft risk. Fully transparent.
The Auto-Tweet server must be running:
cd ~/.openclaw/skills/auto-tweet
python main.py
curl -X POST http://localhost:19816/tweet \
-H "Content-Type: application/json" \
-d '{"text": "Hello from OpenClaw!"}'
curl -X POST http://localhost:19816/tweet \
-H "Content-Type: application/json" \
-d '{"text": "Check this out!", "media_paths": ["/path/to/image.jpg"]}'
curl -X POST http://localhost:19816/tweet \
-H "Content-Type: application/json" \
-d '{"text": "Great point!", "reply_to": "TWEET_ID"}'
curl -X POST http://localhost:19816/tweet \
-H "Content-Type: application/json" \
-d '{"text": "This is amazing!", "quote_url": "https://x.com/user/status/TWEET_ID"}'
curl "http://localhost:19816/search?q=AI+Agent&type=Latest&count=10"
curl "http://localhost:19816/search/users?q=openai&count=5"
curl "http://localhost:19816/timeline?count=20"
curl "http://localhost:19816/timeline/following?count=20"
curl -X POST http://localhost:19816/like \
-H "Content-Type: application/json" \
-d '{"tweet_id": "TWEET_ID"}'
curl -X POST http://localhost:19816/unlike \
-H "Content-Type: application/json" \
-d '{"tweet_id": "TWEET_ID"}'
curl -X POST http://localhost:19816/retweet \
-H "Content-Type: application/json" \
-d '{"tweet_id": "TWEET_ID"}'
curl -X POST http://localhost:19816/unretweet \
-H "Content-Type: application/json" \
-d '{"tweet_id": "TWEET_ID"}'
curl -X POST http://localhost:19816/bookmark \
-H "Content-Type: application/json" \
-d '{"tweet_id": "TWEET_ID"}'
curl "http://localhost:19816/bookmarks?count=20"
curl "http://localhost:19816/user/elonmusk"
curl "http://localhost:19816/user/elonmusk/tweets?type=Tweets&count=10"
curl "http://localhost:19816/tweet/TWEET_ID"
curl -X DELETE "http://localhost:19816/tweet/TWEET_ID"
curl "http://localhost:19816/trends?category=trending"
curl -X POST http://localhost:19816/dm \
-H "Content-Type: application/json" \
-d '{"user_id": "USER_ID", "text": "Hello!"}'
curl -X POST "http://localhost:19816/follow/USER_ID"
curl -X POST "http://localhost:19816/unfollow/USER_ID"
curl "http://localhost:19816/notifications?type=Mentions&count=20"
curl -X POST http://localhost:19816/schedule \
-H "Content-Type: application/json" \
-d '{"text": "Scheduled tweet!", "scheduled_at": 1735689600}'
curl "http://localhost:19816/rate_limits"
curl "http://localhost:19816/"
| Limit | Default | Purpose |
|---|---|---|
| API calls/hour | 30 | Prevent hourly burst |
| API calls/day | 200 | Match normal usage |
| Tweets/day | 20 | Conservative posting |
All limits are configurable in config.json.
All endpoints return standard HTTP status codes:
200 — Success400 — Bad request (invalid parameters)401 — Session expired (restart server)403 — Account issue (suspended/locked)409 — Duplicate tweet429 — Rate limit exceeded500 — Twitter API error127.0.0.1 only (localhost) — no external accessconfig.jsoncookies.json