Remove AI provenance marks from content you own: invisible Unicode carriers (zero-width, bidi, tag chars, variation selectors, exotic spaces, homoglyphs), long dashes, and AI co-authorship trailers in commit messages. Use when the user asks to clean invisible characters, strip AI watermarks or metadata from text they own, sanitize a file or a whole directory, or remove "Co-Authored-By" AI lines. The deterministic layer is verifiable; statistical token-sampling marks are best-effort via a rewr...
Installs into .claude/skills of the current project.
Are you the author of Content Scrubber?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/fmarzochi-content-scrubber)
---
name: content-scrubber
description: >
Remove AI provenance marks from content you own: invisible Unicode carriers
(zero-width, bidi, tag chars, variation selectors, exotic spaces, homoglyphs),
long dashes, and AI co-authorship trailers in commit messages. Use when the
user asks to clean invisible characters, strip AI watermarks or metadata from
text they own, sanitize a file or a whole directory, or remove "Co-Authored-By"
AI lines. The deterministic layer is verifiable; statistical token-sampling
marks are best-effort via a rewrite workflow and are never claimed undetectable.
---
# Content Scrubber
Deterministic hygiene for text you own or are authorized to process. Two modes:
- **Automatic (the default):** the Scrubber write hook cleans files as they are
written, and a commit hook removes AI co-authorship before a commit closes.
Nothing to invoke; it ships with EGC and turns on at `egc init`.
- **Manual (this skill):** clean files that already exist, a whole directory, or
pasted text on demand.
## What it removes, and how honest to be
Guaranteed and verifiable (counted before/after):
- Invisible Unicode carriers: zero-width family, word joiner, BOM, bidi
controls that are not legitimate, tag characters, variation selectors,
private-use characters, soft hyphen, interlinear annotation.
- Space look-alikes (NBSP, en/em space, ideographic space, ...) normalized to a
plain space.
- Cross-script letter look-alikes (Cyrillic/fullwidth) in `--aggressive` mode.
- Long dashes (em dash, en dash, figure dash, horizontal bar) turned into safe
punctuation. The ASCII hyphen and the mathematical minus are left alone.
- AI co-authorship / "generated by AI" trailers in commit messages. Human
co-authors are kept.
Best-effort, never guaranteed (see `references/rewrite-workflow.md`): statistical
token-sampling text watermarks live in word choice, not in characters, and can
only be reduced by rewriting. No tool can certify a vendor detector will fail.
Out of scope: pixel/audio/video watermarks, C2PA soft binding, model backdoors.
## Load-bearing invisibles are preserved
The engine keeps invisibles that carry meaning: emoji joiners and variation
selectors, script joiners inside complex scripts (Persian, Devanagari), complete
flag tag sequences, same-script fillers (Mongolian, Khmer, Hangul), and RTL
directional marks and paired embeddings. It only strips free-floating carriers.
## Manual workflow
Resolve `CLI` to the scrubber CLI that ships with EGC:
`scripts/hooks/scrubber-cli.js` under your EGC install.
Inspect first (decide, do not guess):
```bash
node "$CLI" inspect path/to/file
```
It prints a JSON report: suspicious codepoints with counts, sample offsets, and
a confidence label (`probable` for carriers, `informational` for spaces).
Clean (writes `*.cleaned.EXT` by default; `--in-place` to overwrite, `-o` to
choose the output):
```bash
node "$CLI" clean path/to/file # -> path/to/file.cleaned.ext
node "$CLI" clean path/to/file --in-place
cat file | node "$CLI" clean - # stdin to stdout
```
Flags: `--aggressive` (normalize cross-script look-alikes; can change legitimate
multilingual text, so ask first), `--no-dashes` (keep long dashes), `--json`
(print the stats report).
Binary input is refused: the CLI will not treat a PNG, PDF, or zip as text.
Rewrite (Layer B, statistical marks, best-effort): prints a rewrite prompt for
you to run. There is no network and no bundled model, so you are the rewrite
model; prefer a model from a different vendor than the one that wrote the text.
```bash
node "$CLI" rewrite path/to/file --strength paraphrase
```
Strengths: `paraphrase` (default), `humanize`, `code` (natural-language parts of
source only), `backtranslate`, `structural`. Run the printed prompt, then clean
the result again with `clean`. This reduces statistical marks and you can measure
the divergence, but it never certifies a vendor detector will fail (see
`references/rewrite-workflow.md`).
## Report honestly
State what was verifiably removed (counts, by kind) and, if a rewrite was done,
that it is best-effort. Never claim the result proves human authorship or is
undetectable. Only process content the user owns or is authorized to process
(`references/ethics.md`).
Read if needed: `references/mark-classes.md` (the mark families),
`references/coverage.md` (guaranteed vs best-effort), `references/ethics.md`
(responsible use), `references/rewrite-workflow.md` (statistical marks).