clean-user-facing-text
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting prose while preserving facts, meaning, and the writer's voice. Use when the user asks to clean, humanize, polish, or finalize articles, manuscripts, reports, documentation, emails, product copy, UI text, Markdown, or HTML prose, or when a project rule or instruction file explicitly requires this workflow. Don't use for code-only tasks or undisclosed authorship evasion; leave code, commands, identifiers, paths, APIs, formulas, citations, required disclosures, and verbatim quotations unchanged.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
_ _ _ ____ ___ ____ ____ _ _ ____ ____ _ _ ____ ____ ____ _ _ ____ _ _ ____ ____
| | | |__| | |___ |__/ |\/| |__| |__/ |_/ [__ __ |__/ |___ |\/| | | | | |___ |__/
|_|_| | | | |___ | \ | | | | | \ | \_ ___] | \ |___ | | |__| \/ |___ | \
watermarks-remover
Agent skill + stdlib Python service to strip multi-vendor AI provenance marks from text and files — for privacy and hygiene on content you own. The skill is a thin client: it drives the machinery over HTTP, so the agent host needs no Python.
| Layer | Target | How |
|---|---|---|
| A | Invisible Unicode, exotic spaces, bidi, tag chars | Deterministic Python scripts |
| B | Statistical (token-sampling) text watermarks | Agent rewrite + optional rewrite_text.py hook |
| Files | C2PA / EXIF / XMP / doc props | PNG, JPEG, WebP, AVIF, HEIC, BMP, GIF, TIFF, SVG, PDF, DOCX, XLSX, PPTX, EPUB, ODT, HTML, Markdown, MP4/MOV/M4A/M4V, WAV, MP3, FLAC |
Vendors / ecosystems (class-level): Claude, Gemini / SynthID-Text, OpenAI provenance surfaces, open-LLM Kirchenbauer-style (green-list) and keyed-Gumbel / EXP (Aaronson) marks.
Latest release: v0.7.0
Skill path: skills/remove-ai-marks/
Service path: service/
(migration: formerly remove-claude-marks; slash alias /remove-claude-marks still documented)
Install (agent skill)
The skill ships no code — it calls the service over HTTP. Install the skill (markdown only) and start the service, then set WATERMARKS_SERVICE_URL if it is not http://127.0.0.1:8765.
In Claude Code, the fastest route is the bundled plugin marketplace — no clone, and it updates in place. Everywhere else, one installer covers every supported host (Python 3.10+ stdlib, no dependencies):
python3 install_skill.py --skill remove-ai-marks --target claude-code
| Host | Target | Lands in |
|---|---|---|
| Claude Code (personal) | --target claude-code | ~/.claude/skills/<skill> (honors CLAUDE_CONFIG_DIR) |
| Claude Code (project) | --target claude-project --project-dir PATH | PATH/.claude/skills/<skill> |
| Codex (personal) | --target codex | ~/.agents/skills/<skill> |
| Codex (project) | --target codex-project --project-dir PATH | PATH/.agents/skills/<skill> |
| Cowork, claude.ai, cloud sessions, routines | --target cowork | dist/<skill>.zip to upload under Customize → Skills |
| Cursor | --target cursor (default) | ~/.cursor/skills/<skill> |
Shipped skills: remove-ai-marks (full, service-backed) and
clean-user-facing-text (text only, self-contained). --list prints them.
Existing installations are preserved unless you pass --force; replacement is
staged first and the previous install is kept as a uniquely named backup.
--link symlinks this checkout instead of copying, so edits are picked up
live. On Windows, use py install_skill.py ...; the install-skill.sh wrapper
is provided for macOS/Linux shells.
Before writing anything, the installer validates the skill against the
Agent Skills packaging rules that claude.ai uploads
and the Skills API enforce: spec-only frontmatter (name, description,
license, compatibility, metadata, allowed-tools), a lowercase hyphenated
name of at most 64 characters matching the directory, a non-empty
description of at most 1024 characters. The Cowork bundle additionally has
to fit the 30 MB upload limit, which the packager enforces.
Codex terminal and desktop
Install either shipped skill for your user, or install one into a particular project:
python3 install_skill.py --skill remove-ai-marks --target codex
python3 install_skill.py --skill clean-user-facing-text --target codex
python3 install_skill.py --skill remove-ai-marks --target codex-project --project-dir /path/to/project
On Windows, use py in place of python3. Open the project in Codex. In the
terminal, use /skills or type $ to select a skill; in the desktop app,
select or mention the skill in your prompt. Restart Codex if the new skill does
not appear. The project install is available when Codex runs in that project.
For remove-ai-marks, start the existing HTTP service from this repository
with make serve before using the skill (or on Windows without make, run
py service/scripts/server.py --host 127.0.0.1 --port 8765). It uses
WATERMARKS_SERVICE_URL (default http://127.0.0.1:8765), checks /health,
and calls the existing /inspect and /clean endpoints. If the service
requires an API key, set WATERMARKS_SERVER_API_KEY for the client.
clean-user-facing-text is
self-contained and does not need the service.
Automatic cleaning via hook (deterministic)
A skill is an instruction: the model decides whether to invoke it, and the model is the thing producing the marks. A hook is executed by the harness on every matching tool call, cooperation not required. That makes the hook the deterministic half of this workflow.
The plugin registers a PostToolUse hook on Write|Edit|MultiEdit|NotebookEdit
that runs service/scripts/hook_written_file.py
against the file the agent just wrote. Two modes, matching the pre-commit
convention of check-by-default:
| Mode | Behaviour |
|---|---|
check (default) | Reports provenance marks, leaves the file alone. Findings go to the model (exit 2), so it can offer to clean them. |
clean | Strips the marks in place, then tells the model the file on disk changed. |
Set the mode from the plugin's settings (Hook mode in /plugin manage,
read by the hook as CLAUDE_PLUGIN_OPTION_HOOK_MODE), or with
WATERMARKS_HOOK_MODE=clean in the environment. The hook command deliberately
does not interpolate ${user_config.hook_mode}: Claude Code refuses to run
a hook that references an option the user has never opened /plugin manage to
set — a declared default does not satisfy it — so interpolating it would mean
the hook silently never runs on a fresh install. Detection reuses audit_lib's
scan_file / is_actionable, so the hook, the pre-commit gate, and the CI
SARIF export agree on what counts as actionable; cleaning shells out to
clean_file.py, so no cleaning logic is duplicated. clean mode writes to a
sibling temp file and swaps only on a real difference, so files that were
already clean keep their mtime and don't retrigger file watchers.
Without the plugin, wire it in ~/.claude/settings.json (or a project
.claude/settings.json) yourself:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "python3",
"args": ["/path/to/watermarks-remover/service/scripts/hook_written_file.py",
"--mode", "check"],
"timeout": 30
}
]
}
]
}
}
On Windows, replace python3 with py.
What a hook cannot do. No hook can rewrite the assistant's chat message
before you read it. Claude Code's Stop hook receives `last_assistant_mess
// HOW IT'S BUILT
// FILES
2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
skills/clean-user-facing-text/SKILL.md7.8 KBupstream ↗
--- name: clean-user-facing-text description: Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting prose while preserving facts, meaning, and the writer's voice. Use when the user asks to clean, humanize, polish, or finalize articles, manuscripts, reports, documentation, emails, product copy, UI text, Markdown, or HTML prose, or when a project rule or instruction file explicitly requires this workflow. Don't use for code-only tasks or undisclosed authorship evasion; leave code, commands, identifiers, paths, APIs, formulas, citations, required disclosures, and verbatim quotations unchanged. --- # Clean user-facing text Apply a final text-hygiene pass to prose the user owns or is authorized to process. Treat Unicode cleanup as deterministic and statistical-watermark reduction as best-effort; never claim that a rewrite proves human authorship or is undetectable. Preserve required academic, legal, platform, and regulatory disclosures. ## Workflow 1. Identify the prose that readers will see. 2. Protect non-prose spans: - fenced and inline code - commands, paths, URLs, identifiers, API names, and exact values - formulas, citations, and text the user asks to quote verbatim 3. Preserve every claim, fact, number, name, citation, and requirement. Never invent a detail, name, number, quote, or source to make the prose easier to write or more varied: if a fact is missing, flag the gap rather than fill it. The rewrite may sharpen, compress, or reorder, but it may not add or remove claims. 4. **Measure before.** Inspect and score the input with the vendored zero-LLM stylometry estimator (see Scoring) and record the score. Read the report's `density_tier`: rewrite only when it is `high`; for `low` or `medium`, verify the text and otherwise leave the text unchanged. For a flag-only audit that never rewrites, use `--audit`: ```bash PYTHON "$SCRIPTS/inspect_text.py" --stylometry --json INPUT PYTHON "$SCRIPTS/inspect_text.py" --audit INPUT # detect-only: lists flagged spans, no rewrite ``` 5. Establish the writing brief before changing prose: - use a voice sample only when the user owns it or is authorised to use it; don't imitate another named person - when there is no sample, make the prose clear and natural without pretending to imitate a particular person - never inject a voice the source lacks: no fake first person ("I've seen this"), invented specifics, forced contrarianism, performed candor, or added stance and personality. Preserve the writer's deliberate rough edges and domain terms rather than scrubbing them - keep required disclosures, uncertainty, and the writer's actual point of view - pick the voice and domain preset the text fits (see Voice and domain presets); the default is general prose 6. **Layer A — strip artifacts first.** For text artifacts or supplied text files, run the deterministic Unicode pass before rewriting, so the rewrite operates on clean, marker-free text: ```bash PYTHON "$SCRIPTS/clean_text.py" INPUT -o OUTPUT --stats --no-normalize-spaces ``` 7. **Layer B — rewrite once.** Rewrite the remaining prose once, applying the detector levers (see Detector levers) in order: - vary clause order, sentence boundaries, rhythm, connectors, and function words - replace formulaic transitions and filler with direct, natural wording - keep the concrete details and judgement that make the text recognisable as the writer's - treat unusual grammar, repetition, directness, and phrasing as possible voice or accessibility choices; change them only when the user asks or when they create a clear reading problem - preserve the requested language, tone, structure, and formatting; never translate unless asked - for non-English text, use fluent constructions native to that language rather than English sentence patterns - do not add or remove claims merely to increase variation 8. **Layer A again.** Run the deterministic Unicode pass on the rewritten result to catch any artifacts the rewrite introduced (smart quotes, em dashes, homoglyphs): ```bash PYTHON "$SCRIPTS/clean_text.py" OUTPUT -o FINAL --stats --no-normalize-spaces ``` 9. **Measure after.** Score the rewritten text the same way. Report scores and confidence levels when available; otherwise report `status: insufficient_length`. A lower after-score means the measurable signals moved; it is not a verdict from any detector, and it never overrides the fact and voice rules above. 10. Return only the polished result unless the user asks for an audit or explanation. For practical guidance on preserving a writer's voice and removing formulaic prose, read `references/writing-in-your-voice.md` whenever the user asks to retain or adjust voice. For what detectors really measure and which claims are legitimate, read `references/detectors.md`. ## Scoring `scripts/inspect_text.py --stylometry` (or the standalone `scripts/score_stylometry.py`, which also accepts `--explain`) runs the zero-LLM estimator vendored from the service pipeline: sentence-length burstiness (coefficient of variation), weighted AI-cadence phrase density per 100 words, lexical diversity (MATTR), and a dampened composite score from 0 to 1. Exit code 1 means the score is at or above the threshold (default 0.65). The report also carries a `density_tier` (`low` / `medium` / `high`, or `uncalibrated` when not scored) that re-labels where the score sits so the rewrite pass engages only for `high`. `inspect_text.py --audit` produces the same scoring plus the detect-only flagged-span list but never rewrites. Under 30 words the estimator reports `status: insufficient_length` instead of a score. Nothing here calls the network; the skill stays self-contained. Limits: the estimator is calibrated for the statistical detector family (perplexity and burstiness style signals). It is not the output of trained neural classifiers such as GPTZero, Turnitin, Originality, or Pangram, it does not detect secret-key watermarks, and it says nothing about authenticity. A low after-score means the measured signals moved; it does not prove the text reads as human or that any particular detector would accept it. When the user asks for an audit, report the numbers as a gauge, not as a verdict (see Reporting). ## Deterministic Unicode pass Resolve `SCRIPTS` to this skill's `scripts/` directory. Use the available Python 3 launcher for the platform. Replace `PYTHON` below with `python3` on most macOS/Linux systems, `py` on Windows, or another verified Python 3 command. This skill is self-contained and runs its vendored scripts directly; it has no service or network dependency. Deterministic Layer A cleaning below is invoked by script, intentionally, so the skill works where the HTTP service is absent. Inspect first when editing an existing file (include `--stylometry` to record the before score): ```bash PYTHON "$SCRIPTS/inspect_text.py" --stylometry --json INPUT PYTHON "$SCRIPTS/clean_text.py" INPUT -o OUTPUT --stats --no-normalize-spaces PYTHON "$SCRIPTS/inspect_text.py" --stylometry --json OUTPUT ``` Use `-` for stdin. Prefer a new `*.cleaned.*` output unless the user explicitly requests in-place editing. Use `--no-normalize-spaces` by default so NBSP, narrow no-break spaces, figure spaces, and CJK ideographic spaces retain their layout semantics. Normalize spaces only when the user requests it. Do not use `--aggressive-homoglyphs`, `--nfkc`, or `--strip-emoji-glue` unless the user requests aggressive normalization and accepts possible changes to multilingual text, emoji, directionality, or typography. The scripts support plain text, source text, Markdown, and HTML source as text. For mixed Markdown or HTML, inspect hit positions first. If a hit falls inside protected code, attributes, or another non-prose span, do not run whole-file cleanup; clean only the prose segments or leave that hit unchanged. Do notREADME.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/guillaumemeyer-watermarks-remover-skills-clean-user-facing-text.md