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

set-metadata

Skill21 starsChanged 7 days agoMITView on GitHub

Write EXIF, IPTC, and XMP metadata tags to image files. Use when you need to add or update metadata like artist name, copyright, description, keywords, or GPS coordinates on individual images.

  • Installs packages

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Backup before write?: Default: yes. exiftool creates _original sidecars.

    line 30
  2. Distinctive:

    Ask the user to confirm the exiftool tag names.

    line 44
  3. Distinctive:

    If metadata did not stick (e.g., PNG text chunks), try the XMP-specific path:

    line 120
  4. Very specific:

    If the user accepted -overwrite_original, remove _original sidecars:

    line 128
  5. Distinctive:

    Permanent writes: Always create a backup before bulk metadata writes.

    line 148

≈ “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

Write Metadata to Images

Set metadata tags on image files using exiftool. Supports EXIF, IPTC, and XMP metadata, with automatic backup of original files.

When to use

  • Adding copyright and artist information to a photo before distribution.
  • Manually setting GPS coordinates if they were not captured.
  • Batch-updating descriptions or keywords across multiple images.
  • Fixing incorrect camera model or lens metadata.

Inputs to gather

  • Input file or directory — single image or folder.
  • Metadata key-value pairs — ask the user for the tags and values they want to set. Common fields:
    • Artist — photographer or creator name.
    • Copyright — copyright statement (e.g., "© 2026 Daniel Rosehill").
    • Description / ImageDescription — image description text.
    • Keywords — comma-separated keywords.
    • LensModel — lens description (if not auto-detected).
    • GPSLatitude / GPSLongitude / GPSAltitude — GPS coordinates.
    • DateTimeOriginal — capture date/time (format: YYYY:MM:DD HH:MM:SS).
  • Backup before write? Default: yes. exiftool creates _original sidecars; offer an explicit backup copy for safety.

Procedure

1. Check tooling

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

Abort if missing.

2. Validate tag names

Ask the user to confirm the exiftool tag names. Common mappings:

User-facingexiftool tag
ArtistArtist
CreatorCreator
CopyrightCopyright
DescriptionImageDescription
KeywordsKeywords
LensLensModel
Camera modelModel

Gotcha: EXIF, IPTC, and XMP may use different tag names for the same logical field. exiftool auto-detects the appropriate target; document which format will be used:

exiftool -a -G1 "<sample.jpg>" | grep -i copyright

This shows which groups (EXIF, IPTC, XMP) currently carry copyright info on the sample file.

3. Confirm metadata and scope

Print a summary:

  • Tags to be set: list all key-value pairs.
  • Target files: count and confirm.
  • Backup location: where _original sidecars will be stored.
  • Confirm before proceeding.

4. Backup (if requested)

# exiftool creates _original sidecars by default, but also offer explicit backup
mkdir -p backup/
cp -r "<target>" backup/

5. Write metadata

Single file:

exiftool -Artist="Daniel Rosehill" -Copyright="© 2026 Daniel Rosehill" \
  -ImageDescription="Sample photo" "<file.jpg>"

Multiple tags at once:

exiftool \
  -Artist="<artist>" \
  -Copyright="<copyright>" \
  -ImageDescription="<desc>" \
  -Keywords="<key1>,<key2>" \
  "<file.jpg>"

Batch (directory or recursive):

find <target> -maxdepth <1|999> -type f \
  \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \
     -o -iname '*.heic' -o -iname '*.webp' -o -iname '*.tif' \) \
  -exec exiftool -Artist="<artist>" -Copyright="<copyright>" {} \;

Append -overwrite_original to discard _original sidecars, but only if a backup was made in step 4.

6. Verify

Sample a few output files and confirm the metadata was written:

exiftool -Artist -Copyright -ImageDescription "<sample.jpg>"

If metadata did not stick (e.g., PNG text chunks), try the XMP-specific path:

exiftool -XMP:Artist="<artist>" -XMP:Copyright="<copyright>" "<file.png>"

7. Cleanup (optional)

If the user accepted -overwrite_original, remove _original sidecars:

find <target> -maxdepth <1|999> -type f -iname '*_original' -delete

Output / side effects

  • Metadata tags written to original files (or to a copy if the user requested a separate output directory).
  • _original sidecars created in the same directory as each file (unless -overwrite_original was used).
  • Original files are modified (unless a backup was made in step 4).

Notes

  • EXIF vs. IPTC vs. XMP: The same field (e.g., copyright) can live in EXIF, IPTC, and/or XMP. Some readers check only one format. exiftool intelligently maps to the appropriate group, but document which format was used:
    • EXIF: structured, camera/lens/exposure info. Limited size.
    • IPTC: editorial metadata (keywords, description, copyright). Limited size.
    • XMP: extensible, can hold arbitrary key-value pairs.
  • PNG and HEIC: exiftool writes metadata to PNG as XMP in iTXt chunks. HEIC is complex; check the _original sidecar to ensure metadata persisted.
  • Tag size limits: EXIF and IPTC have field-length limits. Very long descriptions (>500 chars) should go in XMP. exiftool warns if a value is too large.
  • Permanent writes: Always create a backup before bulk metadata writes. Metadata corruption is rare but possible.
  • Preserve other metadata: By default, exiftool -Tag=value file preserves all other metadata. Use -all= if you want to nuke everything before writing (not recommended).
  • Depends: apt install libimage-exiftool-perl.

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.