Skip to content

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

hyperframes

Verified

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

FileKindSize
SKILL.mdskill md7.5 KB
assets/frame-presets/biennale-yellow/FRAME.mdmarkdown17.4 KB
assets/frame-presets/biennale-yellow/caption-skin.htmlother7.9 KB
assets/frame-presets/biennale-yellow/frame-showcase.htmlother34.1 KB
assets/frame-presets/blockframe/FRAME.mdmarkdown15.9 KB
assets/frame-presets/blockframe/caption-skin.htmlother8.1 KB
assets/frame-presets/blockframe/frame-showcase.htmlother37.9 KB
assets/frame-presets/blue-professional/FRAME.mdmarkdown16.8 KB
assets/frame-presets/blue-professional/caption-skin.htmlother8.1 KB
assets/frame-presets/blue-professional/frame-showcase.htmlother38.2 KB
assets/frame-presets/bold-poster/FRAME.mdmarkdown15.6 KB
assets/frame-presets/bold-poster/caption-skin.htmlother8.5 KB
assets/frame-presets/bold-poster/frame-showcase.htmlother31.6 KB
assets/frame-presets/broadside/FRAME.mdmarkdown15.9 KB
assets/frame-presets/broadside/caption-skin.htmlother8.2 KB
assets/frame-presets/broadside/frame-showcase.htmlother33.1 KB
assets/frame-presets/capsule/FRAME.mdmarkdown16.8 KB
assets/frame-presets/capsule/caption-skin.htmlother8.2 KB
assets/frame-presets/capsule/frame-showcase.htmlother42.0 KB
assets/frame-presets/cartesian/FRAME.mdmarkdown16.9 KB
assets/frame-presets/cartesian/caption-skin.htmlother8.1 KB
assets/frame-presets/cartesian/frame-showcase.htmlother34.5 KB
assets/frame-presets/cobalt-grid/FRAME.mdmarkdown16.9 KB
assets/frame-presets/cobalt-grid/caption-skin.htmlother8.6 KB
assets/frame-presets/cobalt-grid/frame-showcase.htmlother45.9 KB
assets/frame-presets/code-editorial/FRAME.mdmarkdown20.1 KB
assets/frame-presets/code-editorial/caption-skin.htmlother8.1 KB
assets/frame-presets/code-editorial/fonts/EBGaramond-400.woff2binary21.2 KB
assets/frame-presets/code-editorial/fonts/EBGaramond-700.woff2binary22.5 KB
assets/frame-presets/code-editorial/fonts/Inter-400.woff2binary23.1 KB
assets/frame-presets/code-editorial/fonts/Inter-700.woff2binary23.8 KB
assets/frame-presets/code-editorial/fonts/JetBrainsMono-400.woff2binary20.7 KB
assets/frame-presets/code-editorial/fonts/JetBrainsMono-700.woff2binary21.4 KB
assets/frame-presets/code-editorial/fonts/OFL-eb-garamond.txtmarkdown4.4 KB
assets/frame-presets/code-editorial/fonts/OFL-inter.txtmarkdown4.4 KB
assets/frame-presets/code-editorial/fonts/OFL-jetbrains-mono.txtmarkdown4.4 KB
assets/frame-presets/code-editorial/frame-showcase.htmlother42.7 KB
assets/frame-presets/coral/FRAME.mdmarkdown18.5 KB
assets/frame-presets/coral/caption-skin.htmlother8.1 KB
assets/frame-presets/coral/frame-showcase.htmlother35.6 KB
assets/frame-presets/creative-mode/FRAME.mdmarkdown19.1 KB
assets/frame-presets/creative-mode/caption-skin.htmlother8.2 KB
assets/frame-presets/creative-mode/frame-showcase.htmlother37.8 KB
assets/frame-presets/daisy-days/FRAME.mdmarkdown17.0 KB
assets/frame-presets/daisy-days/caption-skin.htmlother8.3 KB
assets/frame-presets/daisy-days/frame-showcase.htmlother41.3 KB
assets/frame-presets/editorial-forest/FRAME.mdmarkdown16.6 KB
assets/frame-presets/editorial-forest/caption-skin.htmlother8.2 KB
assets/frame-presets/editorial-forest/frame-showcase.htmlother36.0 KB
references/captions.mdmarkdown4.9 KB
references/film.mdmarkdown7.1 KB
references/format.mdmarkdown13.4 KB
references/look.mdmarkdown5.9 KB
references/motion.mdmarkdown12.2 KB
references/overlays.mdmarkdown2.6 KB
references/path-tracing.mdmarkdown5.6 KB
references/plugin-installation.mdmarkdown4.1 KB
references/review.mdmarkdown5.2 KB
references/runtimes.mdmarkdown4.1 KB
references/skill-lifecycle.mdmarkdown4.8 KB
references/sound.mdmarkdown3.6 KB
references/spec.mdmarkdown5.9 KB
references/story.mdmarkdown11.2 KB
references/storyboard-format.mdmarkdown6.5 KB
references/storyboard.mdmarkdown4.4 KB
references/types/3d.mdmarkdown1.8 KB
references/types/character.mdmarkdown1.6 KB
references/types/data.mdmarkdown1.3 KB
references/types/explainer.mdmarkdown3.0 KB
references/types/launch.mdmarkdown4.6 KB
references/types/music.mdmarkdown1.6 KB
references/types/vertical.mdmarkdown1.6 KB
scripts/bake-basemap.mjsscript17.8 KB
scripts/lib/main-module.mjsscript479 B
scripts/lib/main-module.test.mjsscript1.9 KB
scripts/lib/windows-exe-search.mjsscript640 B
scripts/lib/windows-exe-search.test.mjsscript5.6 KB
scripts/locate.mjsscript8.1 KB
scripts/plugin-cli.mjsscript5.5 KB
scripts/plugin-cli.test.mjsscript12.3 KB

