Compose and post to X.com using Chrome CDP automation. Use when user asks to "post to X", "tweet", "draft a tweet", "share on X", or "write a thread". Handles Chrome launch, text input with emoji/unicode support, and multi-paragraph formatting via real browser automation (no API costs, bypasses anti-bot detection).
Post to X.com via browser automation. No API key required.
Use Playwright MCP tools directly. Handles text, images, and posting without visible browser.
1. browser_navigate → https://x.com/compose/post
2. browser_snapshot → find textbox ref
3. browser_run_code → force click textbox, keyboard.type(content, {delay: 10})
4. browser_take_screenshot → verify draft
5. Ask user confirmation
6. browser_run_code → page.locator('[data-testid="tweetButton"]').dispatchEvent('click')
1. Type content (same as above)
2. browser_run_code → page.locator('input[type="file"][accept*="image"]').first().setInputFiles('/path/to/image.png')
3. browser_take_screenshot → verify image attached
4. Post after confirmation
{ force: true } or dispatchEvent('click')Cmd+A then Backspace via page.keyboardfill() can cause duplicate text — prefer keyboard.type() with delaybash scripts/x-post.sh "Your post content here"
~/.chrome-cdp-port# Open compose page
NODE_PATH=$(npm root -g) node scripts/cdp-launch.js [URL]
# Type text
echo '[{"text":"Hello"},{"enter":true},{"text":"World"}]' | NODE_PATH=$(npm root -g) node scripts/cdp-type.js
If CDP is unavailable (Chrome already running without debugging):
pbcopyplaywright MCP server configurednpm install -g chrome-remote-interface| Issue | Fix |
|-------|-----|
| Overlay blocks clicks | Use { force: true } or dispatchEvent('click') |
| fill() duplicates text | Use keyboard.type() with { delay: 10 } instead |
| Port 9222 occupied | Auto-handled — scans 9222-9230 |
| Not logged in | User must log in manually once, session persists |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer