{"id":51011597,"url":"https://github.com/junaire/x-reply-clean-skill","last_synced_at":"2026-06-21T03:30:23.979Z","repository":{"id":359993636,"uuid":"1248268852","full_name":"junaire/x-reply-clean-skill","owner":"junaire","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-24T13:55:26.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T15:04:18.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junaire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T12:20:44.000Z","updated_at":"2026-05-24T13:55:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/junaire/x-reply-clean-skill","commit_stats":null,"previous_names":["junaire/x-reply-clean-skill"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/junaire/x-reply-clean-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fx-reply-clean-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fx-reply-clean-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fx-reply-clean-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fx-reply-clean-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junaire","download_url":"https://codeload.github.com/junaire/x-reply-clean-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junaire%2Fx-reply-clean-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34593128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-21T03:30:23.441Z","updated_at":"2026-06-21T03:30:23.974Z","avatar_url":"https://github.com/junaire.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X Reply Cleaner\n\nBlock scammer accounts on X from the X scammer blacklist service.\n\n## Requirements\n\n- macOS\n- Google Chrome\n- Node.js\n- Chrome is logged in to the X account that should block scammers\n\nThe script only supports macOS + Chrome because it reads Chrome cookies from the macOS keychain and Chrome profile database.\n\n## Run Once\n\n```sh\nnode scripts/block-scammers.mjs\n```\n\nThe default run is intentionally conservative:\n\n- fetches up to 100 user ids per batch\n- waits 1500 ms between block requests\n- prints compact progress every 25 handled accounts\n- stops immediately if X returns a rate limit response\n- advances the cursor after each blocked or already-gone account\n\n## Cursor\n\nThe blacklist endpoint accepts `after=\u003cuser_id\u003e`. The script automatically stores the last handled `user_id` in:\n\n```text\n~/.x-reply-cleaner.cursor\n```\n\nOn the next run, the saved value is sent as `after`, so the blacklist service can continue after the previous run's last handled account and avoid repeat work.\n\nThe cursor advances after each account that is blocked or already gone from X. If a block request fails with a real blocker, such as rate limiting or an unexpected API error, the run stops and saves the cursor at the last account that was actually handled. The failed account is retried by a later run.\n\n`404 User not found` from X is treated as resolved and counted as `skipped_not_found`, because there is no remaining account to block.\n\nUseful cursor options:\n\n```sh\nnode scripts/block-scammers.mjs --cursor-file ~/.x-reply-cleaner.cursor\nnode scripts/block-scammers.mjs --no-cursor\n```\n\n## Scheduled Run\n\nRecommended: run it once per day with a scheduled task.\n\nFor scheduled or long-running use, enable persisted cookies:\n\n```sh\nnode scripts/block-scammers.mjs --persist-cookie\n```\n\nThis reads `X_COOKIE` from `~/.x-reply-cleaner.env`. If the file does not exist, or if the saved cookie is malformed or rejected by X, the script refreshes the cookie from Chrome and writes the file again with restricted permissions.\n\nExample cron entry for running once per day at 03:15:\n\n```cron\n15 3 * * * cd /path/to/x-reply-clean-skill \u0026\u0026 /usr/local/bin/node scripts/block-scammers.mjs --persist-cookie \u003e\u003e \"$HOME/Library/Logs/x-reply-cleaner.log\" 2\u003e\u00261\n```\n\nUse the actual absolute paths for this skill directory and your Node binary.\n\n## Runtime\n\nThis script is intentionally slow. It blocks accounts one by one and waits between requests so it is gentler on X. The default delay is 1500 ms per account, and X network latency can add more time.\n\nAdjust the delay only when needed:\n\n```sh\nnode scripts/block-scammers.mjs --persist-cookie --delay-ms 3000\n```\n\nFor a longer unattended run, process multiple batches and pause between them:\n\n```sh\nnode scripts/block-scammers.mjs --persist-cookie --max-batches 5 --batch-sleep-ms 300000\n```\n\nIf X returns `429 Rate limit exceeded`, the script stops immediately and prints a suggested slower retry command.\n\n## Options\n\n```sh\nnode scripts/block-scammers.mjs --help\n```\n\nUseful options:\n\n- `--api \u003curl\u003e`: blacklist endpoint URL.\n- `--limit \u003cn\u003e`: pass `limit=\u003cn\u003e` to the blacklist endpoint per batch, default 100.\n- `--chrome-profile \u003cdir\u003e`: Chrome profile directory, default `Default`.\n- `--persist-cookie`: read/write `~/.x-reply-cleaner.env`; recommended for scheduled runs.\n- `--cursor-file \u003cpath\u003e`: read/write the saved `after` cursor, default `~/.x-reply-cleaner.cursor`.\n- `--no-cursor`: do not read, pass, or update the saved cursor.\n- `--dry-run`: preview accounts without blocking.\n- `--delay-ms \u003cms\u003e`: delay between X block requests, default 1500.\n- `--max-batches \u003cn\u003e`: fetch and process up to `n` batches in one run, default 1.\n- `--batch-sleep-ms \u003cms\u003e`: delay between batches.\n- `--verbose`: print one line per account.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaire%2Fx-reply-clean-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaire%2Fx-reply-clean-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaire%2Fx-reply-clean-skill/lists"}