$npx -y skills add calesthio/OpenMontage --skill media-useAgent Media OS — resolve any media need (BGM, SFX, image, icon) into a frozen local file + ledger record. One verb (resolve) handles the full cascade — project cache, global cache, HeyGen catalog search, freeze, register. Keeps search noise on disk, hands the agent a path. Use
| 1 | # media-use |
| 2 | |
| 3 | Resolve media needs into frozen local files. One verb, four types, zero context noise. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | Call `resolve` whenever a composition needs media — background music, sound effects, images, or icons. media-use searches the HeyGen catalog, downloads the best match, freezes it locally, and registers it in a manifest. The agent gets back one line; all search noise stays on disk. |
| 8 | |
| 9 | ## Resolve |
| 10 | |
| 11 | ```bash |
| 12 | node <SKILL_DIR>/scripts/resolve.mjs --type <type> --intent "<description>" --project <dir> |
| 13 | ``` |
| 14 | |
| 15 | Returns one line: `resolved <id> → <path> (<type>, <metadata>)` |
| 16 | |
| 17 | ### Types |
| 18 | |
| 19 | | Type | What it finds | Provider | |
| 20 | | ------- | ------------------- | ---------------------------------------- | |
| 21 | | `bgm` | Background music | HeyGen audio catalog (10k+ tracks) | |
| 22 | | `sfx` | Sound effects | Bundled 19-file library + HeyGen catalog | |
| 23 | | `image` | Photos, backgrounds | HeyGen asset search (75k+ vectors) | |
| 24 | | `icon` | Icons, logos | HeyGen asset search (type=icon) | |
| 25 | |
| 26 | ### Examples |
| 27 | |
| 28 | ```bash |
| 29 | # Background music |
| 30 | node <SKILL_DIR>/scripts/resolve.mjs --type bgm --intent "upbeat tech launch" --project . |
| 31 | # → resolved bgm_001 → .media/audio/bgm/bgm_001.mp3 (bgm, 25s) |
| 32 | |
| 33 | # Sound effect |
| 34 | node <SKILL_DIR>/scripts/resolve.mjs --type sfx --intent "whoosh" --project . |
| 35 | # → resolved sfx_001 → .media/audio/sfx/sfx_001.mp3 (sfx, 0.57s) |
| 36 | |
| 37 | # Image |
| 38 | node <SKILL_DIR>/scripts/resolve.mjs --type image --intent "gradient tech background" --project . |
| 39 | # → resolved image_001 → .media/images/image_001.jpg (image) |
| 40 | |
| 41 | # Icon |
| 42 | node <SKILL_DIR>/scripts/resolve.mjs --type icon --intent "rocket" --project . |
| 43 | # → resolved icon_001 → .media/images/icon_001.png (icon, transparent) |
| 44 | ``` |
| 45 | |
| 46 | ### Flags |
| 47 | |
| 48 | | Flag | Description | |
| 49 | | --------------- | ------------------------------------------ | |
| 50 | | `--type, -t` | Media type: bgm, sfx, image, icon | |
| 51 | | `--intent, -i` | What you need (natural language) | |
| 52 | | `--entity, -e` | Entity name for cache matching (optional) | |
| 53 | | `--project, -p` | Project directory (default: .) | |
| 54 | | `--adopt` | Bulk-import existing assets/ into manifest | |
| 55 | | `--json` | Output JSON instead of one-line result | |
| 56 | |
| 57 | ## How it works |
| 58 | |
| 59 | 1. Check project `.media/manifest.jsonl` for exact-prompt match |
| 60 | 2. Scan existing `assets/` directory for unregistered files matching the need |
| 61 | 3. Check global cache `~/.media/` for reusable asset |
| 62 | 4. Search via provider (HeyGen audio catalog, HeyGen asset search) |
| 63 | 5. Freeze file to `.media/<type>/`, register in manifest, regenerate `index.md` |
| 64 | |
| 65 | The agent gets back **one line**. Candidates, scores, provenance stay on disk. |
| 66 | |
| 67 | ## Adopt existing projects |
| 68 | |
| 69 | Most HyperFrames projects already have assets in `assets/`. media-use adopts them: |
| 70 | |
| 71 | ```bash |
| 72 | node <SKILL_DIR>/scripts/resolve.mjs --adopt --project . |
| 73 | # → adopted 9 assets from assets/ |
| 74 | # bgm_001 → assets/bgm/mango-fizz.mp3 (bgm, 146.6s) |
| 75 | # image_001 → assets/images/avatar.jpg (image, 400×400) |
| 76 | ``` |
| 77 | |
| 78 | `ffprobe` extracts real duration and dimensions. During resolve, unregistered files in `assets/` matching the intent are adopted on the fly. |
| 79 | |
| 80 | ## Reading the inventory |
| 81 | |
| 82 | After resolve or adopt, read `.media/index.md` for the full inventory: |
| 83 | |
| 84 | ``` |
| 85 | # .media · 4 assets |
| 86 | |
| 87 | id type dur dims path description |
| 88 | bgm_001 bgm 25s — .media/audio/bgm/bgm_001.mp3 upbeat tech launch |
| 89 | sfx_001 sfx 0.6s — .media/audio/sfx/sfx_001.mp3 whoosh |
| 90 | image_001 image — 1920×1080 .media/images/image_001.jpg gradient tech background |
| 91 | icon_001 icon — 200×200 .media/images/icon_001.png rocket |
| 92 | ``` |
| 93 | |
| 94 | ## Cross-project reuse |
| 95 | |
| 96 | Assets are cached automatically on resolve. Subsequent resolves for the same prompt hit the global cache at `~/.media/` — no re-download, no provider call. Promote an asset explicitly with `organize --promote <id>` to make it reusable across all projects. |
| 97 | |
| 98 | ## Files |
| 99 | |
| 100 | - `.media/manifest.jsonl` — machine SSOT, one JSON record per line |
| 101 | - `.media/index.md` — agent-readable table (id, type, dur, dims, path, description) |
| 102 | - `~/.media/` — global cross-project reuse cache (content-addressed, SHA-256) |
| 103 | |
| 104 | ## CLI tools used |
| 105 | |
| 106 | | Tool | Purpose | Required? | |
| 107 | | --------- | ------------------------------------------ | ------------- | |
| 108 | | `ffprobe` | Probe duration, dimensions, codec on adopt | Yes | |
| 109 | | `heygen` | Audio catalog, asset search | For providers | |
| 110 | |
| 111 | Install the `heygen` CLI (single static binary, no runtime) |