scripts/plugin-cli.test.mjs

View on GitHub
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import {
  copyFileSync,
  mkdirSync,
  mkdtempSync,
  readFileSync,
  realpathSync,
  rmSync,
  writeFileSync,
} from "node:fs";
import { delimiter, join } from "node:path";
import { tmpdir } from "node:os";
import { test } from "node:test";
import { pathToFileURL } from "node:url";
import { invocation, npmFolder, pluginVersion, STANDALONE_CLI } from "./plugin-cli.mjs";

// The bundle is `<base>/<bundle>`; a test's project, home and tools go elsewhere under `<base>`.
function fixture(t, manifest = "plugin.json", version = "1.2.3", bundle = "plugin") {
  const base = realpathSync(mkdtempSync(join(tmpdir(), "hf-plugin-")));
  t.after(() => rmSync(base, { recursive: true, force: true }));
  const root = join(base, bundle);
  mkdirSync(join(root, "skills/hyperframes/scripts/lib"), { recursive: true });
  if (manifest) {
    mkdirSync(join(root, manifest, ".."), { recursive: true });
    writeFileSync(join(root, manifest), JSON.stringify({ name: "hyperframes", version }));
  }
  const launcher = join(root, "skills/hyperframes/scripts/plugin-cli.mjs");
  copyFileSync(new URL("./plugin-cli.mjs", import.meta.url), launcher);
  for (const lib of ["main-module.mjs", "windows-exe-search.mjs"]) {
    copyFileSync(
      new URL(`./lib/${lib}`, import.meta.url),
      join(root, "skills/hyperframes/scripts/lib", lib),
    );
  }
  return { base, root, launcher };
}

for (const manifest of [
  "plugin.json",
  ".claude-plugin/plugin.json",
  ".codex-plugin/plugin.json",
  ".cursor-plugin/plugin.json",
  "gemini-extension.json",
]) {
  test(`locates ${manifest} without repository packages`, (t) => {
    const { root } = fixture(t, manifest);
    assert.equal(pluginVersion(root), "1.2.3");
  });
}

