$npx -y skills add indranilbanerjee/socialforge --skill match-assetsMatch brand assets to calendar posts and assign creative modes. Use when: after calendar parsing or asset re-matching.
| 1 | # /socialforge:match-assets — Asset Matcher |
| 2 | |
| 3 | Match brand assets to parsed calendar posts using the multi-factor scoring algorithm. Assigns one of 4 creative modes per post. |
| 4 | |
| 5 | ## Context efficiency |
| 6 | |
| 7 | Asset-heavy skill. **Grep before Read** the asset catalog (`${CLAUDE_PLUGIN_DATA}/<brand>/assets/index.json`) — never list the asset directory. Reference generated images / videos by path, not by loading metadata. Brand profile loads once per session. |
| 8 | |
| 9 | ## Prerequisites |
| 10 | - Calendar parsed (calendar-data.json exists) |
| 11 | - Asset index built (asset-index.json exists) |
| 12 | |
| 13 | If either is missing, prompt: "Run `/socialforge:parse-calendar` first, then `/socialforge:index-assets`." |
| 14 | |
| 15 | ## The Matching Algorithm |
| 16 | |
| 17 | For each post, calculate a multi-factor score against every indexed asset: |
| 18 | |
| 19 | | Factor | Weight | What It Measures | |
| 20 | |--------|--------|------------------| |
| 21 | | Tag Overlap | 30% | Post keywords vs asset tags | |
| 22 | | Suitability Match | 25% | Asset's "suitable_for" vs post context | |
| 23 | | Content Bucket Match | 20% | Does asset suit this content bucket? | |
| 24 | | Crop Feasibility | 15% | Can asset be cropped to all required platform ratios? | |
| 25 | | Freshness Penalty | 10% | Penalize assets used recently this month | |
| 26 | |
| 27 | **Freshness penalty:** 0 uses = no penalty | 1 use = score x 0.85 | 2 uses = score x 0.60 | 3+ uses = score x 0.30 |
| 28 | |
| 29 | ## Creative Mode Assignment |
| 30 | |
| 31 | | Score Range | Recommended Mode | |
| 32 | |-------------|-----------------| |
| 33 | | > 0.8 | ANCHOR_COMPOSE or ENHANCE_EXTEND | |
| 34 | | 0.5 - 0.8 | ENHANCE_EXTEND or STYLE_REFERENCED | |
| 35 | | 0.3 - 0.5 | STYLE_REFERENCED | |
| 36 | | < 0.3 | PURE_CREATIVE | |
| 37 | |
| 38 | Also selects 2-5 style reference images per post (always fed to AI generation alongside prompts). |
| 39 | |
| 40 | ## Process |
| 41 | |
| 42 | 1. Load calendar-data.json and asset-index.json |
| 43 | 2. For each post: extract keywords → score all assets → rank → assign mode |
| 44 | 3. Select style references per post |
| 45 | 4. Generate coverage report |
| 46 | |
| 47 | ## Coverage Report |
| 48 | |
| 49 | ``` |
| 50 | Asset Matching Complete: 28 posts |
| 51 | ANCHOR_COMPOSE: 8 posts (direct brand asset matches) |
| 52 | ENHANCE_EXTEND: 5 posts (asset needs enhancement) |
| 53 | STYLE_REFERENCED: 9 posts (AI gen guided by brand DNA) |
| 54 | PURE_CREATIVE: 4 posts (full AI generation) |
| 55 | CAROUSEL_TEMPLATE: 2 posts (HTML template rendering) |
| 56 | |
| 57 | Asset gaps: 3 posts flagged (should have brand assets but none found) |
| 58 | - P07: Founder post but no founder photos indexed |
| 59 | - P14: Product demo but no product screenshots available |
| 60 | - P22: Office culture post but no office photos |
| 61 | |
| 62 | Top used assets: asset_012 (3 posts), asset_005 (2 posts) |
| 63 | ``` |
| 64 | |
| 65 | 5. Present for user confirmation — user can override any match |
| 66 | 6. Save to `output/{brand}/{YYYY-MM}/asset-matches.json` |
| 67 | |
| 68 | ## User Override |
| 69 | |
| 70 | For any post, user can: |
| 71 | - Accept the recommendation |
| 72 | - Select a different asset: "Use asset_015 for P07" |
| 73 | - Change creative mode: "Make P14 PURE_CREATIVE instead" |
| 74 | - Upload a new asset on the spot |
| 75 | - Skip: "I'll handle P22 manually" |
| 76 | |
| 77 | ## Timeout & Fallback |
| 78 | - Per-post matching: 5-second timeout. If an asset index is very large (500+ images), process in batches. |
| 79 | - Show progress: `[12/28] Matching Post P12 — best match: asset_023 (score: 0.74, STYLE_REFERENCED)` |