Skip to content

JaimeJunr/claude-code-frontend-skills / plugins/hyperframes/skills/media-use

media-use

Verified

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

FileKindSize
.gitignoreother17 B
SKILL.mdskill md5.3 KB
audio/assets/sfx/CREDITS.mdmarkdown1.2 KB
audio/assets/sfx/chime.mp3binary26.7 KB
audio/assets/sfx/click-soft.mp3binary11.4 KB
audio/assets/sfx/click.mp3binary11.4 KB
audio/assets/sfx/error.mp3binary50.6 KB
audio/assets/sfx/glitch-1.mp3binary82.4 KB
audio/assets/sfx/glitch-2.mp3binary109.5 KB
audio/assets/sfx/glitch-3.mp3binary96.8 KB
audio/assets/sfx/impact-bass-1.mp3binary66.1 KB
audio/assets/sfx/impact-bass-2.mp3binary81.0 KB
audio/assets/sfx/key-press.mp3binary3.8 KB
audio/assets/sfx/manifest.jsonconfig3.6 KB
audio/assets/sfx/notification.mp3binary76.7 KB
audio/assets/sfx/ping.mp3binary25.8 KB
audio/assets/sfx/pop.mp3binary22.5 KB
audio/assets/sfx/riser.mp3binary313.5 KB
audio/assets/sfx/sparkle.mp3binary56.3 KB
audio/assets/sfx/typing.mp3binary26.2 KB
audio/assets/sfx/whoosh-cinematic.mp3binary173.3 KB
audio/assets/sfx/whoosh-short.mp3binary18.0 KB
audio/assets/sfx/whoosh.mp3binary18.0 KB
audio/references/bgm.mdmarkdown7.9 KB
audio/references/captions/authoring.mdmarkdown9.2 KB
audio/references/captions/motion.mdmarkdown5.4 KB
audio/references/captions/transcript-handling.mdmarkdown5.3 KB
audio/references/remove-background.mdmarkdown8.3 KB
audio/references/requirements.mdmarkdown4.7 KB
audio/references/sfx.mdmarkdown4.0 KB
audio/references/transcribe.mdmarkdown2.8 KB
audio/references/tts-to-captions.mdmarkdown1.7 KB
audio/references/tts.mdmarkdown13.9 KB
audio/scripts/audio.mjsscript15.2 KB
audio/scripts/audio.test.mjsscript8.4 KB
audio/scripts/carve.mjsscript20.1 KB
audio/scripts/carve.test.mjsscript12.2 KB
audio/scripts/extract-audio-data.pyscript7.1 KB
audio/scripts/gemini-pipeline.test.mjsscript4.8 KB
audio/scripts/heygen-tts.mjsexecutablescript4.3 KB
audio/scripts/heygen-tts.test.mjsscript1.4 KB
audio/scripts/heygen-voice.mjsscript3.8 KB
audio/scripts/heygen-voice.test.mjsscript8.3 KB
audio/scripts/lib/audio-carve.mjsscript16.6 KB
audio/scripts/lib/audio-meta.mjsscript1.1 KB
audio/scripts/lib/audio-meta.test.mjsscript4.5 KB
audio/scripts/lib/bgm-volume.mjsscript236 B
audio/scripts/lib/bgm.mjsscript11.5 KB
audio/scripts/lib/bgm.test.mjsscript4.7 KB
audio/scripts/lib/concurrency.mjsscript527 B
audio/scripts/lib/concurrency.test.mjsscript1.6 KB
audio/scripts/lib/gemini-auth.mjsscript1.6 KB
audio/scripts/lib/gemini-auth.pyscript1.9 KB
audio/scripts/lib/gemini-auth.test.mjsscript3.0 KB
audio/scripts/lib/gemini-auth_test.pyscript4.3 KB
audio/scripts/lib/gemini-tts.mjsscript5.0 KB
audio/scripts/lib/gemini-tts.test.mjsscript9.2 KB
audio/scripts/lib/heygen.mjsscript14.3 KB
audio/scripts/lib/heygen.test.mjsscript22.9 KB
audio/scripts/lib/main-module.mjsscript479 B
audio/scripts/lib/media-record.mjsscript5.1 KB
audio/scripts/lib/media-record.test.mjsscript12.6 KB
audio/scripts/lib/openverse.mjsscript4.9 KB
audio/scripts/lib/project-path.mjsscript2.2 KB
audio/scripts/lib/project-path.test.mjsscript3.0 KB
audio/scripts/lib/python.mjsscript4.6 KB
audio/scripts/lib/python.test.mjsscript7.8 KB
audio/scripts/lib/recording.mjsscript4.4 KB
audio/scripts/lib/sfx.mjsscript7.2 KB
audio/scripts/lib/sfx.test.mjsscript11.6 KB
audio/scripts/lib/tts.cleanup.test.mjsscript7.0 KB
audio/scripts/lib/tts.mjsscript18.6 KB
audio/scripts/lib/tts.spawn.test.mjsscript6.0 KB
audio/scripts/lib/tts.test.mjsscript10.2 KB
audio/scripts/lib/voice-credit.mjsscript686 B
audio/scripts/lib/voice-credit.test.mjsscript946 B
audio/scripts/lyria-recipe.pyscript4.9 KB
audio/scripts/recording.test.mjsscript9.2 KB
audio/scripts/trusted-program.test.mjsscript3.4 KB
audio/scripts/trusted_program.pyscript2.8 KB
audio/scripts/wait-bgm.mjsscript6.1 KB
audio/scripts/wait-bgm.test.mjsscript8.0 KB
luts/README.mdmarkdown1.1 KB
luts/index.jsonconfig2.0 KB
references/audio.mdmarkdown3.5 KB
references/grading.mdmarkdown7.0 KB
references/heygen.mdmarkdown11.8 KB
references/local.mdmarkdown2.6 KB
references/media-treatment-recipes.mdmarkdown35.0 KB
references/media-treatments.mdmarkdown13.8 KB
references/memory.mdmarkdown3.7 KB
references/meta.mdmarkdown6.4 KB
references/mixing.mdmarkdown4.5 KB
references/operations.mdmarkdown15.8 KB
references/resolve.mdmarkdown9.9 KB
references/setup-providers.mdmarkdown9.1 KB
references/telemetry-dashboard.mdmarkdown4.1 KB
scripts/audio-duck.mjsscript4.0 KB
scripts/compatibility.test.mjsscript1.6 KB
scripts/dither.mjsscript9.8 KB
scripts/dither.test.mjsscript4.6 KB
scripts/eval.mjsscript14.6 KB
scripts/lib/config-lock.mjsscript1.5 KB
scripts/lib/credit-limit.mjsscript2.0 KB
scripts/lib/cutlist.mjsscript6.2 KB
scripts/lib/duck.mjsscript3.8 KB
scripts/lib/error-diffusion.mjsscript6.5 KB
scripts/lib/index-gen.mjsscript2.0 KB
scripts/lib/manifest.mjsscript10.6 KB
scripts/lib/media-fetch.mjsscript2.8 KB
scripts/lib/media-home.mjsscript730 B
scripts/lib/npx-sync.mjsscript3.2 KB
scripts/lib/parakeet-words.mjsscript1.1 KB
scripts/lib/prefs-store.mjsscript6.8 KB
scripts/lib/recipe-store.mjsscript13.0 KB
scripts/lib/telemetry.mjsscript8.8 KB
scripts/lib/telemetry.test.mjsscript3.0 KB
scripts/lib/transcriptCutFade.mjsscript911 B
scripts/lib/windows-exe-search.mjsscript640 B
scripts/lib/words.mjsscript728 B
scripts/prefs.mjsscript2.3 KB
scripts/recipe.mjsscript3.8 KB
scripts/resolve-plugin.test.mjsscript3.2 KB
scripts/resolve.mjsscript1.4 KB
scripts/transcribe.mjsscript8.0 KB
scripts/transcribe.test.mjsscript7.7 KB
scripts/transcript-cut.mjsscript10.1 KB
scripts/transcript-cut.test.mjsscript9.6 KB

