content-cleanup

content-cleanup is a skill for Claude Code, Codex from nirholas/XActions. It costs 73 tokens per session (1,331 once invoked), scanned A, original, Apache-2.0.

A collection of browser scripts for removing unwanted history and followers from an X/Twitter account. It works with posts, replies, likes, reposts, bookmarks, and selected followers.

In plain words
What is it for?
Use it to delete posts found by search or profile filters, remove likes and reposts, clear bookmarks, or soft-block selected followers.
Why use it?
X does not provide a general bulk-cleanup tool for these actions. The scripts help handle matching or repeated items without removing them one by one.

Skill for Claude CodeCodex

Part of the xactions plugin — 47 skills, 1 command, 6 agents, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nirholas/xactions/content-cleanup
Any agent
npx skills add nirholas/XActions --skill content-cleanup
Clone the repo
git clone --depth 1 https://github.com/nirholas/XActions

Made for: Claude Code, Codex.

Or install xactions, the plugin that ships this one along with the rest of its 47 skills, 1 command, 6 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for content-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/xactions/content-cleanup.svg)](https://agentmods.dev/skills/nirholas/xactions/content-cleanup)
Your own site
<a href="https://agentmods.dev/skills/nirholas/xactions/content-cleanup"><img src="https://agentmods.dev/badge/skills/nirholas/xactions/content-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00073 $0.01331
Opus 5 $0.00036 $0.00665
Sonnet 5 $0.00015 $0.00266
Haiku 4.5 $0.00007 $0.00133

Measured 4d ago against content hash 47445731b785, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

content-cleanup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/content-cleanup/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Content Cleanup with XActions

Browser console scripts for mass-cleaning your X/Twitter account history.

Available Scripts

Script File Purpose
Search Sweep scripts/searchSweep.js Delete (or like/repost/reply to) every post an X search returns
Bulk Delete Tweets src/bulkDeleteTweets.js Delete your own posts from your profile timeline by age, keyword, or engagement
Unlike All Posts src/unlikeAllPosts.js Remove all likes from your likes page
Clear All Reposts src/clearAllReposts.js Remove all retweets/reposts
Clear All Bookmarks src/clearAllBookmarks.js Remove all saved bookmarks
Remove Followers src/removeFollowers.js Soft-block to remove specific followers

File: scripts/searchSweep.js (full guide: docs/search-sweep.md)

The one to reach for when the user wants "delete every reply I sent @someone", "remove all my posts mentioning X", or "delete everything I posted before 2024". X has no bulk tool for that, but its search finds the posts:

https://x.com/search?q=from%3AYOUR_HANDLE%20%40someone&src=typed_query&f=live

How to use

  1. Open that search on x.com (use the Latest tab, f=live; Top ranking hides most results)
  2. Open DevTools (F12) then Console
  3. Paste scripts/searchSweep.js. A panel appears bottom-right, pre-filled with the query already in the address bar
  4. Pick the action: Delete, Like, Repost, or Reply. Leave Dry run ON and click Start
  5. Read the log, untick Dry run, start again

What to tell the user

  • Delete only ever touches their own posts. Anything by another account is refused.
  • It needs more than one run. X search returns a slice at a time and its index lags deletions by minutes. The script re-runs the query for several passes and remembers every id it acted on, so running it again a day later only picks up stragglers.
  • Filters protect posts worth keeping: minimum age, likes/reposts ceiling, keyword exclusions, and the pinned post is always skipped.
  • Deletion is permanent. Back up first with scripts/backupAccount.js.

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 157 lines · 73 tokens per session scan A 47445731b785

Subscribe to this mod's changes

content-cleanup is a skill published in the GitHub repository nirholas/XActions (502 stars, last pushed 6d ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,331 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.