LaunchKit · 2026
Back to Skills

twitter-x-api

X/Twitter messaging management via API.

0
669 downloads
by @klemenska

Setup & Installation

openclaw skills install @klemenska/twitter-x-api

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install twitter-x-api

What This Skill Does

Connects an agent to X (Twitter) via API v2. Supports reading timelines, posting tweets, replying, sending DMs, searching, and retrieving tweet analytics. Credentials can be stored as environment variables or in a local config file.

Covers the full read-write Twitter API surface in one script, including DMs and media uploads, without requiring a separate app or dashboard.

When to use it

  • Post a tweet or thread from the command line
  • Monitor mentions and reply to relevant conversations
  • Send a DM to a specific user automatically
  • Search for tweets by keyword or hashtag
  • Check engagement analytics on a specific tweet

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: post a thread about our product launch with three tweets

AGENT
  1. 1Load Twitter credentials from environment variables
  2. 2Prepare three tweet texts within the 280-character limit
  3. 3Call tweet.py thread with all three texts as arguments
  4. 4Confirm each tweet ID returned by the API
OUTPUT

A three-tweet thread posted to the user's account, with tweet IDs for each part

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

TWITTER_API_KEY environment variableTWITTER_API_SECRET environment variableTWITTER_ACCESS_TOKEN environment variableTWITTER_ACCESS_SECRET environment variableTWITTER_BEARER_TOKEN environment variable (for read-only operations)Twitter Developer account with an approved appTwitter API Basic tier or higher for read and search access