
X Articles
- 11 installs
- 82 repo stars
- Updated August 2, 2026
- aaaaqwq/claude-code-skills
x-articles is a Claude Code skill that drafts and publishes long-form X (Twitter) Articles using viral hook patterns and browser automation.
About
x-articles is a Claude Code skill for writing and publishing long-form X (Twitter) Articles. It supplies hook patterns, a section-by-section article template, three named writing styles, and rules for the Draft.js editor. A developer uses it to draft engagement-oriented content and publish it with browser automation over CDP. It also includes a script that reformats Markdown into X-friendly plain text.
- Provides a viral article template with hooks and CTAs
- Handles X Articles Draft.js formatting quirks
- Automates publishing via CDP browser control on port 18800
X Articles by the numbers
- 11 all-time installs (skills.sh)
- Ranked #680 of 853 Sales & Marketing skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
x-articles capabilities & compatibility
- Capabilities
- content writing · social publishing · copywriting
- Works with
- chrome
- Use cases
- copywriting · marketing
What x-articles says it does
Create and publish X (Twitter) Articles with proven viral patterns.
Embedded posts ALWAYS render at the END of the content block, not inline.
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill x-articlesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 11 |
|---|---|
| repo stars | ★ 82 |
| Last updated | August 2, 2026 |
| Repository | aaaaqwq/claude-code-skills ↗ |
What it does
Write and publish long-form X (Twitter) Articles using proven hook and CTA patterns, then post them via browser automation.
When should I use this skill?
When writing or publishing a long-form X (Twitter) Article with proven hook and CTA structure.
What you get
- Published X Article
- X-ready plain-text draft
By the numbers
- 10-item pre-publish checklist
- 3 named writing styles (Damian Player, Alex Finn, Dan Koe)
Files
X Articles — Viral Long-Form for Twitter
Beat the algorithm. Create and publish X (Twitter) Articles with proven viral patterns.
AI-powered formatting, hook patterns, and browser automation. Handles Draft.js quirks, embed limitations, and image uploads.
Quick Reference
Content Formatting Rules (CRITICAL)
X Articles uses Draft.js editor with specific quirks:
1. Line breaks = paragraph breaks - Each newline creates a new paragraph block with spacing 2. Join sentences on ONE LINE - All sentences in the same paragraph must be on a single line 3. Use plain text, not markdown - X Articles uses rich text, not markdown 4. No em dashes (—) - Replace with colons or rewrite sentences
Wrong:
Sentence one.
Sentence two.
Sentence three.Right:
Sentence one. Sentence two. Sentence three.Embed Limitation (IMPORTANT)
Embedded posts ALWAYS render at the END of the content block, not inline.
Workarounds:
- Structure article to reference "see posts below"
- Accept visual flow: text → text → embeds at bottom
- Use
Insert > Postsmenu (don't paste URLs)
Image Specs
| Type | Aspect Ratio | Recommended Size |
|---|---|---|
| Cover/Header | 5:2 | 1792x716 or similar |
| Inline images | 16:9 or 4:3 | 1792x1024 (DALL-E HD) |
Viral Article Structure
The Template
HOOK (hit insecurity or opportunity)
WHAT IT IS (1-2 paragraphs with social proof)
WHY MOST PEOPLE WON'T DO IT (address objections)
THE [X]-MINUTE GUIDE
- Step 1 (time estimate)
- Step 2 (time estimate)
- ...
YOUR FIRST [N] WINS (immediate value)
- Win 1: copy-paste example
- Win 2: copy-paste example
THE COST (value comparison)
WHAT TO DO AFTER (next steps)
THE WINDOW (urgency)
CTA (soft or hard)Hook Patterns That Work
Insecurity/FOMO:
everyone's talking about X... and you're sitting there wondering if you missed the windowBig Opportunity:
this is the biggest opportunity of our lifetimeNews Hook:
X just open sourced the algo. Here's what it means for you:RIP Pattern:
RIP [profession]. This AI tool will [action] in seconds.WTF Pattern:
WTF!! This AI Agent [does amazing thing]. Here's how:Personal Story:
When I was young, I was always drawn to people who...CTA Patterns
Hard CTA (engagement bait):
RT + follow + reply 'KEYWORD' and I'll send the cheat sheetSoft CTA:
If you take this advice and build something, let me know!Simple:
Feel free to leave a like and RT if this helped.Style Guide
Damian Player Style (Tactical)
- All lowercase (deliberate)
- Urgent, tactical tone
- 1500+ words
- Heavy step-by-step detail
- Hard CTA with lead magnet
Alex Finn Style (Motivational)
- Normal capitalization
- Warm, motivational tone
- 800-1200 words
- Mix of WHY and HOW
- Soft CTA + product links
Dan Koe Style (Philosophical)
- Long-form essay (2000+ words)
- Personal storytelling opener
- Named frameworks ("The Pyramid Principle")
- Deep teaching, not just tactics
- Newsletter CTA
Common Mistakes to Avoid
- Short articles under 500 words
- Facts without story/emotion
- No clear sections or headers
- No objection handling
- No immediate wins section
- No CTA
- Generic AI-sounding language
- Em dashes (—) everywhere
- Excessive emojis
- Pasting tweet URLs instead of using Insert menu
Browser Automation (agent-browser)
Prerequisites
- clawd browser running on CDP port 18800
- Logged into X on the browser
Navigate to Article Editor
# Open new article
agent-browser --cdp 18800 navigate "https://x.com/compose/article"
# Take snapshot to see current state
agent-browser --cdp 18800 snapshotPaste Content
# Put content in clipboard
cat article.txt | pbcopy
# Click content area, select all, paste
agent-browser --cdp 18800 click '[contenteditable="true"]'
agent-browser --cdp 18800 press "Meta+a"
agent-browser --cdp 18800 press "Meta+v"Upload Cover Image
# Upload to file input
agent-browser --cdp 18800 upload 'input[type="file"]' /path/to/cover.png
# Wait for Edit media dialog, click Apply
agent-browser --cdp 18800 snapshot | grep -i apply
agent-browser --cdp 18800 click @e5 # Apply button refPublish
# Find and click Publish button
agent-browser --cdp 18800 snapshot | grep -i publish
agent-browser --cdp 18800 click @e35 # Publish button ref
# Confirm in dialog
agent-browser --cdp 18800 click @e5 # ConfirmCleanup (Important!)
# Close tab after publishing
agent-browser --cdp 18800 tab list
agent-browser --cdp 18800 tab close 1Troubleshooting: Stale Element Refs
If clicks fail due to stale refs, use JS evaluate:
agent-browser --cdp 18800 evaluate "(function() {
const btns = document.querySelectorAll('button');
for (let btn of btns) {
if (btn.innerText.includes('Publish')) {
btn.click();
return 'clicked';
}
}
return 'not found';
})()"Content Preparation Script
Convert Markdown to X-Friendly Format
# scripts/format-for-x.sh
#!/bin/bash
# Converts markdown to X Articles format
INPUT="$1"
OUTPUT="${2:-${INPUT%.md}-x-ready.txt}"
cat "$INPUT" | \
# Remove markdown headers, keep text
sed 's/^## /\n/g' | \
sed 's/^### /\n/g' | \
sed 's/^# /\n/g' | \
# Remove markdown bold/italic
sed 's/\*\*//g' | \
sed 's/\*//g' | \
# Remove em dashes
sed 's/ — /: /g' | \
sed 's/—/:/g' | \
# Join lines within paragraphs (keeps blank lines as separators)
awk 'BEGIN{RS=""; FS="\n"; ORS="\n\n"} {gsub(/\n/, " "); print}' \
> "$OUTPUT"
echo "Created: $OUTPUT"Pre-Publish Checklist
- [ ] Hook grabs attention in first line
- [ ] Objections addressed early
- [ ] Step-by-step with time estimates
- [ ] Immediate wins section included
- [ ] CTA at the end
- [ ] No em dashes (—)
- [ ] Sentences joined on single lines
- [ ] Cover image 5:2 aspect ratio
- [ ] Embeds referenced as "see below"
- [ ] Proofread for AI-sounding language
Tweetable Quote Patterns
For promoting your article:
Result + Cost:
I gave an AI agent full access to my MacBook. It checks email, manages calendar, pushes code. Costs $20/month. A VA costs $2000.You Don't Need X:
You 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.Gap Warning:
The gap between 'has AI agent' and 'doesn't' is about to get massive. I set mine up in 15 minutes.Urgency:
Most people will bookmark this and never set it up. Don't be most people. The window is closing.Example Workflow
1. Write article in markdown with clear sections 2. Run format script to convert to X-friendly plain text 3. Generate cover image with DALL-E (1792x716 or 5:2 ratio) 4. Open X article editor via browser automation 5. Paste content and add section headers manually in editor 6. Upload cover image via file input 7. Add inline images at section breaks 8. Insert embeds (they'll appear at bottom) 9. Preview and proofread 10. Publish 11. Post promotional tweet with hook + article link
Related Skills
bird- X/Twitter CLI for posting tweetsde-ai-ify- Remove AI jargon from textai-pdf-builder- Generate PDFs (for lead magnets)
---
Built by @NextXFrontier
{
"ownerId": "kn7ewywaj7mf48drbjw1baa5298016yv",
"slug": "x-articles",
"version": "1.1.2",
"publishedAt": 1770220759945
}{
"version": 1,
"registry": "https://clawhub.ai",
"slug": "x-articles",
"installedVersion": "1.1.2",
"installedAt": 1772798646922
}
Viral X Article Patterns
Quick reference for proven patterns from top performers.
Top Performers Analyzed
| Creator | Article | Views | Bookmarks |
|---|---|---|---|
| Damian Player | Clawdbot Setup Guide | 3.7M | 28K |
| Alex Finn | Claude Code Guide | 94K | 2.1K |
| Alex Finn | X Algorithm Breakdown | 392K | 2.8K |
| Dan Koe | Articulate Yourself | 7.6M | 64K |
Hook Templates
Insecurity/FOMO
everyone's talking about [X]... and you're sitting there wondering if you missed the windowBig Opportunity
this is the biggest opportunity of our lifetime. here's why:News Hook
[Company] just [action]. Here's what it means for you:RIP Pattern
RIP [profession]. This AI tool will [action] in seconds.WTF Pattern
WTF!! This AI Agent just [amazing thing]. Here's how:We're Cooked
We're cooked. This AI just [did X]. Here's how it works:Personal Story
When I was young, I was always drawn to [X]...Confession
I'll be honest: [vulnerable admission]. But then I discovered [solution].Section Templates
Objection Handling
most people won't set this up.
they think it's technical.
you don't need to be a developer.
ANYONE can do this.Step-by-Step with Time
step 1: get a free server (5 min)
step 2: install the software (2 min)
step 3: run the wizard (10 min)
total time: 17 minutesImmediate Wins
your first 3 wins (next 5 minutes):
win 1: [copy-paste command]
win 2: [copy-paste command]
win 3: [copy-paste command]Cost Comparison
what this costs: $20/month
what a VA costs: $2000/month
what you get: 24/7 availability, no training, infinite patienceUrgency Close
the window.
most people will bookmark this and never do it.
don't be most people.
the gap between 'has X' and 'doesn't' is about to get massive.CTA Templates
Hard CTA (Lead Magnet)
RT + follow + reply 'SETUP' and I'll DM you the cheat sheetSoft CTA
If you set this up, let me know how it goes. I love seeing what people build.Simple CTA
Feel free to like and RT if this helped. See you in the next one.Newsletter CTA
I write about [topic] every week. Subscribe to get it in your inbox:
[link]Writing "Legos" (Building Blocks)
Use these anywhere in your article:
1. Pain point - State a relatable problem 2. Example - Concrete illustration 3. Personal story - Your experience 4. Statistic - Numbers add credibility 5. Metaphor - Makes abstract concrete 6. Quote - Authority or inspiration 7. Reframe - New perspective on old idea 8. What/How/Why - Question structure
Formatting Rules
Do
- Clear H2 section headers
- Bullet/numbered lists
- Bold key phrases
- Do ✅ / Don't ❌ lists
- Subheadings every 3-5 paragraphs
Don't
- Wall of text
- No headers
- Excessive emojis
- Em dashes everywhere
- Generic AI language
Word Count Guidelines
| Style | Word Count | Best For |
|---|---|---|
| Quick Tutorial | 500-800 | Single trick/tip |
| Standard Guide | 800-1200 | How-to guides |
| Deep Dive | 1500-2000 | Comprehensive tutorials |
| Essay | 2000+ | Thought leadership |
Tweetable Quote Formulas
Result + Cost
[I did X]. [Result]. Costs $[small]. A [alternative] costs $[big].You Don't Need X
You don't need [expensive thing]. You don't need [complex thing]. I'm doing [amazing result] with [simple thing].Gap Warning
The gap between '[has thing]' and '[doesn't]' is about to get massive. I set mine up in [short time].Most People Won't
Most people will bookmark this and never [action]. Don't be most people. The window is closing.Named Frameworks (Dan Koe Style)
Give your concepts memorable names:
- "Inner Album of Greatest Hits" (your 8-10 best ideas)
- "The Micro Story" (problem → amplify → solution)
- "The Pyramid Principle" (answer-first, then support)
- "Cross Domain Synthesis" (connect different fields)
Having named frameworks makes your content quotable and shareable.
#!/bin/bash
# format-for-x.sh - Convert markdown to X Articles format
#
# X Articles uses Draft.js which has specific quirks:
# - Each line break = new paragraph with spacing
# - Sentences in same paragraph must be on ONE line
# - Plain text, not markdown
# - No em dashes
set -e
INPUT="$1"
OUTPUT="${2:-${INPUT%.md}-x-ready.txt}"
if [ -z "$INPUT" ]; then
echo "Usage: format-for-x.sh <input.md> [output.txt]"
echo ""
echo "Converts markdown to X Articles format:"
echo " - Removes markdown formatting"
echo " - Joins sentences in paragraphs to single lines"
echo " - Removes em dashes"
echo " - Preserves paragraph breaks"
exit 1
fi
if [ ! -f "$INPUT" ]; then
echo "Error: File not found: $INPUT"
exit 1
fi
# Process the file
cat "$INPUT" | \
# Remove markdown headers but keep the text
sed 's/^### \(.*\)/\n\1\n/g' | \
sed 's/^## \(.*\)/\n\1\n/g' | \
sed 's/^# \(.*\)/\n\1\n/g' | \
# Remove markdown bold/italic markers
sed 's/\*\*\([^*]*\)\*\*/\1/g' | \
sed 's/\*\([^*]*\)\*/\1/g' | \
sed 's/__\([^_]*\)__/\1/g' | \
sed 's/_\([^_]*\)_/\1/g' | \
# Remove markdown links, keep text
sed 's/\[\([^]]*\)\]([^)]*)/\1/g' | \
# Remove markdown code blocks (keep content)
sed 's/^```[a-z]*$/\n/g' | \
sed 's/^```$/\n/g' | \
# Remove inline code markers
sed 's/`\([^`]*\)`/\1/g' | \
# Replace em dashes with colons or periods
sed 's/ — /: /g' | \
sed 's/—/: /g' | \
# Replace en dashes with hyphens
sed 's/–/-/g' | \
# Remove bullet points but keep content
sed 's/^- /• /g' | \
sed 's/^ - / • /g' | \
# Join lines within paragraphs
# Blank lines are preserved as paragraph separators
awk '
BEGIN { paragraph = "" }
/^$/ {
if (paragraph != "") {
print paragraph
print ""
paragraph = ""
}
}
/^./ {
if (paragraph == "") {
paragraph = $0
} else {
paragraph = paragraph " " $0
}
}
END {
if (paragraph != "") {
print paragraph
}
}
' | \
# Clean up multiple blank lines
cat -s \
> "$OUTPUT"
# Count stats
ORIGINAL_LINES=$(wc -l < "$INPUT" | tr -d ' ')
OUTPUT_LINES=$(wc -l < "$OUTPUT" | tr -d ' ')
WORD_COUNT=$(wc -w < "$OUTPUT" | tr -d ' ')
echo "✓ Created: $OUTPUT"
echo " Original: $ORIGINAL_LINES lines"
echo " Output: $OUTPUT_LINES lines"
echo " Words: $WORD_COUNT"
#!/bin/bash
# publish-article.sh - Publish an article to X using browser automation
#
# Prerequisites:
# - agent-browser installed
# - clawd browser running on CDP port 18800
# - Logged into X on the browser
#
# Usage:
# publish-article.sh <content.txt> [cover-image.png]
set -e
CDP_PORT="${CDP_PORT:-18800}"
CONTENT_FILE="$1"
COVER_IMAGE="$2"
if [ -z "$CONTENT_FILE" ]; then
echo "Usage: publish-article.sh <content.txt> [cover-image.png]"
echo ""
echo "Environment variables:"
echo " CDP_PORT - Chrome DevTools port (default: 18800)"
exit 1
fi
if [ ! -f "$CONTENT_FILE" ]; then
echo "Error: Content file not found: $CONTENT_FILE"
exit 1
fi
if [ -n "$COVER_IMAGE" ] && [ ! -f "$COVER_IMAGE" ]; then
echo "Error: Cover image not found: $COVER_IMAGE"
exit 1
fi
# Check agent-browser is available
if ! command -v agent-browser &> /dev/null; then
echo "Error: agent-browser not found. Install with: npm install -g agent-browser"
exit 1
fi
echo "=== X Article Publisher ==="
echo "Content: $CONTENT_FILE"
[ -n "$COVER_IMAGE" ] && echo "Cover: $COVER_IMAGE"
echo "CDP Port: $CDP_PORT"
echo ""
# Step 1: Navigate to article editor
echo "Step 1: Opening article editor..."
agent-browser --cdp $CDP_PORT navigate "https://x.com/compose/article"
sleep 2
# Step 2: Wait for editor to load
echo "Step 2: Waiting for editor..."
agent-browser --cdp $CDP_PORT snapshot > /tmp/x-article-snapshot.txt 2>&1
if ! grep -qi "contenteditable\|article\|editor" /tmp/x-article-snapshot.txt; then
echo "Warning: Editor may not have loaded. Check browser."
fi
# Step 3: Paste content
echo "Step 3: Pasting content..."
cat "$CONTENT_FILE" | pbcopy
agent-browser --cdp $CDP_PORT click '[contenteditable="true"]' 2>/dev/null || true
sleep 0.5
agent-browser --cdp $CDP_PORT press "Meta+a"
sleep 0.2
agent-browser --cdp $CDP_PORT press "Meta+v"
sleep 1
# Step 4: Upload cover image if provided
if [ -n "$COVER_IMAGE" ]; then
echo "Step 4: Uploading cover image..."
agent-browser --cdp $CDP_PORT upload 'input[type="file"]' "$COVER_IMAGE" 2>/dev/null || {
echo "Warning: Cover image upload may have failed. Try manually."
}
sleep 2
# Try to click Apply button in media dialog
echo " Looking for Apply button..."
agent-browser --cdp $CDP_PORT snapshot 2>/dev/null | grep -i "apply" || true
# Note: Apply button ref varies, may need manual click
fi
echo ""
echo "=== Content Loaded ==="
echo ""
echo "Manual steps remaining:"
echo " 1. Review content formatting"
echo " 2. Add section headers (use editor toolbar)"
echo " 3. Insert inline images at section breaks"
echo " 4. Insert tweet embeds (Insert > Posts)"
echo " 5. Add cover image if not uploaded"
echo " 6. Preview article"
echo " 7. Click Publish"
echo ""
echo "To publish via CLI (after manual review):"
echo " agent-browser --cdp $CDP_PORT snapshot | grep -i publish"
echo " agent-browser --cdp $CDP_PORT click @<ref> # Publish button"
echo ""
# Optional: Auto-publish (uncomment if you're confident)
# echo "Auto-publishing in 5 seconds... (Ctrl+C to cancel)"
# sleep 5
# agent-browser --cdp $CDP_PORT evaluate "(function() {
# const btns = document.querySelectorAll('button');
# for (let btn of btns) {
# if (btn.innerText.includes('Publish')) {
# btn.click();
# return 'clicked';
# }
# }
# return 'not found';
# })()"
{
"name": "x-articles",
"version": "1.0.2",
"description": "Create and publish X (Twitter) Articles with viral formatting, hook patterns, and browser automation",
"author": {
"name": "Next Frontier",
"url": "https://x.com/NextXFrontier"
},
"repository": "https://github.com/NextFrontierBuilds/x-articles-skill",
"keywords": [
"x",
"twitter",
"articles",
"long-form",
"viral",
"publishing",
"browser-automation",
"content-creation"
],
"dependencies": {
"cli": ["agent-browser"],
"optional": ["pbcopy"]
},
"platforms": ["macos", "linux"],
"category": "social-media"
}