Twitter Posts

Workflows

Draft, publish, and manage posts on X (Twitter), inspect timelines, manage profiles, and automate social media workflows via the X API. Use this skill when users want to post tweets, review timelines, search posts, or manage X/Twitter workflows.

Install

openclaw skills install clawlink-twitter

X (Twitter)

X (Twitter)

Manage X (Twitter) — draft and publish posts, inspect timelines, search content, manage profiles, and automate social media workflows via the X API.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure X API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect X (Twitter)
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect X

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│    X API         │
│   (User Chat)   │     │   (OAuth)    │     │                  │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect X         │                       │
         │                       │  4. Secure Token       │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │    X     │
   │  File    │           │ Auth     │           │ Account  │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for X (Twitter) again."

Quick Start

# Get user profile
clawlink_call_tool --tool "twitter_get_user" --params '{"username": "username"}'

# Post a tweet
clawlink_call_tool --tool "twitter_create_tweet" --params '{"text": "Hello from OpenClaw!"}'

# search tweets
clawlink_call_tool --tool "twitter_search_tweets" --params '{"query": "openclaw"}'

Authentication

All X tool calls are authenticated automatically by ClawLink using the user's connected X account OAuth token.

No API token is required in chat. ClawLink stores the OAuth token securely and injects it into every X API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=twitter and connect X.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for twitter in the list.

Verify Connection

clawlink_list_tools --integration twitter

Response: Returns the live tool catalog for X.

Reconnect

If X tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=twitter
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration twitter

Security & Permissions

  • Access is scoped to the X account connected during OAuth setup and the permissions granted.
  • All write operations (post tweet, delete, retweet, like, follow) require explicit user confirmation.
  • Posts are public-facing by default — always confirm the content before posting.
  • Account deletion or suspension-related operations are high-impact and must be confirmed.
  • Rate limits apply to many endpoints — honor backoff guidance.

Tool Reference

Tweets (Posts)

ToolDescriptionMode
twitter_list_tweetsList tweets from a user's timelineRead
twitter_get_tweetGet a specific tweet's detailsRead
twitter_create_tweetPost a new tweetWrite
twitter_delete_tweetDelete a tweetWrite
twitter_update_tweetUpdate a tweet's textWrite
twitter_retweetRetweet an existing tweetWrite
twitter_unretweetRemove a retweetWrite
twitter_like_tweetLike a tweetWrite
twitter_unlike_tweetRemove a like from a tweetWrite

Timelines

ToolDescriptionMode
twitter_get_home_timelineGet tweets from the home timelineRead
twitter_get_user_timelineGet tweets from a specific user's timelineRead
twitter_get_mentions_timelineGet tweets mentioning the authenticated userRead

Search

ToolDescriptionMode
twitter_search_tweetsSearch for tweets matching a queryRead
twitter_search_usersSearch for users matching a queryRead

Users & Profiles

ToolDescriptionMode
twitter_get_userGet a user's profile informationRead
twitter_list_followersList followers of a userRead
twitter_list_followingList accounts a user followsRead
twitter_follow_userFollow a userWrite
twitter_unfollow_userUnfollow a userWrite
twitter_block_userBlock a userWrite
twitter_unblock_userUnblock a userWrite
twitter_mute_userMute a userWrite
twitter_unmute_userUnmute a userWrite

Bookmarks

ToolDescriptionMode
twitter_list_bookmarksList the authenticated user's bookmarksRead
twitter_add_bookmarkAdd a tweet to bookmarksWrite
twitter_remove_bookmarkRemove a tweet from bookmarksWrite

Lists

ToolDescriptionMode
twitter_list_list_membershipsList lists a user is a member ofRead
twitter_list_list_subscribersList subscribers to a listRead
twitter_list_list_tweetsGet tweets from a specific listRead

Direct Messages

ToolDescriptionMode
twitter_list_direct_messagesList direct messagesRead
twitter_send_direct_messageSend a direct messageWrite

Media

ToolDescriptionMode
twitter_upload_mediaUpload an image or video to attach to a tweetWrite
twitter_create_tweet_with_mediaPost a tweet with attached mediaWrite

Code Examples

Post a tweet

clawlink_call_tool --tool "twitter_create_tweet" \
  --params '{
    "text": "Excited to announce our new integration! Check it out at https://example.com"
  }'

Get a user profile

clawlink_call_tool --tool "twitter_get_user" \
  --params '{
    "username": "elonmusk"
  }'

Search for tweets

clawlink_call_tool --tool "twitter_search_tweets" \
  --params '{
    "query": "openclaw ai assistant",
    "max_results": 10
  }'

Retweet a post

clawlink_call_tool --tool "twitter_retweet" \
  --params '{
    "tweet_id": "TWEET_ID"
  }'

Follow a user

clawlink_call_tool --tool "twitter_follow_user" \
  --params '{
    "username": "example_user"
  }'

Upload media and post

clawlink_call_tool --tool "twitter_create_tweet_with_media" \
  --params '{
    "text": "Check out this screenshot!",
    "media_ids": ["MEDIA_ID"]
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm X is connected.
  2. Call clawlink_list_tools --integration twitter to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration twitter.
  5. If no X tools appear, direct the user to https://claw-link.dev/dashboard?add=twitter.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → search → describe                            │
│                                                             │
│  Example: Get user → List tweets → Show profile            │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Preview tweet → User approves → Post tweet        │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer read, list, get, and search operations before writes when that reduces ambiguity.
  4. For writes or anything marked as requiring confirmation, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • Tweet IDs are numeric and very large — handle them as strings to avoid precision loss.
  • Rate limits vary by endpoint and account type — Basic/Free accounts have stricter limits.
  • Media uploads must complete before being attached to a tweet — use the returned media ID.
  • Deleted tweets cannot be recovered.
  • Direct messages have separate rate limits and scope restrictions.
  • X API v2 is used — some v1 endpoints may not be available.

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration twitter.
Missing connectionX is not connected. Direct the user to https://claw-link.dev/dashboard?add=twitter.
Tweet not foundThe tweet ID does not exist or has been deleted.
User not foundThe username does not match any account.
UnauthorizedThe OAuth token lacks permission for this operation.
DuplicateThe tweet text is identical to a recent tweet (spam protection).
Rate limit exceededToo many requests. Wait and retry with backoff.
Media upload failedThe file format is unsupported or exceeds size limits.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Post Fails

  1. Verify the account has posting permissions — some enterprise accounts restrict API posting.
  2. Check for duplicate content — X prevents posting identical tweets in quick succession.
  3. Confirm media formats and sizes are within X's limits.
  4. Check rate limits — free accounts have significantly reduced posting limits.

Resources


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo