{
  "name": "render_cut",
  "description": "Render an edit list of clips from media/ into one MP4 under projects/cuts/ (ffmpeg trim + concat, re-encoded to H.264/AAC so mixed sources join cleanly). Prints ##progress lines; exits 2 with a one-line reason on a bad edit list, an out-of-scope path, or a missing ffmpeg.",
  "parameters": {
    "properties": {
      "edits": {
        "type": "string",
        "description": "The edit list as a JSON string: {\"version\":1,\"clips\":[{\"path\":\"media/a.mp4\",\"in\":0,\"out\":3.5}]}. A bare array of clips is accepted too. `in`/`out` are seconds from the start of that file, `out` greater than `in`, and every path must be inside media/. Array order is render order."
      },
      "out": {
        "type": "string",
        "description": "Where to write the result: a workspace-relative .mp4 path under projects/cuts/, e.g. projects/cuts/highlights.mp4. Parent folders are created."
      }
    },
    "required": ["edits", "out"]
  },
  "run": "NODE_BIN=\"$(command -v node || true)\"; if [ -z \"$NODE_BIN\" ]; then echo 'render_cut: node not found on PATH' >&2; exit 2; fi; for p in \"skills/clip-cutter/tools/render_cut/render.mjs\" \"tools/render_cut/render.mjs\"; do if [ -f \"$p\" ]; then exec \"$NODE_BIN\" \"$p\"; fi; done; echo 'render_cut: render.mjs not found (expected skills/clip-cutter/tools/render_cut/render.mjs)' >&2; exit 2"
}
