{"record":{"id":"6e7cd021f87c51a8","repo":"vercel-labs/agent-skills","slug":"unknown-arg","errorCode":"UNKNOWN_ARG","errorMessage":"UNKNOWN_ARG: ${arg}","messagePattern":"UNKNOWN_ARG: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skills/vercel-optimize/scripts/collect-signals.mjs","lineNumber":46,"sourceCode":"\nconst log = (...args) => console.error('[collect-signals]', ...args);\n\nfunction parseArgs(argv) {\n  let explicitProjectId = null;\n  let continueWithoutObservability = process.env.VERCEL_OPTIMIZE_CONTINUE_WITHOUT_OBSERVABILITY === '1';\n  let continueUnsupportedFramework = process.env.VERCEL_OPTIMIZE_CONTINUE_UNSUPPORTED_FRAMEWORK === '1';\n\n  for (const arg of argv) {\n    if (arg === '--continue-without-observability') {\n      continueWithoutObservability = true;\n      continue;\n    }\n    if (arg === '--continue-unsupported-framework') {\n      continueUnsupportedFramework = true;\n      continue;\n    }\n    if (arg.startsWith('--')) {\n      throw new Error(`UNKNOWN_ARG: ${arg}`);\n    }\n    if (!explicitProjectId) {\n      explicitProjectId = arg;\n      continue;\n    }\n    throw new Error(`UNKNOWN_ARG: ${arg}`);\n  }\n\n  return { explicitProjectId, continueWithoutObservability, continueUnsupportedFramework };\n}\n\nasync function main() {\n  const { explicitProjectId, continueWithoutObservability, continueUnsupportedFramework } = parseArgs(process.argv.slice(2));\n\n  log('checking Vercel CLI version…');\n  const cli = await checkCliVersion();\n  log(`vercel CLI v${cli.join('.')} OK`);\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/vercel-labs/agent-skills/blob/b8caa260a420a73042e35521de4b5c8baf6446cc/skills/vercel-optimize/scripts/collect-signals.mjs#L28-L64","documentation":"Thrown by parseArgs() in collect-signals.mjs when an argument starts with `--` but is neither `--continue-without-observability` nor `--continue-unsupported-framework`. The parser whitelists exactly two flags; any other long option is treated as a typo and rejected to surface user mistakes early rather than silently ignoring a misspelled flag.","triggerScenarios":"Passing an unsupported flag like `--team`, `--org`, `--force`, or a typo such as `--continue-unsupported` (missing `-framework`); passing a flag meant for a different script.","commonSituations":"Copy-pasting flags from merge-signals/prepare-brief into collect-signals; misspelling the long flag name; assuming `--team` works here (it does not — scope comes from linking/env).","solutions":["Remove the unsupported flag; collect-signals only accepts `--continue-without-observability`, `--continue-unsupported-framework`, and one positional projectId.","Check the spelling against the two supported flags exactly.","If you need to set the team, link the project or set VERCEL_PROJECT_ID + VERCEL_ORG_ID instead of a CLI flag."],"exampleFix":"# before\n$ node scripts/collect-signals.mjs --team acme prj_123\n-> UNKNOWN_ARG: --team\n\n# after — set scope via env/link, not a flag\n$ VERCEL_PROJECT_ID=prj_123 VERCEL_ORG_ID=team_acme node scripts/collect-signals.mjs","handlingStrategy":"validation","validationCode":"const ALLOWED_FLAGS = new Set(['--continue-without-observability', '--continue-unsupported-framework']);\nfunction validateFlags(argv) {\n  for (const a of argv) {\n    if (a.startsWith('--') && !ALLOWED_FLAGS.has(a)) {\n      throw new Error(`Unsupported flag ${a}. Allowed: ${[...ALLOWED_FLAGS].join(', ')}`);\n    }\n  }\n}\nvalidateFlags(process.argv.slice(2));","typeGuard":"function isKnownCollectFlag(arg) {\n  return ['--continue-without-observability', '--continue-unsupported-framework'].includes(arg);\n}","tryCatchPattern":null,"preventionTips":["Check the script's documented flag list before passing options.","Do not copy flags from other scripts in this skill (they differ per script).","Set scope via env/link rather than nonexistent `--team`-style flags."],"tags":["arguments","cli","usage","vercel"],"backgroundTag":null,"analyzedSha":"b8caa260a420a73042e35521de4b5c8baf6446cc","analyzedAt":"2026-08-13T06:03:29.508Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}