test("rejects a floating plugin version and reads no manifest as a standalone install", (t) => {
  const { root } = fixture(t, "plugin.json", "latest");
  assert.throws(() => pluginVersion(root), /Invalid HyperFrames plugin release/);
  rmSync(join(root, "plugin.json"));
  assert.equal(pluginVersion(root), undefined);
});

test("a standalone install runs the newest CLI that moves into the project, and manages its own skills", () => {
  const result = invocation(["skills", "update"], {
    version: null,
    platform: "darwin",
    env: { PATH: "/bin" },
    cwd: "/work/project",
    npmCwd: "/home/person",
  });
  assert.equal(STANDALONE_CLI, "hyperframes@>=0.9.34");
  assert.equal(result.command, "npx");
  assert.equal(result.cwd, "/home/person");
  assert.deepEqual(result.args, ["--yes", STANDALONE_CLI, "skills", "update"]);
  assert.deepEqual(result.env, { PATH: "/bin", HYPERFRAMES_PLUGIN_CWD: "/work/project" });
});

test("pins CLI, suppresses standalone refresh, preserves unrelated environment", () => {
  const result = invocation(["init", "project with spaces", "--non-interactive"], {
    version: "1.2.3",
    platform: "darwin",
    env: { PATH: "/bin", HYPERFRAMES_SKIP_SKILLS: "0" },
    cwd: "/work/project",
    npmCwd: "/home/person",
  });
  assert.equal(result.command, "npx");
  assert.equal(result.cwd, "/home/person");
  assert.deepEqual(result.args, [
    "--yes",
    "hyperframes@1.2.3",
    "init",
    "project with spaces",
    "--non-interactive",
  ]);
  assert.deepEqual(result.env, {
    PATH: "/bin",
    HYPERFRAMES_SKIP_SKILLS: "1",
    HYPERFRAMES_SKILL_PKG_VERSION: "1.2.3",
    HYPERFRAMES_PLUGIN_VERSION: "1.2.3",
    HYPERFRAMES_NO_UPDATE_CHECK: "1",
    HYPERFRAMES_PLUGIN_CWD: "/work/project",
  });
  assert.throws(() => invocation(["skills", "update"], { version: "1.2.3" }), /plugin manager/);
});

test("Windows launches npx through Node without shell argument interpretation", () => {
  const result = invocation(["render", "a & b"], {
    version: "1.2.3",
    platform: "win32",
    node: String.raw`C:\Program Files\nodejs\node.exe`,
    env: { npm_execpath: String.raw`C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js` },
    pathExists: (p) => p === String.raw`C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js`,
    npmCwd: String.raw`C:\Users\person`,
  });
  assert.equal(result.command, String.raw`C:\Program Files\nodejs\node.exe`);
  assert.equal(result.cwd, String.raw`C:\Users\person`);
  assert.deepEqual(result.args, [
    String.raw`C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js`,
    "--yes",
    "hyperframes@1.2.3",
    "render",
    "a & b",
  ]);
  assert.throws(
    () => invocation([], { version: "1.2.3", platform: "win32", env: {}, pathExists: () => false }),
    /Cannot find npx/,
  );
});

test("installed helper keeps cwd, arguments, release environment and exit code", (t) => {
  const { base, root, launcher } = fixture(t);
  const project = join(base, "user project");
  mkdirSync(project);
  const helper = join(base, "helper.mjs");
  writeFileSync(
    helper,
    "console.log(JSON.stringify({ cwd: process.cwd(), args: process.argv.slice(2), skip: process.env.HYPERFRAMES_SKIP_SKILLS, version: process.env.HYPERFRAMES_SKILL_PKG_VERSION, cli: process.env.HYPERFRAMES_CLI_ENTRY })); process.exit(7);",
  );
  const before = readFileSync(join(root, "plugin.json"), "utf8");
  const result = spawnSync(
    process.execPath,
    [launcher, "--script", helper, "literal $value & spaces"],
    { cwd: project, encoding: "utf8" },
  );
  assert.equal(result.status, 7, result.stderr);
  assert.deepEqual(JSON.parse(result.stdout), {
    cwd: realpathSync(project),
    args: ["literal $value & spaces"],
    skip: "1",
    version: "1.2.3",
    cli: realpathSync(launcher),
  });
  assert.equal(readFileSync(join(root, "plugin.json"), "utf8"), before);
});

