Inspiration

A photo archive can look complete and still be broken. After culling, card re-imports and backup copies, RAW files lose their JPEGs, edit sidecars are left behind when files are renamed, and re-imports quietly duplicate gigabytes. Nobody notices until a client asks for a specific file.

Existing tools don't cover this. Duplicate finders group files by content, and catalog software tracks its own catalog. Neither is built to say that a RAW lost its JPEG or that an XMP lost its RAW. I wanted an audit built on the relationships between photographic assets, not another culling or search tool.

What it does

ArchivePair audits one shoot folder on the NAS, plus an optional backup used as a reference:

  • Finds RAW/JPEG pairs by filename stem across subfolders, including mixed RAW formats.
  • Finds missing counterparts, orphaned sidecars (XMP, DOP, PP3 and others, in both naming conventions), zero-byte files, repeated imports and ambiguous filenames.
  • Confirms byte-identical duplicates only from checksums the NAS returns.
  • Cross-checks each pair by capture time and camera model.
  • Reports every finding in one of four tiers: Confirmed, Likely, Needs human review, Not detectable.

It never judges image quality, never deletes anything, and never claims a photo is missing without proof. A gap in the numbering is reported as an observation, not a missing photo. If you give it a backup folder that contains the file, it is reported as missing relative to that backup.

Saving the report, tagging findings, or moving chosen duplicates to a review folder each need your explicit approval, plus platform approval.

How I built it

ArchivePair is a Uliya Markdown Skill: a SKILL.md plus three reference files, with no scripts or binaries. It delegates all NAS work to the registered file, photo and knowledge experts.

Pairing logic is a deterministic written rulebook. The shoot's own convention is inferred first. With \( P \) distinct photo stems and \( n_{pair} \) of them paired:

$$\text{paired shoot} \iff \frac{n_{pair}}{P} \ge 0.8$$

Only deviations from that convention are flagged. In a RAW-only shoot, a missing JPEG is not a finding, and in a mixed shoot every unpaired stem goes to human review.

I built against the official starter kit (0.7.7) and capability catalog (2.2.0), and used only operations that exist there: recursive listing, SHA-256, hash-based duplicate scan, photo metadata, and approval-gated save, tag and move.

Challenges we ran into

  • Honesty over features. The platform has no perceptual matching, no decode check, and no way to know what was originally captured. I made those limits first-class output, under "Not detectable", instead of faking them.
  • Strict static checker. The official checker has exact rules for headings, capability evidence and delegate syntax. The kit's own template heading would fail it.
  • Self-consistency. I ran the written rules against a seeded synthetic 45-file shoot using a reference implementation. It caught a real bug: a byte-identical re-import was also reported as "checksums differ". Fixed.

Accomplishments that we're proud of

  • The Skill passes the official static checker with 0 errors and 0 warnings.
  • Rule logic is validated on a synthetic shoot with seeded defects: 19 of 19 checks pass.
  • The confidence-tier and abstention design: every finding says why it has its tier.

What we learned

The most useful thing an integrity tool can do is say what it cannot know. Separating confirmed by evidence from suggested by filenames makes the report trustworthy, and the NAS is what makes the evidence cheap: hashing terabytes in place, next to the archive, with no downloads.

What's next for ArchivePair

  • Runtime validation on the UGREEN AI NAS. Nothing has run on a NAS yet. The open checks are RAW metadata support, whether the duplicate scan covers RAW and sidecar files, large-folder behavior, and the approval flows.
  • Chunked audits of very large archives, with a stored report history for comparing audits over time.
  • Optional backup parity checks across several folders.

Built With

Share this project:

Updates

Submission history