Fission-AI/OpenSpec · error

Refusing to generate: ${join(outDir, entry.name)} is a symli

Error message

Refusing to generate: ${join(outDir, entry.name)} is a symlink. Remove it and re-run.

What it means

Error "Refusing to generate: ${join(outDir, entry.name)} is a symlink. Remove it and re-run." thrown in Fission-AI/OpenSpec.

Source

Thrown at scripts/skillssh-shared.mjs:33

 * standalone distribution it would just churn the files on every release.
 */
export function stripVolatileFrontmatter(content) {
  return content.replace(/^ {2}generatedBy: .*\n/m, '');
}

/**
 * Remove existing skill subdirectories (clears any renamed/removed skills)
 * while preserving top-level files like README.md. Refuses to run if the tree
 * contains a symlink: deleting one would only unlink it, and a symlinked skill
 * directory would otherwise let later writes land outside the repo.
 */
export function cleanSkillSubdirectories(outDir) {
  mkdirSync(outDir, { recursive: true });
  const entries = readdirSync(outDir, { withFileTypes: true });
  // Reject before deleting anything so a bad tree is left fully intact.
  for (const entry of entries) {
    if (entry.isSymbolicLink()) {
      throw new Error(
        `Refusing to generate: ${join(outDir, entry.name)} is a symlink. Remove it and re-run.`
      );
    }
  }
  for (const entry of entries) {
    if (entry.isDirectory()) {
      rmSync(join(outDir, entry.name), { recursive: true, force: true });
    }
  }
}

/**
 * Create `<outDir>/<dirName>` and return its path, guaranteeing the write
 * target is a real directory contained in outDir — never a path-traversing
 * name and never a symlink that would redirect the write elsewhere.
 */
export function prepareSkillDirectory(outDir, dirName) {
  if (!/^[a-z0-9][a-z0-9-]*$/.test(dirName)) {

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at scripts/skillssh-shared.mjs:33 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/9d04f12cf72cc7ea. Report an issue: GitHub.