unfollow-management
Unfollow Management
Browser console scripts for managing who you follow on X/Twitter. All scripts run in DevTools console.
Script Selection
| Goal | File | Navigate to |
|---|---|---|
| Unfollow ALL accounts | src/unfollowEveryone.js |
x.com/USERNAME/following |
| Unfollow only non-followers | src/unfollowback.js |
x.com/USERNAME/following |
| Unfollow non-followers + download log | src/unfollowWDFBLog.js |
x.com/USERNAME/following |
| Time-based smart unfollow with whitelist | src/automation/smartUnfollow.js |
x.com/USERNAME/following |
| Detect who unfollowed you | src/detectUnfollowers.js |
x.com/USERNAME/followers |
| Monitor follow/following ratio + plan | src/followRatioManager.js |
x.com/USERNAME |
| Remove specific followers from YOUR list | src/removeFollowers.js |
x.com/USERNAME/followers |
Script Details
For detailed algorithms, controls, configurations, and DOM selectors for each script, see references/script-details.md.
Rate Limiting & Safety
- Default delay: 1–2 seconds between unfollows (gaussian randomized)
- Batch delay: 2–3 seconds between scroll batches
- Rate limit detection: Scripts check for
[data-testid="toast"]warning banners - Backoff: If rate limited, scripts wait 30–60 seconds before retrying
- Daily limit guidance: X may restrict after ~400 unfollows/day; spread over multiple sessions
- Recovery: If action-restricted, wait 12–24 hours
Strategy Guide
Cleaning a bloated following list
- Run
src/followRatioManager.json your profile to assess current ratio - Use
XActions.plan()to see how many unfollows are needed - Run
src/unfollowback.jsto remove non-followers first (safest) - If more cleanup needed, use
src/unfollowEveryone.jswith abort when satisfied - Re-check ratio with
XActions.track()
Maintaining a healthy ratio over time
- Set up periodic runs of
src/detectUnfollowers.jsto track losses - Use
src/followRatioManager.jsweekly to monitor trends - Run
src/unfollowback.jsmonthly to remove non-reciprocal follows - Keep a whitelist in
smartUnfollow.jsfor accounts you always want to follow
Before a big unfollow session
- Export your following list first:
scripts/scrapeFollowing.js - Run
src/unfollowWDFBLog.js(saves log of who was unfollowed) - Review the downloaded log for any mistakes
- Use
src/followRatioManager.jsto verify improvements
Troubleshooting
| Problem | Solution |
|---|---|
| "No unfollow buttons found" | Make sure you're on the Following page, not Followers |
| Script stops after ~20 unfollows | X rate limit triggered — wait 1 hour and re-run |
| Confirmation dialog doesn't appear | DOM may have changed — check confirmationSheetConfirm selector |
| Script unfollows mutuals | Use unfollowback.js instead of unfollowEveryone.js |
| "Action restricted" warning | Account is temporarily limited — wait 12-24 hours |
| Script misses accounts | Re-run the script — some load below the scroll area |
Related Skills
- follower-monitoring — Track follower growth and detect unfollowers
- blocking-muting-management — Block/unblock for removing followers
- growth-automation — Grow followers to improve ratio organically
- analytics-insights — Understand engagement before unfollowing
More from nirholas/xactions
twitter-scraping
Scrapes X/Twitter data without API access using Puppeteer stealth and browser console scripts. Extracts profiles, followers, following lists, tweets, search results, hashtags, threads, media, bookmarks, notifications, DMs, likes, and viral tweets. Exports to JSON/CSV. Use when collecting, exporting, or analyzing Twitter data.
25direct-messages
Sends, manages, and automates direct messages on X/Twitter. Supports personalized bulk DMs with templates, conversation management, message request filtering, and DM export. The agent uses this skill when a user needs to send DMs, manage conversations, or automate direct messaging workflows.
10growth-automation
Automates X/Twitter growth via browser console scripts. Auto-likes tweets by keyword/user filters, auto-comments on target users, follows by keyword search or engagement, follows audiences of target accounts with rich filtering, trains the algorithm for niches, and runs combined growth suites. All require pasting core.js first. Use when automating Twitter growth, engagement, following, or audience building.
10engagement-interaction
Automates X/Twitter engagement actions — like, unlike, reply, bookmark, hide replies, and auto-like by keyword. Also bulk-unlikes all posts. Use when users want to automate likes, send replies, manage bookmarks on tweets, hide replies, or clear their entire likes history.
10follower-monitoring
Monitors X/Twitter follower changes using browser console scripts. Detects who unfollowed, tracks new followers with welcome messages, monitors any public account, runs continuous monitoring with alerts, tracks follower growth over time, and analyzes follower demographics. Use when tracking follower changes, detecting unfollowers, or monitoring Twitter accounts.
9grok-ai
Integrates with X/Twitter's Grok AI for chat, image generation, tweet analysis, and content creation. Automates Grok prompts, scrapes Grok responses, and uses Grok for content strategy. Requires X Premium+. Use when users want to use Grok AI for content generation, analysis, or chat automation on X.
8