audio/scripts/lib/python.test.mjs

View on GitHub
import { test } from "node:test";
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import { chmodSync, existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { resolve } from "node:path";
import { defaultProbe, resolvePythonCommand, pythonInvocation } from "./python.mjs";

// Regression: on Windows a standard python.org install has no `python3.exe`
// (only `python.exe` + the `py` launcher), so `spawn("python3", …)` ENOENTs and
// every Python-backed audio feature silently no-ops. resolvePythonCommand takes
// injectable platform/probe params so all branches are testable without
// spawning a real interpreter.

// probeFor(names): a probe that reports success only for the given argv-0 names.
function probeFor(...names) {
  const ok = new Set(names);
  return (cmd) => ok.has(cmd);
}

test("non-win32 uses python3 when it runs", () => {
  assert.deepEqual(resolvePythonCommand("linux", probeFor("python3")), ["python3"]);
  assert.deepEqual(resolvePythonCommand("darwin", probeFor("python3")), ["python3"]);
});

test("win32 prefers python3 when the Microsoft Store build provides it", () => {
  assert.deepEqual(resolvePythonCommand("win32", probeFor("python3", "python", "py")), ["python3"]);
});

test("win32 falls back to python.exe when python3 is absent (python.org install)", () => {
  // The exact reported scenario: no python3, but `python` exists.
  assert.deepEqual(resolvePythonCommand("win32", probeFor("python", "py")), ["python"]);
});

test("win32 falls back to the py launcher with -3 when only py exists", () => {
  assert.deepEqual(resolvePythonCommand("win32", probeFor("py")), ["py", "-3"]);
});

test("py launcher is probed as `py -3 --version`, not bare `py`", () => {
  const seen = [];
  const probe = (cmd, args) => {
    seen.push([cmd, ...args]);
    return cmd === "py";
  };
  resolvePythonCommand("win32", probe);
  assert.deepEqual(seen.at(-1), ["py", "-3", "--version"]);
});

test("falls back to the canonical name (loud failure, unchanged) when nothing runs", () => {
  // No interpreter anywhere — must not throw, and must return python3 so the
  // eventual spawn fails exactly as it did before this fix, never worse.
  assert.deepEqual(
    resolvePythonCommand("win32", () => false),
    ["python3"],
  );
  assert.deepEqual(
    resolvePythonCommand("linux", () => false),
    ["python3"],
  );
});

// Regression (#4614): on PEP 668 systems the documented setup is a venv named
// by HYPERFRAMES_PYTHON; the audio engine ignored it and probed the bare
// system python3, so MusicGen BGM was skipped while `doctor` said installed.
const VENV = "/home/u/.venvs/hf/bin/python";

test("HYPERFRAMES_PYTHON wins over python3 on PATH when it runs", () => {
  const env = { HYPERFRAMES_PYTHON: VENV };
  assert.deepEqual(resolvePythonCommand("darwin", probeFor(VENV, "python3"), env), [VENV]);
  assert.deepEqual(resolvePythonCommand("win32", probeFor(VENV, "python", "py"), env), [VENV]);
});

test("a HYPERFRAMES_PYTHON that doesn't run falls through to the PATH probe", () => {
  const env = { HYPERFRAMES_PYTHON: "/nope/python" };
  assert.deepEqual(resolvePythonCommand("linux", probeFor("python3"), env), ["python3"]);
});

test("an empty HYPERFRAMES_PYTHON is ignored without being probed", () => {
  const seen = [];
  const probe = (cmd) => {
    seen.push(cmd);
    return cmd === "python3";
  };
  assert.deepEqual(resolvePythonCommand("linux", probe, { HYPERFRAMES_PYTHON: "" }), ["python3"]);
  assert.deepEqual(seen, ["python3"]);
});

// defaultProbe must match the CLI's validatePythonOverride(): exiting 0 is not
// enough, `--version` has to report Python 3. Stubs are shell scripts, so
// these run on POSIX only.
function withStub(script, fn) {
  const dir = mkdtempSync(join(tmpdir(), "hf-python-probe-"));
  try {
    const stub = join(dir, "python");
    writeFileSync(stub, `#!/bin/sh\n${script}\n`);
    chmodSync(stub, 0o755);
    fn(stub);
  } finally {
    rmSync(dir, { recursive: true, force: true });
  }
}

const posixOnly = { skip: process.platform === "win32" && "stub scripts need a POSIX shell" };

test("defaultProbe accepts an interpreter reporting Python 3", posixOnly, () => {
  withStub('echo "Python 3.12.4"', (stub) => assert.equal(defaultProbe(stub, ["--version"]), true));
});

test("defaultProbe rejects Python 2, which prints its version to stderr", posixOnly, () => {
  withStub('echo "Python 2.7.18" >&2', (stub) =>
    assert.equal(defaultProbe(stub, ["--version"]), false),
  );
});

test(
  "defaultProbe rejects an executable that exits 0 without a Python 3 version",
  posixOnly,
  () => {
    withStub("exit 0", (stub) => assert.equal(defaultProbe(stub, ["--version"]), false));
  },
);

test("defaultProbe rejects a command that doesn't exist", () => {
  assert.equal(defaultProbe("/nonexistent/hf-python", ["--version"]), false);
});

const DROP_CWD = "import sys\nif sys.path and sys.path[0] == '': del sys.path[0]\n";

test("pythonInvocation prepends the resolved prefix ahead of caller args", () => {
  assert.deepEqual(pythonInvocation(["-c", "import x"], ["python"]), {
    cmd: "python",
    args: ["-c", `${DROP_CWD}import x`],
  });
  // The py launcher's -3 must stay ahead of the caller's own arguments.
  assert.deepEqual(pythonInvocation(["-c", "import x", "arg"], ["py", "-3"]), {
    cmd: "py",
    args: ["-3", "-c", `${DROP_CWD}import x`, "arg"],
  });
  assert.deepEqual(pythonInvocation(["/abs/script.py", "--flag"], ["python"]), {
    cmd: "python",
    args: ["/abs/script.py", "--flag"],
  });
});

test("pythonInvocation runs modules without the working directory on sys.path", () => {
  const { args } = pythonInvocation(["-m", "pip", "install", "-q", "numpy"], ["python"]);
  assert.deepEqual(args.slice(2), ["install", "-q", "numpy"]);
  assert.equal(args[0], "-c");
  assert.match(
    args[1],
    /^import sys\n.*\nimport runpy\nrunpy\.run_module\("pip", run_name="__main__", alter_sys=True\)\n$/s,
  );
});

function hasPython3() {
  return spawnSync("python3", ["--version"], { encoding: "utf-8" }).status === 0;
}

test("a module planted in the working directory is never imported", { skip: !hasPython3() }, () => {
  const project = mkdtempSync(join(tmpdir(), "hf-py-cwd-"));
  try {
    const marker = join(project, "ran");
    writeFileSync(
      join(project, "hf_probe_module.py"),
      `open(${JSON.stringify(marker)}, "w").write("x")\n`,
    );
    writeFileSync(
      join(project, "hf_probe_main.py"),
      `open(${JSON.stringify(marker)}, "w").write("x")\n`,
    );
    const env = { ...process.env, PYTHONSAFEPATH: "" };
    const inline = pythonInvocation(["-c", "import hf_probe_module"], ["python3"]);
    assert.notEqual(spawnSync(inline.cmd, inline.args, { cwd: project, env }).status, 0);
    const module = pythonInvocation(["-m", "hf_probe_main"], ["python3"]);
    assert.notEqual(spawnSync(module.cmd, module.args, { cwd: project, env }).status, 0);
    assert.equal(existsSync(marker), false);
    const pip = pythonInvocation(["-m", "json.tool", "--help"], ["python3"]);
    assert.equal(spawnSync(pip.cmd, pip.args, { cwd: project, env }).status, 0);
  } finally {
    rmSync(project, { recursive: true, force: true });
  }
});

// fails without the fix: a relative HYPERFRAMES_PYTHON was probed in the caller's folder but run
// from wherever the child started, so MusicGen, which starts in the home folder, could not find it.
test("a HYPERFRAMES_PYTHON with a folder in it means the caller's folder; a bare name keeps PATH lookup", () => {
  const probed = [];
  const probe = (cmd) => (probed.push(cmd), true);
  assert.deepEqual(
    resolvePythonCommand("linux", probe, { HYPERFRAMES_PYTHON: "./venv/bin/python" }),
    [resolve("venv/bin/python")],
  );
  assert.deepEqual(probed, [resolve("venv/bin/python")]);
  assert.deepEqual(resolvePythonCommand("linux", probe, { HYPERFRAMES_PYTHON: "python3.12" }), [
    "python3.12",
  ]);
});
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall