X

post-tweet

x.com · Cowork
Download for Coworkthe skill folder, zipped
How to use it in Coworkonce per skill
Download the skill (.zip)

One .zip per skill. Inside: SKILL.md with the intent and the frontmatter, and the code that runs in the page.

Open Skills in Cowork

Settings → Personalize → Skills. This is Cowork's own skill library, shared across every chat.

Add → pick the .zip

Click Add and choose the file you just downloaded. Cowork installs it once; no CLAUDE.md, no per-project setup.

Ask in plain language

The skill stays available in every session. Cowork runs it in your own Chrome, riding the session you are already signed into.

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: the X skill in Cowork · browser-memory