ReactiveX/rxjs · error · Error

--harness is required

Error message

--harness is required

What it means

Thrown by parseSkillArguments when argument parsing finishes without any --harness value. Every skill CLI action requires an explicit harness because it determines the target install layout.

Source

Thrown at packages/migrate/src/skill-cli.ts:96

  let projectRoot = process.cwd();
  let force = false;
  for (let index = 1; index < argv.length; index++) {
    const argument = argv[index];
    if (argument === '--harness') {
      const value = argv[++index];
      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');
      harness = value as SkillHarness;
    } else if (argument === '--project-root') {
      const value = argv[++index];
      if (!value) throw new Error('--project-root requires a directory');
      projectRoot = value;
    } else if (argument === '--force') {
      force = true;
    } else {
      throw new Error(`Unknown option: ${String(argument)}`);
    }
  }
  if (!harness) throw new Error('--harness is required');
  return { action, harness, projectRoot, force };
}

function writeJson(stream: Pick<NodeJS.WriteStream, 'write'>, value: unknown): void {
  stream.write(`${JSON.stringify(value, null, 2)}\n`);
}

function messageFor(error: unknown): string {
  return error instanceof Error ? error.message : String(error);
}

if (process.argv[1]?.replaceAll('\\', '/').endsWith('/skill-cli.js')) {
  runSkillCli(process.argv.slice(2)).then((status) => {
    process.exitCode = status;
  });
}

View on GitHub (pinned to 54796b38a5)

Solutions

  1. Add --harness codex|claude|cursor to the command
  2. Script templates should interpolate the harness variable and fail loudly when it is empty

Example fix

# before
rxjs-migrate-skill install --project-root .
# after
rxjs-migrate-skill install --harness claude --project-root .
Defensive patterns

Strategy: validation

Validate before calling

if (!argv.includes('--harness')) { console.error('--harness is required'); process.exit(2); }

Prevention

When it happens

Trigger: Running rxjs-migrate-skill install with only --project-root or --force and no --harness flag at all.

Common situations: Forgetting the harness; assuming it defaults to the detected environment.

Related errors


AI-assisted analysis of ReactiveX/rxjs@54796b38a5 (2026-08-28). Data as JSON: /api/errors/95b9003d590edf86. Report an issue: GitHub.