Skip to content

MaTriXy/Xboost

Repository files navigation

xboost 🚀

X Content Optimization Tool - Powered by X algorithm insights + bird CLI + AI

xboost helps you create more engaging content on X by applying insights from the actual X recommendation algorithm. It integrates with the bird CLI to analyze your posts, and uses Claude AI to generate optimized content.

What It Does

📊 Analysis (No AI needed)

  • Analyzes your posting patterns - See what's working and what's not
  • Scores posts before publishing - Get feedback on engagement potential
  • Shows algorithm weights - Understand exactly what X optimizes for

🤖 AI-Powered (Requires API key)

  • Optimizes any text - Turn rough ideas into engaging posts
  • Generates posts from URLs - Smart ways to share links
  • Creates smart replies - Reply options for any tweet
  • Builds full threads - Algorithm-optimized thread generation
  • Improves existing posts - Analysis + rewrite suggestions

🦞 Automated Content Pipeline (Prose/Lobster)

  • Generate → Approve → Queue → Post - Full automation from topics to published content
  • AI approval gates - Quality review before posting
  • Cron scheduling - Set it and forget it
  • Rate limiting - Algorithm-aware posting intervals
  • See PROSE_GUIDE.md for complete workflow documentation

Key Algorithm Insights

Based on the X algorithm source:

Signal Weight Impact
Reply 11x Replies are worth 11x a like!
Follow 10x New followers are huge
Repost/Quote/Share 4x Distribution signals
Like 1x Baseline positive signal
Block -50x Very negative
Report -100x Strongest negative

Key insight: Posts that drive conversation (replies) rank MUCH higher than posts that just get likes.

Installation

Prerequisites

  1. Node.js 20+
  2. bird CLI - Install from bird.fast:
    npm install -g @steipete/bird
    bird whoami  # Verify authentication
  3. Claude API key (for AI features):
    export ANTHROPIC_API_KEY=your-key-here

Install xboost

# Clone or copy the xboost folder
cd xboost
npm install
npm link  # Makes 'xboost' available globally

Or run directly:

node src/index.js <command>

Commands

Analysis Commands (No AI)

xboost analyze

Analyze your posts and engagement patterns.

xboost analyze              # Analyze logged-in user
xboost analyze -u steipete  # Analyze specific user
xboost analyze -n 100       # Analyze last 100 posts

xboost score <text>

Score a potential post before publishing.

xboost score "Just shipped a new feature! Here's what I learned:"
xboost score "Check out my post" --media  # Include media boost

xboost weights

Show all X algorithm engagement weights.

xboost weights

xboost tips

Show algorithm-based best practices.

xboost tips

🤖 AI-Powered Commands

xboost optimize <text>

Turn any rough idea into optimized posts.

xboost optimize "I just learned something cool about AI agents"
xboost optimize "launching my new project tomorrow" --context "developer audience"

Returns 4 variations: hook version, question version, thread opener, hot take.

xboost generate <url> (alias: gen)

Generate posts to share a link.

xboost generate https://example.com/article
xboost gen https://x.com/user/status/123  # Works with tweets too

AI creates multiple angles: value-add, question, contrarian take, thread opener.

xboost reply-gen <tweet-url>

Generate smart reply options for any tweet.

xboost reply-gen https://x.com/elonmusk/status/123456789

Returns 4 reply options: add value, ask question, share experience, friendly challenge.

xboost thread <topic>

Generate a full algorithm-optimized thread.

xboost thread "lessons from building in public"
xboost thread "AI tools" --tweets 10  # Specify length
xboost thread "startup advice" --content "my notes about fundraising..."

Creates a complete thread with hook, body tweets, and CTA.

xboost improve <text>

Analyze and improve an existing post.

xboost improve "Check out my new project, it's really cool"

Returns analysis of what's weak + 2 improved versions.


🤖 Automated Content Pipeline (Prose/Lobster)

Generate, review, and schedule content automatically - Complete workflow from topics to posted content.

See PROSE_GUIDE.md for complete documentation.

xboost prose <inputs...>

Generate post variations from topics or URLs.

# From topics
xboost prose "AI agents" "building in public"

# From URLs
xboost prose https://example.com/article

# Mix both
xboost prose "startup tips" https://article.com

# With context
xboost prose "AI" --context "developer audience, technical depth"

