agentleFS
CommsConnectgmbhCommsConnectgmbh/claude-starter-kit/skills/hygiene/SKILL.md

hygiene

Skill0 starsChanged 5 months agoMITView on GitHub

Find and remove invisible Unicode characters from text (zero-width, bidi/Trojan-Source, Unicode tags, exotic spaces) and metadata from images (EXIF/GPS, XMP, PNG text chunks). Use before sending mail, letters or marketing copy, before CSV imports, when a search mysteriously finds nothing, before uploading user photos, and as a deterministic pre-filter for anything from an untrusted source that reaches an LLM. Trigger phrases: 'invisible characters', 'zero width', 'unsichtbare Zeichen', 'komische Zeichen im Text', 'strip EXIF', 'EXIF entfernen', 'GPS aus Foto', 'remove metadata', 'Metadaten strippen', 'clean this text', 'hygiene'. NOT a watermark remover — see the last section.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. cpkt9762/opencode-vscode-ide★ 17same name
    2. dustinkeeton/wafflestack★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No dependencies. Python standard library only, so it runs wherever Python does.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/hygiene — clean what you cannot see

One tool, two directions: what goes out is clean, what comes in is defused.

python3 ~/.claude/skills/hygiene/scripts/hygiene.py <mode> [target...] [options]
ModePurpose
scanInspect text, reports line:column + codepoint. Exit 1 on a finding (CI/hook friendly)
cleanClean text to stdout, or in place with -i
img-scanShow image metadata. Exit 1 on a finding
img-cleanRemove image metadata, losslessly (pixels stay byte-identical)

Options: --clip (read from and write back to the clipboard, macOS pbpaste/pbcopy), -i (in place), --spaces (normalize exotic spaces), --aggressive (also drop the ICC color profile), -q (summary only).

No dependencies. Python standard library only, so it runs wherever Python does.

The common case

Mail or letter finished, before sending:

python3 ~/.claude/skills/hygiene/scripts/hygiene.py clean --clip

Reads the clipboard, cleans it, puts it back. Then paste as usual.

What gets removed

Always — never legitimate in running text:

  • Zero-width characters, word joiner, soft hyphen, BOM (U+200B–200D, U+2060, U+00AD, U+FEFF)
  • Bidi control characters (U+202A–202E, U+2066–2069) — the basis of Trojan Source, where what you see differs from what is actually there
  • The Unicode tag block (U+E0000–E007F) — fully invisible, can hide entire sentences

Only with --spaces — non-breaking space and friends survive by default, because they are legitimate typography in many languages (5 %, z. B., number + unit).

Images: EXIF (including GPS, camera make, model, timestamp), XMP, JPEG comments, PNG tEXt/zTXt/iTXt/eXIf. JFIF stays (harmless, some decoders expect it). The ICC color profile stays unless you pass --aggressive — removing it shifts colors.

One thing that must survive: EXIF orientation. Phone cameras often store the image sideways and record the rotation only in tag 0x0112. Strip the whole EXIF block and a portrait photo shows up rotated. img-clean therefore writes back a minimal EXIF segment carrying that single tag — 36 bytes instead of often several hundred. img-scan does not report such a segment as a finding, so scanning stays quiet after cleaning.

Why this matters

  • Before sending. Invisible characters survive copy-paste out of any chat window and show up as boxes or ? on the recipient's screen.
  • Before CSV import. A BOM or non-breaking space in the header row breaks column matching, and the error message never mentions it.
  • When search finds nothing. A zero-width space inside a word, and no LIKE, no includes() and no user will ever find that record again.
  • Before uploading photos. Phone pictures carry GPS coordinates. Anything user-uploaded that lands in a public bucket publishes the location it was taken at.
  • As an LLM pre-filter. Hidden instructions in foreign mail, PDFs or images are the standard carrier for indirect prompt injection (OWASP LLM01, MITRE ATLAS AML.T0051.001). This is the cheap deterministic first pass, not a replacement for a detector model.

As a hook or in CI

scan exits 1 on a critical finding, which makes it usable as a pre-commit hook or a pipeline step:

python3 ~/.claude/skills/hygiene/scripts/hygiene.py scan -q src/**/*.tsx

Tests

python3 ~/.claude/skills/hygiene/scripts/test_hygiene.py

26 checks covering both directions, including the ones that would hurt silently: orientation survives, scanning is quiet after cleaning, PDFs pass through untouched, malformed input returns the original instead of raising, exit codes are correct.

What this deliberately does not do

It does not attack statistical watermarks (SynthID-Text and similar), does not strip C2PA provenance, and does not rewrite text.

Those techniques exist to obscure that content was machine-generated. Since 2 August 2026, Article 50 of the EU AI Act requires the opposite — machine-readable marking of AI-generated content — and major model providers now embed such marks. A tool that removes them is a liability for anyone who sells to regulated customers, and by its own authors' admission it degrades the prose while never being verifiable.

The deterministic part above is unaffected by that line: zero-width characters and EXIF data are not a provenance signal. They are junk and a data leak.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.