{"skill":{"slug":"x-articles","displayName":"X Articles","summary":"Publish viral X (Twitter) Articles with AI. Long-form content that gets engagement. Proven hook patterns, browser automation. Works with Claude, Cursor, OpenClaw.","description":"---\nname: x-articles\ndescription: Publish viral X (Twitter) Articles with AI. Long-form content that gets engagement. Proven hook patterns, browser automation. Works with Claude, Cursor, OpenClaw.\nversion: 1.1.1\nkeywords: twitter-articles, x-articles, viral-content, twitter-automation, social-media, content-marketing, ai-writing, twitter-threads, engagement, ai, ai-agent, ai-coding, cursor, claude, claude-code, gpt, copilot, vibe-coding, openclaw, moltbot, agentic\n---\n\n# X Articles — Viral Long-Form for Twitter\n\n**Beat the algorithm.** Create and publish X (Twitter) Articles with proven viral patterns.\n\nAI-powered formatting, hook patterns, and browser automation. Handles Draft.js quirks, embed limitations, and image uploads.\n\n## Quick Reference\n\n### Content Formatting Rules (CRITICAL)\n\nX Articles uses Draft.js editor with specific quirks:\n\n1. **Line breaks = paragraph breaks** - Each newline creates a new paragraph block with spacing\n2. **Join sentences on ONE LINE** - All sentences in the same paragraph must be on a single line\n3. **Use plain text, not markdown** - X Articles uses rich text, not markdown\n4. **No em dashes (—)** - Replace with colons or rewrite sentences\n\n**Wrong:**\n```\nSentence one.\nSentence two.\nSentence three.\n```\n\n**Right:**\n```\nSentence one. Sentence two. Sentence three.\n```\n\n### Embed Limitation (IMPORTANT)\n\n**Embedded posts ALWAYS render at the END of the content block, not inline.**\n\nWorkarounds:\n- Structure article to reference \"see posts below\"\n- Accept visual flow: text → text → embeds at bottom\n- Use `Insert > Posts` menu (don't paste URLs)\n\n### Image Specs\n\n| Type | Aspect Ratio | Recommended Size |\n|------|--------------|------------------|\n| Cover/Header | 5:2 | 1792x716 or similar |\n| Inline images | 16:9 or 4:3 | 1792x1024 (DALL-E HD) |\n\n## Viral Article Structure\n\n### The Template\n\n```\nHOOK (hit insecurity or opportunity)\n\nWHAT IT IS (1-2 paragraphs with social proof)\n\nWHY MOST PEOPLE WON'T DO IT (address objections)\n\nTHE [X]-MINUTE GUIDE\n- Step 1 (time estimate)\n- Step 2 (time estimate)\n- ...\n\nYOUR FIRST [N] WINS (immediate value)\n- Win 1: copy-paste example\n- Win 2: copy-paste example\n\nTHE COST (value comparison)\n\nWHAT TO DO AFTER (next steps)\n\nTHE WINDOW (urgency)\n\nCTA (soft or hard)\n```\n\n### Hook Patterns That Work\n\n**Insecurity/FOMO:**\n```\neveryone's talking about X... and you're sitting there wondering if you missed the window\n```\n\n**Big Opportunity:**\n```\nthis is the biggest opportunity of our lifetime\n```\n\n**News Hook:**\n```\nX just open sourced the algo. Here's what it means for you:\n```\n\n**RIP Pattern:**\n```\nRIP [profession]. This AI tool will [action] in seconds.\n```\n\n**WTF Pattern:**\n```\nWTF!! This AI Agent [does amazing thing]. Here's how:\n```\n\n**Personal Story:**\n```\nWhen I was young, I was always drawn to people who...\n```\n\n### CTA Patterns\n\n**Hard CTA (engagement bait):**\n```\nRT + follow + reply 'KEYWORD' and I'll send the cheat sheet\n```\n\n**Soft CTA:**\n```\nIf you take this advice and build something, let me know!\n```\n\n**Simple:**\n```\nFeel free to leave a like and RT if this helped.\n```\n\n## Style Guide\n\n### Damian Player Style (Tactical)\n- All lowercase (deliberate)\n- Urgent, tactical tone\n- 1500+ words\n- Heavy step-by-step detail\n- Hard CTA with lead magnet\n\n### Alex Finn Style (Motivational)\n- Normal capitalization\n- Warm, motivational tone\n- 800-1200 words\n- Mix of WHY and HOW\n- Soft CTA + product links\n\n### Dan Koe Style (Philosophical)\n- Long-form essay (2000+ words)\n- Personal storytelling opener\n- Named frameworks (\"The Pyramid Principle\")\n- Deep teaching, not just tactics\n- Newsletter CTA\n\n## Common Mistakes to Avoid\n\n- Short articles under 500 words\n- Facts without story/emotion\n- No clear sections or headers\n- No objection handling\n- No immediate wins section\n- No CTA\n- Generic AI-sounding language\n- Em dashes (—) everywhere\n- Excessive emojis\n- Pasting tweet URLs instead of using Insert menu\n\n## Browser Automation (agent-browser)\n\n### Prerequisites\n- clawd browser running on CDP port 18800\n- Logged into X on the browser\n\n### Navigate to Article Editor\n```bash\n# Open new article\nagent-browser --cdp 18800 navigate \"https://x.com/compose/article\"\n\n# Take snapshot to see current state\nagent-browser --cdp 18800 snapshot\n```\n\n### Paste Content\n```bash\n# Put content in clipboard\ncat article.txt | pbcopy\n\n# Click content area, select all, paste\nagent-browser --cdp 18800 click '[contenteditable=\"true\"]'\nagent-browser --cdp 18800 press \"Meta+a\"\nagent-browser --cdp 18800 press \"Meta+v\"\n```\n\n### Upload Cover Image\n```bash\n# Upload to file input\nagent-browser --cdp 18800 upload 'input[type=\"file\"]' /path/to/cover.png\n\n# Wait for Edit media dialog, click Apply\nagent-browser --cdp 18800 snapshot | grep -i apply\nagent-browser --cdp 18800 click @e5  # Apply button ref\n```\n\n### Publish\n```bash\n# Find and click Publish button\nagent-browser --cdp 18800 snapshot | grep -i publish\nagent-browser --cdp 18800 click @e35  # Publish button ref\n\n# Confirm in dialog\nagent-browser --cdp 18800 click @e5   # Confirm\n```\n\n### Cleanup (Important!)\n```bash\n# Close tab after publishing\nagent-browser --cdp 18800 tab list\nagent-browser --cdp 18800 tab close 1\n```\n\n### Troubleshooting: Stale Element Refs\n\nIf clicks fail due to stale refs, use JS evaluate:\n```bash\nagent-browser --cdp 18800 evaluate \"(function() { \n  const btns = document.querySelectorAll('button'); \n  for (let btn of btns) { \n    if (btn.innerText.includes('Publish')) { \n      btn.click(); \n      return 'clicked'; \n    } \n  } \n  return 'not found'; \n})()\"\n```\n\n## Content Preparation Script\n\n### Convert Markdown to X-Friendly Format\n\n```bash\n# scripts/format-for-x.sh\n#!/bin/bash\n# Converts markdown to X Articles format\n\nINPUT=\"$1\"\nOUTPUT=\"${2:-${INPUT%.md}-x-ready.txt}\"\n\ncat \"$INPUT\" | \\\n  # Remove markdown headers, keep text\n  sed 's/^## /\\n/g' | \\\n  sed 's/^### /\\n/g' | \\\n  sed 's/^# /\\n/g' | \\\n  # Remove markdown bold/italic\n  sed 's/\\*\\*//g' | \\\n  sed 's/\\*//g' | \\\n  # Remove em dashes\n  sed 's/ — /: /g' | \\\n  sed 's/—/:/g' | \\\n  # Join lines within paragraphs (keeps blank lines as separators)\n  awk 'BEGIN{RS=\"\"; FS=\"\\n\"; ORS=\"\\n\\n\"} {gsub(/\\n/, \" \"); print}' \\\n  > \"$OUTPUT\"\n\necho \"Created: $OUTPUT\"\n```\n\n## Pre-Publish Checklist\n\n- [ ] Hook grabs attention in first line\n- [ ] Objections addressed early\n- [ ] Step-by-step with time estimates\n- [ ] Immediate wins section included\n- [ ] CTA at the end\n- [ ] No em dashes (—)\n- [ ] Sentences joined on single lines\n- [ ] Cover image 5:2 aspect ratio\n- [ ] Embeds referenced as \"see below\"\n- [ ] Proofread for AI-sounding language\n\n## Tweetable Quote Patterns\n\nFor promoting your article:\n\n**Result + Cost:**\n```\nI gave an AI agent full access to my MacBook. It checks email, manages calendar, pushes code. Costs $20/month. A VA costs $2000.\n```\n\n**You Don't Need X:**\n```\nYou don't need a Mac Mini. You don't need a server. I'm running my AI agent on an old MacBook Air from a drawer.\n```\n\n**Gap Warning:**\n```\nThe gap between 'has AI agent' and 'doesn't' is about to get massive. I set mine up in 15 minutes.\n```\n\n**Urgency:**\n```\nMost people will bookmark this and never set it up. Don't be most people. The window is closing.\n```\n\n## Example Workflow\n\n1. **Write article** in markdown with clear sections\n2. **Run format script** to convert to X-friendly plain text\n3. **Generate cover image** with DALL-E (1792x716 or 5:2 ratio)\n4. **Open X article editor** via browser automation\n5. **Paste content** and add section headers manually in editor\n6. **Upload cover image** via file input\n7. **Add inline images** at section breaks\n8. **Insert embeds** (they'll appear at bottom)\n9. **Preview and proofread**\n10. **Publish**\n11. **Post promotional tweet** with hook + article link\n\n## Related Skills\n\n- `bird` - X/Twitter CLI for posting tweets\n- `de-ai-ify` - Remove AI jargon from text\n- `ai-pdf-builder` - Generate PDFs (for lead magnets)\n\n---\n\nBuilt by [@NextXFrontier](https://x.com/NextXFrontier)\n","tags":{"latest":"1.1.2"},"stats":{"comments":0,"downloads":3594,"installsAllTime":7,"installsCurrent":7,"stars":7,"versions":4},"createdAt":1769541784836,"updatedAt":1778987238327},"latestVersion":{"version":"1.1.2","createdAt":1770220759945,"changelog":"Rebranded to OpenClaw","license":null},"metadata":null,"owner":{"handle":"nextfrontierbuilds","userId":"s173crrwz6a8ksnw7w0q36yky18408nb","displayName":"Next Frontier AI","image":"https://avatars.githubusercontent.com/u/257253317?v=4"},"moderation":null}