Generates 4 variations per input (hook, question, thread, hot take), scores each, and saves to .prose/posts/.

xboost approve [postIds...]

AI agent reviews and approves/rejects pending posts.

# Approve all pending
xboost approve

# Approve specific posts
xboost approve abc123 def456

AI reviews each post for quality, brand fit, and algorithm optimization. Approved posts move to queue.

xboost queue [options]

View posts by status.

# View approved queue
xboost queue

# View pending posts
xboost queue --status pending

# View posted content
xboost queue --status posted --limit 5

xboost lobster [options]

Post from queue or view status/stats.

# Post one from queue
xboost lobster

# Post multiple
xboost lobster --count 3

# Dry run (preview)
xboost lobster --dry-run

# Check queue status
xboost lobster --status

# View posting stats
xboost lobster --stats

# Show failures
xboost lobster --failed

Posts highest-scoring approved content with rate limiting (30min minimum gap).

Daily Automation Example:

# Generate at 9 AM
0 9 * * * cd /path/to/xboost && node index.js prose "topic1" "topic2"

# Auto-approve at 9:15 AM
15 9 * * * cd /path/to/xboost && node index.js approve

# Post every 2 hours (10 AM - 6 PM)
0 10,12,14,16,18 * * * /path/to/xboost/cron-lobster.sh

See PROSE_GUIDE.md for:

  • Complete workflow explanation
  • Configuration options
  • Cron setup examples
  • Troubleshooting guide

Template Commands (No AI)

xboost suggest <topic>

Get algorithm-optimized post templates.

xboost suggest "AI agents"

xboost draft <idea>

Generate template-based drafts.

xboost draft "building in public" --type thread
xboost draft "startup fail" --type story

xboost check <url>

Get template-based suggestions for a URL (use generate for AI version).

xboost check https://x.com/user/status/123

Example Workflows

Quick post from an idea

# AI optimizes your rough thought into 4 variations
xboost optimize "finally figured out why my docker builds were slow"
# Pick your favorite, copy, post!

Share an interesting link

# AI generates multiple angles to share the link
xboost generate https://interesting-article.com

Reply to an interesting tweet

# AI generates smart reply options
xboost reply-gen https://x.com/someone/status/123
# Pick the best one, post via bird:
bird reply https://x.com/someone/status/123 "your chosen reply"

Create a thread

# AI generates a complete thread
xboost thread "5 things I learned building my startup"
# Post via bird:
bird tweet "first tweet of thread"
bird reply <tweet-id> "second tweet"
# etc.

Improve before posting

# Score your draft
xboost score "my draft post here"

# If score is low, get AI improvements
xboost improve "my draft post here"

Automated daily content pipeline

# 1. Generate posts in the morning
xboost prose "AI agents" "startup lessons" "building in public"
# → Creates 12 post variations (4 per topic), all scored

# 2. Review and approve (manual or AI)
xboost queue --status pending  # Preview pending posts
xboost approve                 # AI reviews and approves quality posts

# 3. Check what's ready to post
xboost queue                   # View approved queue

# 4. Post when ready
xboost lobster                 # Posts highest-scoring approved post
xboost lobster --dry-run       # Preview without posting

# 5. Monitor
xboost lobster --stats         # See posting statistics
xboost lobster --failed        # Check for any failures

Or set up cron for full automation - See PROSE_GUIDE.md

Environment Variables

Variable Description
ANTHROPIC_API_KEY Claude API key for AI features
CLAUDE_API_KEY Alternative name for API key

Algorithm Best Practices

Content Length

  • Sweet spot: ~100 characters
  • Thread when: >200 characters

Posting Rhythm

  • Min gap: 30 minutes (avoid flood penalty)
  • Ideal gap: 2+ hours
  • Max effective/day: ~5 posts

High-Performing Content Types

  1. Personal stories
  2. Hot takes (contrarian views)
  3. Tutorials & tips
  4. Behind-the-scenes
  5. Data visualizations
  6. Curated threads

Effective Hooks

  • "I spent X hours/days/years..."
  • "Here's what nobody tells you about..."
  • "The biggest mistake I see..."
  • "Unpopular opinion:"
  • "X things I learned from..."

License

MIT

Credits

Created by Yossi Elkrief (@MaTriXy)

Powered by:

About

X Content Optimization Tool - Powered by X algorithm insights + bird CLI + AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors