agentleFS
danielrosehilldanielrosehill/Claude-Image-Production-Plugin/skills/scrub-metadata/SKILL.md

scrub-metadata

Skill21 starsChanged 7 days agoMITView on GitHub

Strip EXIF / IPTC / XMP metadata from images using exiftool. Use when the user wants to remove identifying metadata (GPS, camera, timestamps, thumbnails) from a single image, a folder, or a recursive tree before sharing or publishing. Supports preview, backup-first, whitelist of fields to keep (e.g. Orientation), and recursive operation. Logs each run to notes/.

  • Installs packages

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Remove EXIF / IPTC / XMP metadata from images in place (or to a copy), with preview and logging.

    line 10
  2. Distinctive:

    Before publishing photos to a public blog, social media, or client deliverable.

    line 14
  3. Distinctive:

    Ask the user (and confirm before touching files):

    line 22
  4. Distinctive:

    Recursive?: If the target is a folder, ask whether to descend into subfolders.

    line 25
  5. Very specific:

    Backup first?: Default yes — exiftool keeps _original sidecars automatically, but offer an explicit backup/ copy for the nervous case.

    line 26
  6. Distinctive:

    Run a read-only pass and show the user a summary:

    line 40
  7. Distinctive:

    Wait for user confirmation.

    line 59
  8. Very specific:

    If the user asked to keep additional fields, extend the -tagsFromFile @ -Field1 -Field2 ...

    line 90
  9. Very specific:

    Write notes/scrub-metadata-{YYYY-MM-DD-HHMMSS}.md in the target folder (or the cwd if the target was a single file).

    line 106
  10. Very specific:

    If notes/ doesn't exist, create it.

    line 115
  11. Distinctive:

    Never operate on the only copy of irreplaceable originals without a backup.

    line 123
  12. Distinctive:

    Do not push scrubbed files anywhere automatically — that's a human decision.

    line 124

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Scrub Image Metadata

Remove EXIF / IPTC / XMP metadata from images in place (or to a copy), with preview and logging. Wraps exiftool — do not hand-roll metadata parsing.

When to use

  • Before publishing photos to a public blog, social media, or client deliverable.
  • Bulk-cleaning an archive that may contain GPS or serial-number metadata.
  • Preparing reference images for distribution where only orientation should be preserved.

Procedure

1. Establish scope

Ask the user (and confirm before touching files):

  • Target path — single file, folder, or recursive tree. Default: current working directory.
  • Recursive? If the target is a folder, ask whether to descend into subfolders. Default no (flat, current folder only) unless the user says "recursive" or supplies a root.
  • Backup first? Default yes — exiftool keeps _original sidecars automatically, but offer an explicit backup/ copy for the nervous case.
  • Whitelist — fields to preserve. Common sensible default: keep Orientation so the image renders right-way-up. Ask if the user wants to preserve anything else (ColorSpace, ICC profile, copyright).
  • Dry run vs apply — always preview first.

2. Check tooling

command -v exiftool || echo "exiftool not installed — install with: sudo apt install libimage-exiftool-perl"

Abort if missing.

3. Preview what will be stripped

Run a read-only pass and show the user a summary:

# Show metadata currently present on a sample file
exiftool -G1 -a -s "sample.jpg"

# Count files that would be touched
find <target> -maxdepth <1|999> -type f \
  \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \
     -o -iname '*.heic' -o -iname '*.webp' -o -iname '*.tif' \
     -o -iname '*.tiff' \) | wc -l

Print:

  • File count by extension.
  • Which tag groups will be removed (EXIF, GPS, IPTC, XMP, MakerNotes, Thumbnail).
  • Which tags will be kept (the whitelist).
  • Whether a backup/ copy will be made.

Wait for user confirmation.

4. Backup (if requested)

mkdir -p backup/
cp -r <target>/. backup/

Note that exiftool also keeps its own <file>_original sidecars in-place unless -overwrite_original is passed — decide with the user whether to keep those or clean them up at the end.

5. Strip metadata

Two patterns — pick based on scope:

Folder (non-recursive):

exiftool -all= -tagsFromFile @ -Orientation \
  -ext jpg -ext jpeg -ext png -ext heic -ext webp -ext tif -ext tiff \
  "<target>"

Recursive tree:

exiftool -r -all= -tagsFromFile @ -Orientation \
  -ext jpg -ext jpeg -ext png -ext heic -ext webp -ext tif -ext tiff \
  "<target>"

If the user asked to keep additional fields, extend the -tagsFromFile @ -Field1 -Field2 ... list. If the user asked to preserve nothing (full nuke), drop the -tagsFromFile clause — just -all=.

To discard the _original sidecars in the same run, append -overwrite_original. Only do this if a backup was made in step 4, or if the user explicitly waived backup.

6. Verify

Sample a few output files and show their remaining metadata:

exiftool -G1 -a -s "<sample-output>.jpg"

Confirm only whitelisted tags remain. If unexpected metadata survived (common with PNG text chunks or XMP sidecars), flag it and offer a second pass with -xmp:all= or a manual exiftool -ext xmp -overwrite_original -all= <path>.

7. Log

Write notes/scrub-metadata-{YYYY-MM-DD-HHMMSS}.md in the target folder (or the cwd if the target was a single file). Include:

  • Target path and whether recursive.
  • Backup taken? Where?
  • Whitelist used.
  • File count processed, count skipped, count failed.
  • Sample before/after metadata dump for one file.
  • Any warnings (XMP sidecars found, MakerNotes that resisted strip, etc.).

If notes/ doesn't exist, create it.

Notes

  • exiftool is the only sane tool for this — don't use convert -strip (ImageMagick) as the primary path; it silently drops colour profiles and doesn't touch XMP sidecars reliably.
  • GPS is the most common sensitive leak — always explicitly confirm it's gone in step 6 (exiftool -GPS:all <file> should return nothing).
  • For HEIC from iPhones, there are often two copies of EXIF (container + embedded). exiftool -all= handles both, but verify.
  • For PNGs, metadata lives in tEXt / iTXt / eXIf chunks — exiftool -all= covers them. Do not rely on optipng -strip all as a primary scrubber.
  • Never operate on the only copy of irreplaceable originals without a backup. If the user is working on an archive, insist on step 4.
  • Do not push scrubbed files anywhere automatically — that's a human decision.

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.