deduplicate-assets
Use when removing duplicate images from an ad asset library before variant generation. Uses 3-layer deduplication — content hash, variant constraint, and platform sync check — to prevent redundant uploads and wasted ad spend.
| Model | Source |
|---|---|
| sonnet | pack: ad-assets |
Full Reference
deduplicate-assets
Section titled “deduplicate-assets”3-layer deduplication guard that runs before variant generation. Prevents exact duplicate images, redundant platform/placement crops, and re-uploading already-synced assets. Runs synchronously after classify-ad-assets and before generate-ad-variants. Returns a deduplicated asset list with a rejection report.
Quick Reference
Section titled “Quick Reference”| Fact | Value |
|---|---|
| Layer 1 | SHA-256 of Cloudinary public ID — catches exact duplicates |
| Layer 2 | Compound key assetId::platform::placement — catches variant duplicates |
| Layer 3 | sync-status.json read — skips already-synced variants |
| Treated as synced | status: 'synced' only — failed and uploading are retried |
| Pipeline position | After face-center-crop, before generate-ad-variants |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Implement SHA-256 content hash deduplication (Layer 1) | content-hash.md |
| Implement compound key variant constraint deduplication (Layer 2) | variant-constraint.md |
| Implement sync status check, full deduplication pass, and report output (Layer 3) | sync-check.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.
Announcement
Section titled “Announcement”┏━ 🎯 deduplicate-assets ━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Deduplicating: [N] assets across [platform(s)] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