Tutorial: Mass Block, Unblock, Mute & Spam Protection with Claude
You are my X/Twitter safety and moderation expert. I want to use XActions to block bots, mute noisy accounts, manage muted words, report spam, and keep my timeline clean. Help me set up comprehensive account protection.
Context
I'm using XActions (https://github.com/nirholas/XActions), an open-source X/Twitter toolkit with blocking, muting, and moderation features — both via MCP tools and browser console scripts.
What I Need You To Do
Part 1: Bot Detection & Mass Blocking
Help me identify and block bot/spam accounts:
Audit my followers for bots using
x_get_followers:- Pull my followers list
- Identify suspicious accounts based on:
- No profile picture (default avatar)
- No bio or generic bio
- Following thousands, very few followers
- Account created recently
- Username looks auto-generated (random letters/numbers)
- Present a list of suspected bots
Mass block bots using the
blockBots.jsbrowser script:- Navigate to follower list
- Paste core.js, then blockBots.js
- The script identifies and blocks suspected bot accounts
- Configurable detection criteria
Using MCP to block — Block accounts one by one with targeted approach:
"Block these accounts: @bot1, @bot2, @bot3"Block list from notification spam:
- Use
x_get_notificationsto check for spam notifications - Identify patterns (accounts that mass-like old tweets, spam DMs)
- Mass block the offenders
- Use
Part 2: Mass Block Script
Walk me through src/massBlock.js:
Use case: Block a list of specific accounts or block based on criteria
Navigate to the account you want to block or use a prepared list
How it works:
- Takes a list of usernames to block
- Navigates to each profile
- Clicks the ⋯ menu → Block
- Confirms the block
- Waits between blocks to avoid rate limits
- Logs all blocks
Common blocking scenarios:
- Block all accounts from a harassment campaign
- Block accounts that follow a specific spam account
- Block accounts that reply with scams/spam to your tweets
Part 3: Mass Unblock
When you've overblocked or want to start fresh, use src/massUnblock.js:
Check your blocked list using
x_get_blocked:"Show me all my blocked accounts"Review and selectively unblock:
- Some blocks are deserved, some might have been mistakes
- The script can unblock in bulk
Full reset: Unblock everyone and start with a clean slate
Part 4: Muting Users
For accounts you don't want to block but don't want to see:
Mute via MCP using
x_mute_user:"Mute these accounts: @annoying1, @annoying2"Mass unmute using
x_unmute_userorsrc/massUnmute.js:"Unmute @user1"Or bulk unmute when your mute list gets too long
When to mute vs block:
- Mute: You don't want to see their content but don't want drama. They won't know.
- Block: You want them completely cut off. They'll see they're blocked.
- Hide reply: You want to hide a specific reply without blocking
Part 5: Keyword Muting
Control your timeline with src/muteByKeywords.js and src/manageMutedWords.js:
Mute specific keywords/phrases:
- Words that trigger you or cause negative experiences
- Spoilers for shows/events
- Political topics you want to avoid
- Spam phrases
Configure
muteByKeywords.js:- Navigate to Settings → Privacy → Muted → Muted words
- Or use the script to add muted words programmatically
- Set duration: Forever, 24 hours, 7 days, 30 days
Manage muted words with
manageMutedWords.js:- View all currently muted words
- Add new words in bulk
- Remove words that are no longer relevant
- Export your mute list
Smart muting strategies:
- Mute during major events you don't care about (sports, elections, awards)
- Mute spam patterns ("DM me", "check my pinned", "airdrop")
- Mute negative trigger words
- Unmute after events pass
Part 6: Report Spam
For accounts actively spamming or harassing, use src/reportSpam.js:
How it works:
- Identifies spam accounts from your mentions/notifications
- Reports them to X for review
- Optionally blocks after reporting
What qualifies for reporting:
- Crypto scam replies
- Impersonation accounts
- Accounts posting harmful content
- Mass-spam accounts
Using MCP to monitor for spam:
"Check my recent notifications for spam patterns" "Search for recent replies to my tweets — are there any spam accounts?"
Part 7: Removing Unwanted Followers
Use src/removeFollowers.js to remove followers you don't want:
Why remove followers?
- Bot followers that hurt your engagement rate
- Toxic accounts you don't want associated with your profile
- Ex-employees, ex-partners, or people you want to distance from
How it works:
- Block then immediately unblock — this removes them as a follower
- They won't get a notification
- They can follow you again unless you keep them blocked
Follower cleanup strategy:
- Audit followers monthly
- Remove obvious bots
- Remove inactive accounts (improve engagement metrics)
- Keep your follower quality high
Part 8: MCP Tools for Safety
Quick reference for MCP-based moderation:
- Block: Use MCP tools or script
- Mute user:
x_mute_user"Mute @username" - Unmute user:
x_unmute_user"Unmute @username" - Get blocked list:
x_get_blocked"Show me my blocked accounts" - Privacy toggle:
x_toggle_protected"Make my account private" "Make my account public" - Settings check:
x_get_settings"Show me my current privacy settings"
Part 9: Proactive Protection Setup
Set up ongoing protection:
Brand monitoring using
x_brand_monitor:"Monitor mentions of my username for negative sentiment"- Catch harassment early
- Identify coordinated attacks
- Block offending accounts quickly
Notification filtering using
x_get_notifications:- Regular checks for spam patterns
- Auto-identify new bot followers
- Track unusual activity spikes
Privacy lockdown checklist:
- Review who can DM you
- Review who can tag you in photos
- Check if email/phone is discoverable
- Review connected apps
- Use
x_get_settingsto audit everything
Part 10: Emergency Response
If you're being harassed or brigaded:
Immediate actions:
- Toggle account to protected:
x_toggle_protectedwithenabled: true - This stops new followers and hides your tweets from non-followers
- Toggle account to protected:
Block the source:
- Block the main instigator(s)
- Block accounts replying with harassment
Report to X:
- Use reportSpam.js for mass reporting
- Document everything (screenshot before blocking)
Recovery:
- Wait for the storm to pass
- Unprotect account when ready
- Review and update your block/mute lists
- Consider adjusting privacy settings long-term
My Safety Needs
(Replace before pasting)
- Am I being harassed? Yes/No
- Estimated bot followers: ROUGH_NUMBER
- Keywords I want to mute: keyword1, keyword2
- Accounts to block: @acc1, @acc2 (or "help me identify them")
- Privacy level: Open, Moderate, Strict
Start with Part 1 — help me audit my followers for bots and clean up my account.
⚡ Explore XActions
100% free and open-source. No API keys, no fees, no signup.
Browse All Documentation