Engineering & AI
ai-meta-cleaner: an agent skill that strips AI metadata from images
ai-meta-cleaner creates an image copy without metadata so you can share a photo without exposing the GPS coordinates stored in the original file.
Summary
- Make a separate copy for publication and check GPS data, orientation, and colors before using it.
- It does not remove watermarks embedded in the pixels, such as Google's SynthID, and it also drops the colour profile and orientation.
- Stripping metadata does not remove the duty to disclose: since 1 March 2026, businesses in Vietnam must label AI images that imitate real people or real events.

You need to post a photo of a client’s site, but the file might include the location’s GPS coordinates. With ai-meta-cleaner, you can create a copy for publication and check whether the coordinates are gone, the photo still looks right, and any required disclosures are accounted for.
Based on the source code at commit 1ef4767 (18 November 2026); we read the code but did not run it. HubCom has not used this tool in a client project.
What information travels with a published photo?
- Real photos get AI labels. AI-assisted editing tools write C2PA and IPTC markers into the file, even for a light touch-up. Facebook and Instagram read these markers and add an "AI info" label.
- Photos carry private details. EXIF metadata can hold GPS location, camera model and editing software.
- The repo turns metadata removal into a skill: hand an image or folder to Claude Code or Codex and get a copy with no metadata.
What it does
- One skill, one script.
SKILL.mdtells the agent to runscripts/remove_c2pa.py; Pillow is the only dependency. - How it strips: it reads the pixels, builds a new image from them and saves it. The new image carries none of the original's metadata.
- Formats:
.jpg,.jpeg,.png,.webp. JPEG is saved at quality 100; PNG and WebP are saved losslessly. - One image or a folder:
-rwalks subfolders,-osets the output location. New files get aclean_prefix; originals are left untouched. - From the agent: paste an image into the chat and type
/ai-meta-cleaner, or give a file or folder path.
When to use it
- Use it before posting photos to a website or social media, especially photos taken at home, at the office or at a client's site.
- Use it when a real photo had only a light AI edit (object removal, sharpening) and a platform still labels it as AI.
- Don't use it to hide the origin of AI-generated images that imitate real people or real events. A business that publishes such images without a label breaks the law (see Caveats).
- Don't use it for print or colour-critical images, because the colour profile is dropped.
- Consider ExifTool when you only need to strip JPEG metadata: it edits the file without re-encoding the image.
Caveats
- Vietnamese law requires a label. The 2025 Law on Artificial Intelligence took effect on 1 March 2026. Article 11 requires a label on AI images and video that imitate a real person or recreate real events.
- Who must label: organisations and individuals using AI professionally or commercially. Decree 142/2026 (in force from 1 May 2026) exempts technical edits that do not change what the image shows, and content used only internally.
- The EU too: Article 50 of the EU AI Act requires deepfakes to be disclosed from 2 August 2026. It applies if you publish to users in the EU.
- Meta's label has two sources: industry-standard AI signals in the file, and the poster's own disclosure. Since September 2024, images only edited with AI carry the label in the post menu rather than on the image.
- Invisible watermarks stay. Google's SynthID lives in the pixels themselves; stripping metadata does not touch it.
- The repo has no licence. Without a LICENSE file, the author keeps all rights. Ask the author before modifying it or shipping it in a product.
- A new project: created on 18 November 2026, three commits, no release yet. Pin the commit when you install it.
Trying it out
Before handing it to an AI agent, prepare:
- The goal: removing private details, or fixing an AI label wrongly applied to a real photo.
- Sample images: a phone photo (with GPS and orientation data) and an image edited with an AI tool.
- An output folder, separate from the originals.
- Your company's AI labelling rules, so the agent knows which images still need an AI note when posted.
Make a test copy from one photo
- Install Pillow with
pip install -r requirements.txt. - Copy the skill folder to
~/.claude/skills/or~/.codex/skills/, or to the project's.claude/skills/. - Try one sample image and inspect the result before running a whole folder.
- Check colour and orientation on both a phone and a computer.
- Run the whole folder with
-oso results stay separate.
Common pitfalls
- Phone photos turn sideways. The script drops the orientation tag but does not rotate the pixels to match. Rotate first (for example with Pillow's
ImageOps.exif_transpose). - Colours shift. Wide-gamut images (iPhone Display P3, Adobe RGB) lose their colour profile and look washed out.
- PNGs lose transparency. Palette-based PNGs are converted to RGB, so transparent areas become solid.
- Files get bigger. JPEG is re-encoded at quality 100 and PNG at the lowest compression level; web images can grow several times over.
- JPEG still loses quality. Every JPEG re-encode loses data, even at quality 100.
- Animated images keep only the first frame. The script reads a single frame.
- Believing the image is now "AI-free". Invisible watermarks and platform AI detectors still work.
Are the coordinates gone and does the photo look right?
- C2PA: use Content Credentials Verify only for photos you are allowed to send to an external service. Check internal client photos locally.
- No GPS or EXIF left: check with
exiftoolor your operating system's file info. - Orientation and colour match the original, on both a phone and a computer.
- File size is acceptable for where you will post it.
- Images that need a label still have one, in the caption or the platform's AI disclosure option.
Out of scope
Removing invisible watermarks, video and audio, and legal advice for specific cases. See the project source and the original legal texts.
Terms in this article (7)
- ai-meta-cleaner
- An open-source skill for Claude Code and Codex that strips AI metadata and EXIF from images by rebuilding them from their pixels.
- Image metadata
- Information stored in an image file alongside the pixels, such as capture date, camera, GPS location and editing software.
- C2PA (Content Credentials)
- An open standard that records an image's or video's origin and edit history inside the file; many AI tools use it to mark AI-generated content.
- EXIF, XMP, IPTC
- Three common image metadata standards; IPTC's DigitalSourceType field records that an image was made by AI.
- SynthID
- Google's invisible watermark, embedded in the pixels, so it survives metadata removal.
- Agent Skill
- A folder with instructions (SKILL.md) and scripts that an AI agent such as Claude Code or Codex uses for a specific task.
- Colour profile (ICC profile)
- Tells software how to display an image's colours; without it, wide-gamut images show the wrong colours.
Frequently asked questions
Will stripping metadata with ai-meta-cleaner stop Facebook's AI label?
Not reliably. Meta labels based on AI signals in the file and on the poster's disclosure; stripping metadata only removes the first, and invisible watermarks such as SynthID live in the pixels, so they stay.
Is it illegal to strip AI metadata from an image?
Stripping metadata itself is not banned. But since 1 March 2026, organisations and individuals using AI commercially in Vietnam must label AI images that imitate real people or real events, whether or not the file still has metadata.
Does ai-meta-cleaner keep full image quality?
PNG and WebP keep the exact pixels. JPEG is re-encoded at quality 100, so it still loses a little data, and every format loses its colour profile and orientation data.
Sources
- Luật Trí tuệ nhân tạo 134/2025/QH15, Quốc hội
- Nghị định 142/2026/NĐ-CP, Chính phủ
- ai-meta-cleaner, GitHub
- Từ 01/3/2026, hình ảnh, video do AI tạo ra phải gắn dấu hiệu nhận biết, LuatVietnam
- Thông báo và gắn nhãn nhận biết nội dung do AI tạo ra thế nào?, Tạp chí Luật sư Việt Nam
- Article 50: Transparency obligations for providers and deployers of certain AI systems, European Commission
- Our Approach to Labeling AI-Generated Content and Manipulated Media, Meta
- Identifying AI-generated images with SynthID, Google DeepMind