vercel-labs/agent-skills · error · Error

UNKNOWN_ARG

UNKNOWN_ARG

Error message

UNKNOWN_ARG: ${arg}

What it means

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.

Source

Thrown at skills/vercel-optimize/scripts/collect-signals.mjs:46

const log = (...args) => console.error('[collect-signals]', ...args);

function parseArgs(argv) {
  let explicitProjectId = null;
  let continueWithoutObservability = process.env.VERCEL_OPTIMIZE_CONTINUE_WITHOUT_OBSERVABILITY === '1';
  let continueUnsupportedFramework = process.env.VERCEL_OPTIMIZE_CONTINUE_UNSUPPORTED_FRAMEWORK === '1';

  for (const arg of argv) {
    if (arg === '--continue-without-observability') {
      continueWithoutObservability = true;
      continue;
    }
    if (arg === '--continue-unsupported-framework') {
      continueUnsupportedFramework = true;
      continue;
    }
    if (arg.startsWith('--')) {
      throw new Error(`UNKNOWN_ARG: ${arg}`);
    }
    if (!explicitProjectId) {
      explicitProjectId = arg;
      continue;
    }
    throw new Error(`UNKNOWN_ARG: ${arg}`);
  }

  return { explicitProjectId, continueWithoutObservability, continueUnsupportedFramework };
}

async function main() {
  const { explicitProjectId, continueWithoutObservability, continueUnsupportedFramework } = parseArgs(process.argv.slice(2));

  log('checking Vercel CLI version…');
  const cli = await checkCliVersion();
  log(`vercel CLI v${cli.join('.')} OK`);

View on GitHub (pinned to b8caa260a4)

Solutions

  1. Remove the unsupported flag; collect-signals only accepts `--continue-without-observability`, `--continue-unsupported-framework`, and one positional projectId.
  2. Check the spelling against the two supported flags exactly.
  3. If you need to set the team, link the project or set VERCEL_PROJECT_ID + VERCEL_ORG_ID instead of a CLI flag.

Example fix

# before
$ node scripts/collect-signals.mjs --team acme prj_123
-> UNKNOWN_ARG: --team

# after — set scope via env/link, not a flag
$ VERCEL_PROJECT_ID=prj_123 VERCEL_ORG_ID=team_acme node scripts/collect-signals.mjs
Defensive patterns

Strategy: validation

Validate before calling

const ALLOWED_FLAGS = new Set(['--continue-without-observability', '--continue-unsupported-framework']);
function validateFlags(argv) {
  for (const a of argv) {
    if (a.startsWith('--') && !ALLOWED_FLAGS.has(a)) {
      throw new Error(`Unsupported flag ${a}. Allowed: ${[...ALLOWED_FLAGS].join(', ')}`);
    }
  }
}
validateFlags(process.argv.slice(2));

Type guard

function isKnownCollectFlag(arg) {
  return ['--continue-without-observability', '--continue-unsupported-framework'].includes(arg);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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).

Related errors


AI-assisted analysis of vercel-labs/agent-skills@b8caa260a4 (2026-08-13). Data as JSON: /api/errors/6e7cd021f87c51a8. Report an issue: GitHub.