X

post-tweet

x.com
InstallationInstalls just this skill for your agent
Side effectwrite-irreversible
Authsession
Needsnavigate · wait · type · upload · click
Summary

Post an original tweet (new, not a reply) on X/Twitter with arbitrary text and, OPTIONALLY, an attached image, from the logged-in account.

Params
{"text":"tweet content (string, max 280 chars unless Premium account)","image":"OPTIONAL: local path of the image file to attach (e.g. /Users/.../photo.png). If omitted, posts text only."}
Returns
{}
SKILL.md27 lines

Intent

Post an original tweet (new, not a reply) on X/Twitter with arbitrary text and, OPTIONALLY, an attached image, from the logged-in account. Opens the composer at /compose/post, types the text into the Draft.js contenteditable [data-testid=tweetTextarea_0]; if image (local file path) is passed it uploads it to the media input [data-testid=fileInput] and waits for the preview [data-testid=attachments]; publishes with [data-testid=tweetButton]. Goes via UI (Playwright), NOT via API: the CreateTweet endpoint returns 200 but X silently drops the write without the anti-bot signature x-client-transaction-id (same reason as x-reply). write-irreversible: posts a real PUBLIC tweet. Params: text (max 280 unless Premium) and image (optional, local path of the image to attach). Requires an active X session.

Preconditions

  • Logged-in session in the browser you drive (logged-in x.com session (cookies)).
  • If not logged in: navigate to https://x.com and let the user log in, then retry.

Execute

Drive the rendered page with your browser (selectors are CSS; {{var}} = a param):

  1. navigate → https://x.com/compose/post
  2. wait for [data-testid=tweetTextarea_0]
  3. type {{text}} into [data-testid=tweetTextarea_0]
  4. upload {{image}} to [data-testid=fileInput] (optional)
  5. wait for [data-testid=attachments] (optional)
  6. click [data-testid=tweetButton]

Step 6 is the commit: it performs the write-irreversible action.

Success assertion

{
  "expr": "document.querySelector('[data-testid=tweetButton]') === null && document.querySelector('[data-testid=primaryColumn]') !== null",
  "type": "dom",
  "within_ms": 10000
}
post-tweet: a X skill for AI browsing agents · browser-memory