{"record":{"id":"64766f7c17ddb16e","repo":"ReactiveX/rxjs","slug":"unknown-option-string-argument","errorCode":null,"errorMessage":"Unknown option: ${String(argument)}","messagePattern":"Unknown option: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/migrate/src/skill-cli.ts","lineNumber":93,"sourceCode":"    );\n  }\n  let harness: SkillHarness | undefined;\n  let projectRoot = process.cwd();\n  let force = false;\n  for (let index = 1; index < argv.length; index++) {\n    const argument = argv[index];\n    if (argument === '--harness') {\n      const value = argv[++index];\n      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');\n      harness = value as SkillHarness;\n    } else if (argument === '--project-root') {\n      const value = argv[++index];\n      if (!value) throw new Error('--project-root requires a directory');\n      projectRoot = value;\n    } else if (argument === '--force') {\n      force = true;\n    } else {\n      throw new Error(`Unknown option: ${String(argument)}`);\n    }\n  }\n  if (!harness) throw new Error('--harness is required');\n  return { action, harness, projectRoot, force };\n}\n\nfunction writeJson(stream: Pick<NodeJS.WriteStream, 'write'>, value: unknown): void {\n  stream.write(`${JSON.stringify(value, null, 2)}\\n`);\n}\n\nfunction messageFor(error: unknown): string {\n  return error instanceof Error ? error.message : String(error);\n}\n\nif (process.argv[1]?.replaceAll('\\\\', '/').endsWith('/skill-cli.js')) {\n  runSkillCli(process.argv.slice(2)).then((status) => {\n    process.exitCode = status;\n  });","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/skill-cli.ts#L75-L111","documentation":"Thrown by parseSkillArguments when a token other than the recognized flags (--harness, --project-root, --force) is encountered. The CLI has no pass-through options, so any extra token is rejected.","triggerScenarios":"Passing unsupported flags like --verbose or --dry-run, or a stray positional argument after the action.","commonSituations":"Assuming common CLI flags exist; copy-pasted options from other tools; shell glob expansion injecting extra tokens.","solutions":["Remove the unsupported option","Consult the usage string for the exact accepted flags","Use only: --harness <id>, --project-root <dir>, --force"],"exampleFix":"# before\nrxjs-migrate-skill check --harness claude --dry-run\n# after\nrxjs-migrate-skill check --harness claude","handlingStrategy":"validation","validationCode":"const allowed = new Set(['--harness','--project-root','--force']);\nfor (const a of argv.slice(1)) if (a.startsWith('--') && !allowed.has(a)) throw new TypeError(`Unknown option: ${a}`);","typeGuard":"const isKnownFlag = (f: string) => ['--harness','--project-root','--force'].includes(f);","tryCatchPattern":null,"preventionTips":["Check usage before adding flags","Avoid copy-pasting options from other tools"],"tags":["cli","arguments","validation"],"backgroundTag":"unknown-cli-option","analyzedSha":"54796b38a57e6309f9861e174737479bb3f63f61","analyzedAt":"2026-08-28T10:21:27.410Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}