test("on Windows, a helper and the programs it starts skip the working-directory lookup", (t) => {
  const { root, launcher } = fixture(t);
  const helper = join(root, "helper.mjs");
  writeFileSync(
    helper,
    "console.log(JSON.stringify(process.env.NoDefaultCurrentDirectoryInExePath ?? null));",
  );
  const asWindows = join(root, "as-windows.mjs");
  writeFileSync(asWindows, 'Object.defineProperty(process, "platform", { value: "win32" });');
  const run = (env) =>
    spawnSync(
      process.execPath,
      ["--import", pathToFileURL(asWindows).href, launcher, "--script", helper],
      { cwd: root, encoding: "utf8", env: { ...env, NODE_OPTIONS: "" } },
    );
  const stdoutOf = (result) => {
    assert.equal(result.status, 0, result.stderr);
    return JSON.parse(result.stdout);
  };
  const { NoDefaultCurrentDirectoryInExePath: _, ...env } = process.env;

  assert.equal(stdoutOf(run(env)), "1");
  assert.equal(stdoutOf(run({ ...env, NoDefaultCurrentDirectoryInExePath: "yes" })), "yes");
});

// fails without the fix: a standalone install had no launcher, so the skills ran `npx hyperframes`
// in the project and npm took the project's bin, node_modules/.bin or .npmrc.
for (const [install, manifest, spec] of [
  ["plugin", "plugin.json", "hyperframes@1.2.3"],
  ["standalone", null, STANDALONE_CLI],
]) {
  test(
    `${install} install: npx starts outside the project, so its packages, bin links and .npmrc cannot pick the CLI`,
    { skip: process.platform === "win32" },
    (t) => {
      const { base, launcher } = fixture(t, manifest);
      const home = join(base, "home");
      const bin = join(base, "bin");
      const project = join(base, "user project");
      mkdirSync(home);
      mkdirSync(bin);
      mkdirSync(join(project, "node_modules/.bin"), { recursive: true });
      writeFileSync(
        join(project, ".npmrc"),
        "registry=http://127.0.0.1:9/\nscript-shell=/bin/false\n",
      );
      writeFileSync(join(project, "package.json"), '{"name":"hyperframes","bin":"x.js"}');
      writeFileSync(join(project, "node_modules/.bin/hyperframes"), "#!/bin/sh\n", { mode: 0o755 });
      writeFileSync(
        join(bin, "npx"),
        `#!${process.execPath}\nconsole.log(JSON.stringify({cwd:process.cwd(),args:process.argv.slice(2),project:process.env.HYPERFRAMES_PLUGIN_CWD}));`,
        { mode: 0o755 },
      );
      const result = spawnSync(process.execPath, [launcher, "--version"], {
        cwd: project,
        encoding: "utf8",
        env: { ...process.env, HOME: home, PATH: `${bin}${delimiter}${process.env.PATH}` },
      });
      assert.equal(result.status, 0, result.stderr);
      assert.deepEqual(JSON.parse(result.stdout), {
        cwd: realpathSync(home),
        args: ["--yes", spec, "--version"],
        project: realpathSync(project),
      });
    },
  );
}

test("rejects a plugin release older than the first one this launcher runs", (t) => {
  for (const version of ["0.9.33", "0.9.34-alpha.1", "0.8.99"]) {
    const { root } = fixture(t, "plugin.json", version);
    assert.throws(() => pluginVersion(root), /this launcher runs 0\.9\.34 or newer/);
  }
  for (const version of ["0.9.34", "0.10.0", "1.0.0-beta.1"]) {
    const { root } = fixture(t, "plugin.json", version);
    assert.equal(pluginVersion(root), version);
  }
});

