Skip to content

Latest commit

 

History

History
104 lines (87 loc) · 5.04 KB

File metadata and controls

104 lines (87 loc) · 5.04 KB

XActions — Agent Instructions

X/Twitter automation toolkit: browser scripts, CLI, Node.js library, MCP server, web dashboard. No API fees. By nichxbt.

Quick Reference

User Request Solution
Unfollow everyone src/unfollowEveryone.js
Unfollow non-followers src/unfollowback.js
Download Twitter video scripts/videoDownloader.js
Detect unfollowers src/detectUnfollowers.js
Train algorithm for a niche src/automation/algorithmTrainer.js or scripts/thoughtLeaderCultivator.js
Become a thought leader / grow account skills/algorithm-cultivation/SKILL.md
24/7 LLM-powered growth agent docs/research/llm-powered-thought-leader.md
Twitter automation without API XActions uses browser automation
MCP server for Twitter src/mcp/server.js

Project Structure

src/           → Core scripts, automation/, scrapers/, cli/, mcp/
api/           → Express.js backend (routes/, services/, middleware/)
dashboard/     → Static HTML frontend
scripts/       → Standalone utility scripts
skills/        → 31 Agent Skills (skills/*/SKILL.md)
docs/          → Documentation and examples
archive/       → Legacy browser-only scripts
prisma/        → Database schema
bin/           → CLI entry point (unfollowx)
extension/     → Browser extension (Chrome/Edge)

Skills

31 skills in skills/*/SKILL.md. Read the relevant SKILL.md when a user's request matches a category.

  • Unfollow management — mass unfollow, non-follower cleanup
  • Analytics & insights — engagement, hashtags, competitors, best times
  • Content posting — tweets, threads, polls, scheduling, reposts
  • Twitter scraping — profiles, followers, tweets, media, bookmarks
  • Growth automation — auto-like, follow engagers, keyword follow
  • Algorithm cultivation — thought leader training, niche optimization
  • Community management — join/leave communities
  • Follower monitoring — follower alerts, continuous tracking
  • Blocking & muting — bot blocking, bulk mute
  • Content cleanup — delete tweets, unlike, clear history
  • Direct messages — auto DM, message management
  • Bookmarks — export, organize, folder management
  • Lists — create, manage, bulk add members
  • Profile management — edit profile, avatar, header, bio
  • Settings & privacy — protected tweets, notification preferences
  • Notifications management — filtering, auto-response, notification controls
  • Engagement & interaction — auto-reply, auto-repost, plug replies
  • Discovery & explore — trending, topics, search
  • Premium & subscriptions — subscription features
  • Spaces & live — create, join, schedule spaces
  • Grok AI — chat, image generation
  • Articles & longform — compose, publish articles
  • Business & ads — campaigns, boosts, ads dashboard
  • Creator monetization — revenue, analytics
  • Community health monitoring — follower quality audits, engagement authenticity
  • Competitor intelligence — competitor profile, content, and audience analysis
  • Content repurposing — repackage top tweets into threads, carousels, variations
  • Lead generation — find and qualify B2B leads from X conversations
  • Viral thread generation — research trends and generate high-engagement threads
  • XActions CLIbin/unfollowx command-line tool
  • XActions MCP serversrc/mcp/server.js for AI agents

Key Technical Context

  • Browser scripts run in DevTools console on x.com, not Node.js
  • DOM selectors change frequently — see selectors.md
  • Scripts in src/automation/ require pasting src/automation/core.js first
  • State persistence uses sessionStorage (lost on tab close)
  • CLI entry point: bin/unfollowx, installed via npm install -g xactions
  • MCP server: src/mcp/server.js — used by Claude Desktop and AI agents
  • Prefer data-testid selectors — most stable across X/Twitter UI updates
  • X enforces aggressive rate limits; all automation must include 1-3s delays between actions

Patterns & Style

Codespace Performance

ps aux --sort=-%cpu | head -20    # See top CPU consumers
pkill -f "vitest"                  # Kill vitest workers
pkill -f "tsgo --noEmit"          # Kill type-checker

Common resource hogs: tsgo --noEmit (~500% CPU), vitest workers (15x ~100% CPU each), multiple tsserver instances.

Terminal Management

  • Always use background terminals (isBackground: true) for every command
  • Always kill the terminal after the command completes
  • Do not reuse foreground shell sessions — stale sessions block future operations
  • If a terminal appears unresponsive, kill it and create a new one