CommunityCoding & Developmentgithub.com

OpenClaw X

Control your X/Twitter account — view timeline, search tweets, post, like, retweet, and bookmark.

What is OpenClaw X?

OpenClaw X is a skill that allows you to interact with your X/Twitter account through a local API. You can view your home timeline, search for tweets, retrieve tweet details, post new tweets or replies, like, retweet, and bookmark tweets. It also supports fetching user profiles and their recent tweets. To use it, you need to download the executable from GitHub Releases, export your X cookies from Chrome using a Cookie-Editor extension, and run the local server on port 19816. The skill then uses cURL commands to send HTTP requests to the server, making it easy to automate Twitter actions from a terminal or integrate into scripts and AI agent workflows.

Works with~Claude Code~Codex CLI~Cursor
npx skills add bosshuman/openclaw-x

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does OpenClaw X do?

Control your X/Twitter account via a local API.

Prerequisites

  1. Download the corresponding platform executable from GitHub Release
  2. Export your X cookies from Chrome (using the Cookie-Editor extension), save as cookies.json in the same directory as the executable
  3. Run the executable and ensure the service is started: http://localhost:19816

Available Actions

1. Get Home Timeline

curl http://localhost:19816/timeline?count=20

Returns the latest list of tweets, including content, author, media URLs, etc.

2. Get Tweet Details

curl http://localhost:19816/tweet/{tweet_id}

Supports passing a tweet ID or full URL (e.g., https://x.com/user/status/123456).

3. Search Tweets

curl "http://localhost:19816/search?q=keyword&sort=Latest&count=20"

Parameters:

  • q: Search keyword (required)
  • sort: Latest or Top, defaults to Latest
  • count: Number of results, defaults to 20

4. Post a Tweet

curl -X POST http://localhost:19816/tweet \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello World"}'

Reply to a tweet:

curl -X POST http://localhost:19816/tweet \
  -H "Content-Type: application/json" \
  -d '{"text": "Reply content", "reply_to": "original tweet ID"}'

5. Like a Tweet

curl -X POST http://localhost:19816/tweet/{tweet_id}/like

6. Retweet

curl -X POST http://localhost:19816/tweet/{tweet_id}/retweet

7. Bookmark a Tweet

curl -X POST http://localhost:19816/tweet/{tweet_id}/bookmark

8. Get User Information

curl http://localhost:19816/user/{username}

Returns username, avatar, bio, follower count, etc.

9. Get User Tweets

curl http://localhost:19816/user/{username}/tweets?count=20

Common Use Cases

  1. "Show me what's new on my timeline"
  2. "Search for the latest tweets about AI Agent"
  3. "Post a tweet: The weather is great today"
  4. "Like this tweet https://x.com/xxx/status/123"
  5. "See what @elonmusk has posted recently"
  6. "Bookmark this tweet"

Related Skills