test("a bundle keeps its pin when the CLI works in a project beside it", (t) => {
  const { base, root } = fixture(t);
  assert.equal(pluginVersion(root, join(base, "user project")), "1.2.3");
});

for (const bundle of [
  "home/.claude/plugins/cache/hyperframes/hyperframes/1.2.3",
  "home/.cursor/plugins/local/hyperframes",
  "home/.gemini/extensions/hyperframes",
]) {
  test(`a plugin manager's bundle at ${bundle} keeps its pin from home or a project`, (t) => {
    const { base, root } = fixture(t, "plugin.json", "1.2.3", bundle);
    for (const workDir of ["home", "home/work/project", "elsewhere"]) {
      mkdirSync(join(base, workDir), { recursive: true });
      assert.equal(pluginVersion(root, join(base, workDir)), "1.2.3", workDir);
    }
  });
}

// fails without the fix: a manifest beside a project-level skills install pinned an old CLI and
// turned off update checks and standalone skill refreshes.
for (const [layout, bundle, workDir] of [
  [".agents", "user project/.agents", "user project"],
  [".claude", "user project/.claude", "user project"],
  [".claude, run from a subfolder", "user project/.claude", "user project/sub"],
  ["the project's skills folder", "user project", "user project"],
  ["the project's skills folder, run from a subfolder", "user project", "user project/sub"],
  ["a monorepo package, run from the monorepo", "user project/packages/video", "user project"],
]) {
  for (const manifest of ["plugin.json", ".claude-plugin/plugin.json", "gemini-extension.json"]) {
    test(
      `a ${manifest} beside skills in ${layout} leaves the call as it is without one`,
      { skip: process.platform === "win32" },
      (t) => {
        const { base, root, launcher } = fixture(t, manifest, "0.9.40", bundle);
        const home = join(base, "home");
        const bin = join(base, "bin");
        const cwd = join(base, workDir);
        for (const dir of [home, bin, cwd]) mkdirSync(dir, { recursive: true });
        writeFileSync(
          join(bin, "npx"),
          `#!${process.execPath}\nconst e=process.env;console.log(JSON.stringify({args:process.argv.slice(2),skip:e.HYPERFRAMES_SKIP_SKILLS,noUpdate:e.HYPERFRAMES_NO_UPDATE_CHECK,plugin:e.HYPERFRAMES_PLUGIN_VERSION,pkg:e.HYPERFRAMES_SKILL_PKG_VERSION}));`,
          { mode: 0o755 },
        );
        const run = (...args) => {
          const result = spawnSync(process.execPath, [launcher, ...args], {
            cwd,
            encoding: "utf8",
            env: { ...process.env, HOME: home, PATH: `${bin}${delimiter}${process.env.PATH}` },
          });
          assert.equal(result.status, 0, result.stderr);
          return JSON.parse(result.stdout);
        };
        const withManifest = [run("--version"), run("skills", "update")];
        assert.equal(pluginVersion(root, cwd), undefined);
        assert.deepEqual(withManifest[0], { args: ["--yes", STANDALONE_CLI, "--version"] });
        rmSync(join(root, manifest));
        assert.deepEqual(withManifest, [run("--version"), run("skills", "update")]);
      },
    );
  }
}

test("starts npx in the home folder and never falls back to a shared folder", () => {
  assert.equal(
    npmFolder("/home/person", () => true),
    "/home/person",
  );
  assert.throws(() => npmFolder("", () => true), /Cannot find your home folder/);
  assert.throws(() => npmFolder("/home/gone", () => false), /Cannot find your home folder/);
  // Helper scripts never start npx, so they run without a home folder.
  const script = invocation(["--script", "helper.mjs"], {
    version: "1.2.3",
    cwd: "/project",
  });
  assert.equal(script.cwd, "/project");
});
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated 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: 196kUpdated Claude CodeCodexVerifiedInstall