heygen-com/hyperframes · error · Error

git not found. Install git and retry to add AI coding skills

Error message

git not found. Install git and retry to add AI coding skills.

What it means

Thrown by skillsToolingReady(strict=true) when hasGit() returns false. The upstream `skills add` flow performs a `git clone` of the skills repo, so git must be callable; without it the clone aborts noisily mid-run. The check runs git directly (no cmd.exe wrapper) since git resolves as a real executable on every platform.

Source

Thrown at packages/cli/src/commands/skills.ts:224

    error: "npx not found. Install Node.js and retry.",
    reason: "npx_missing",
    report: () => clack.log.error(c.error("npx not found. Install Node.js and retry.")),
  },
  {
    has: hasGit,
    error: "git not found. Install git and retry to add AI coding skills.",
    reason: "git_missing",
    // Skip cleanly rather than letting the upstream clone dump a noisy
    // multi-line `spawn git ENOENT` / "Installation failed" abort.
    report: () => console.log(c.dim("Skipping AI coding skills: git not available.")),
  },
];

/** True if the install can proceed; otherwise reports (or throws, when strict). */
function skillsToolingReady(strict: boolean): boolean {
  for (const tool of SKILLS_TOOLING) {
    if (tool.has()) continue;
    if (strict) throw new Error(tool.error);
    tool.report();
    // Surface the rare best-effort skip (init on a box missing git/npx); the
    // event respects the telemetry opt-out inside trackEvent.
    trackSkillsInstallSkipped({ reason: tool.reason });
    return false;
  }
  return true;
}

// Skill names can originate from a fetched manifest or agent argv, and each is
// spread into a spawn as a `--skill` value — apply the same slug guard as
// runSkillsRemove so a flag-like name can't smuggle into the command. Returns
// null when nothing valid is left to install.
function sanitizeSelection(selection: SkillSelection): SkillSelection | null {
  if (selection === "*") return selection;
  const rejected = selection.filter((n) => !PLAIN_SKILL_NAME.test(n));
  if (rejected.length) {
    clack.log.warn(c.warn(`Skipping unexpected skill name(s): ${rejected.join(", ")}`));

View on GitHub (pinned to c2996c8626)

Solutions

  1. Install Git and put it on PATH: `git --version` should succeed
  2. On Windows install Git for Windows and reopen the terminal so PATH reloads
  3. Re-run the skills command once `git --version` works
  4. For non-strict init the AI skills are skipped cleanly with a 'git not available' message
Defensive patterns

Strategy: validation

Validate before calling

import { execFileSync } from "node:child_process";
function hasGit(): boolean {
  try { execFileSync("git", ["--version"], { stdio: "ignore", timeout: 5000 }); return true; }
  catch { return false; }
}

Prevention

When it happens

Trigger: Calling `hyperframes skills` / `skills update` in strict mode on a host where `git --version` fails. SKILLS_TOOLING's git entry has() returns false and strict throws tool.error at skills.ts:224.

Common situations: Fresh Windows box without Git for Windows installed; minimal CI image that omits git; PATH edited so git is unreachable; git replaced by a wrapper that exits non-zero.

Related errors


AI-assisted analysis of heygen-com/hyperframes@c2996c8626 (2026-08-12). Data as JSON: /api/errors/a648ce3b256414cc. Report an issue: GitHub.