scrub

scrub is a skill for Claude Code from jnPiyush/AgentX. It costs 39 tokens per session (1,578 once invoked), scanned A, original, Apache-2.0.

A cleanup pass for recently generated or heavily changed code that looks repetitive, overcomplicated, or machine-written.

In plain words
What is it for?
It is for polishing code after generation or refactoring, before a pull request, or before handing work to a reviewer.
Why use it?
It removes distracting comments, generic wording, and unnecessary structure before code review without changing behavior.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit It is for polishing code after generation or refactoring, before a pull request, or before handing work to a reviewer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jnpiyush/agentx/scrub
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.

Any agent
npx skills add jnPiyush/AgentX --skill scrub
Clone the repo
git clone --depth 1 https://github.com/jnPiyush/AgentX

Made for: Claude Code.

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 scrub

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnpiyush/agentx/scrub/github.svg)](https://agentmods.dev/skills/jnpiyush/agentx/scrub)
Your own site
<a href="https://agentmods.dev/skills/jnpiyush/agentx/scrub"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/scrub/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scrub

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/scrub"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/scrub.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00039 $0.01578
Opus 5.5 $0.00016 $0.00631
Sonnet 5.5 $0.00008 $0.00316
Haiku 4.5 $0.00004 $0.00158

Measured 1mo ago against content hash 5cf1845ab601, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scrub 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 1mo 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.

.github/skills/development/scrub/SKILL.md · 172 lines

How it starts

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

Scrub

Core Rules

Local loop/review scrubs are read-only advisory scans. Cosmetic lint/style findings are LOW and are not Done Criteria. Report them and explicitly ask the user before cleanup; no answer is not approval. Use -Advisory, never -Fix during the unapproved scan. See .github/AGENT-PROTOCOL.md section 4.

Do not reclassify real build, correctness, security, reliability or accessibility defects as cosmetic lint. Independent default/production, CI and commit gates remain unchanged; report their failures rather than claiming they passed.

When to Use / Not Use

Use after generation, refactor, or a large patch; before a PR or review handoff; after approval but before merge; periodically on machine-heavy directories. No prerequisites -- it runs standalone through the Frontier CLI.

When NOT to Use

  • During active debugging -- focus on correctness first
  • On generated code that is intentionally machine-owned (build output, OpenAPI clients)
  • On vendored third-party files
  • As a substitute for code review -- scrub catches presentation, review catches behavior

What Counts As Slop

Category Examples Proposed cleanup after approval
Comment rot // This function handles the logic for X, // Helper to do thing, naked // TODO Delete
Restating the obvious // Increment counter above counter++ Delete
Dead code Commented-out code blocks of 4+ code-like lines Delete
AI filler phrasing Phrases like "Note that", "To", or "Next" when they add no meaning Rewrite or delete
Duplicate logic Repeated normalized code blocks within one file Consolidate manually (flag only)
Over-abstraction Single-use interface, factory wrapping one constructor, getter-only class Inline manually (flag only)
Generic UI defaults bg-gradient-to-r from-purple-500 to-blue-500, placeholder lorem ipsum Replace with brand palette (flag only)
Stale boilerplate Created by ... on ..., Last modified by ... Delete
Empty try/catch catch (e) { /* ignore */ } with no logging Flag for review

Read the full file on GitHub · 172 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. 1mo ago Changed · +18 lines · -16 tokens per session 5cf1845ab601
  2. 2mo ago Changed 44436fc8d878
  3. 2mo ago Changed · +67 lines · -1 tokens per session 6369cbc34713
  4. 2mo ago Changed · -97 lines · +1 tokens per session 1c10785c91df
  5. 2mo ago First seen · 184 lines · 55 tokens per session scan A b2f2ace7668a

Subscribe to this mod's changes

scrub is a skill published in the GitHub repository jnPiyush/AgentX (19 stars, last pushed today), licensed Apache-2.0. It adds 39 tokens to every session and 1,578 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

scrub compared with skills from other repositories

scrub next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
scrubjnPiyush/AgentXSkill19todayApache-2.0A39Claude Code
autoreviewopenclaw/clawhubSkill9.6ktodayMITA17Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill6.2ktodayMITA18Claude Code
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k9d agoMITA115Claude Code, Codex
asplos-writing-stylebrycewang-stanford/Awesome-Journal-SkillsSkill1.5k2d agoMITA65Claude Code
revdiff-planumputun/revdiffSkill9742d agoMITA84Claude Code
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex