watermarks-remover strips AI provenance marks from files and text

An open-source Python tool and agent skill that removes invisible Unicode characters, C2PA metadata, and statistical watermarks from various file formats.

cpaua3 min164
watermarks-remover strips AI provenance marks from files and text

The open-source project watermarks-remover provides a Python-based service and agent skill designed to strip multi-vendor AI provenance marks from text and files. It targets privacy and hygiene for content owned by the user, removing hidden identifiers from ecosystems including OpenAI, Claude, and Gemini / SynthID-Text.

Supported file formats and watermark layers

The tool operates across three distinct layers. Layer A uses deterministic Python scripts to remove invisible Unicode, exotic spaces, bidi, and tag characters. Layer B handles statistical token-sampling text watermarks through agent rewrites and an optional rewrite_text.py hook.

The file layer targets C2PA, EXIF, XMP, and document properties. It supports a wide range of formats, including PNG, JPEG, WebP, AVIF, HEIC, BMP, GIF, TIFF, SVG, PDF, DOCX, XLSX, PPTX, EPUB, ODT, HTML, Markdown, and media files such as MP4, MOV, M4A, M4V, WAV, MP3, and FLAC.

Integrating the tool as an agent skill

The remove-ai-marks skill acts as a thin HTTP client that communicates with a backend service, meaning the agent host does not require Python. Users can install the skill for various hosts, including Claude Code, Codex, Cursor, and Cowork, using the following command:

bash
python3 install_skill.py --skill remove-ai-marks --target claude-code

To use the skill, the HTTP service must be running. It can be started via make serve or by running the server script directly:

bash
py service/scripts/server.py --host 127.0.0.1 --port 8765

The client connects to the service via the WATERMARKS_SERVICE_URL, which defaults to http://127.0.0.1:8765.

Deterministic cleaning via PostToolUse hooks

To ensure marks are removed without relying on model instructions, the tool provides a PostToolUse hook. This hook executes service/scripts/hook_written_file.py whenever an agent performs a Write, Edit, MultiEdit, or NotebookEdit action.

The hook operates in two modes: check, which reports provenance marks to the model without altering the file, and clean, which strips marks in place. The mode is configured via the WATERMARKS_HOOK_MODE environment variable or plugin settings.

For manual configuration in settings.json, the hook is defined as follows:

json
{
 "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
 }
 ]
 }
 ]
 }
}

Deployment for Claude Code and Cowork

Claude Code users can install the tool as a plugin via the marketplace without cloning the repository:

bash
/plugin marketplace add guillaumemeyer/watermarks-remover
/plugin install watermarks-remover@watermarks-remover

For Cowork, claude.ai, and cloud sessions, the tool is deployed as a zip bundle. Users can generate this bundle using python3 install_skill.py --skill remove-ai-marks --target cowork and upload it through the Customize → Skills menu in the Claude Desktop app.

Sources

guillaumemeyer/watermarks-removergithub.com/guillaumemeyer/watermarks-remover
Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.