affaan-m/ECC · error

skills:evaluate requires --skill

Error message

skills:evaluate requires --skill <id>

What it means

inspectSkillLoopTarget throws when the skills:evaluate target is requested without a --skill <id> option, so there is no skill to build the evaluation scaffold for. The faulting input is the missing options.skillId.

Solutions

  1. Invoke with: session-inspect ... skills:evaluate --skill <skill-id>.
  2. Use the skill id exactly as listed by skills:health.
  3. Add --skill for skills:amendify too — it has the same requirement.

Example fix

// before
SKILL_ID=""; node scripts/session-inspect.js skills:evaluate --skill "$SKILL_ID"
// after
node scripts/session-inspect.js skills:evaluate --skill security-review
Defensive patterns

Strategy: validation

Validate before calling

if (target === 'skills:evaluate' && !skillId) { console.error('skills:evaluate requires --skill <id>'); process.exit(2); }

Type guard

const hasSkillId = (o) => typeof o.skillId === 'string' && o.skillId.length > 0;

Try / catch

try { payload = skillLoopPayload(target, options); } catch (e) { console.error(e.message); process.exit(2); }

Prevention

When it happens

Trigger: Invoking `node scripts/session-inspect.js skills:evaluate` without --skill, or with --skill but an empty value.

Common situations: Switching from a target that needs no --skill to skills:evaluate and forgetting the flag; a value like `--skill ""` from a variable that is unset in the environment.

Understand the failure class

Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/abc256ec32cbc359. Report an issue: GitHub.

Appendix: source

Thrown at scripts/session-inspect.js:89

  });

  if (target === 'skills:health') {
    return buildSkillHealthReport(observations, {
      skillId: options.skillId || null
    });
  }

  if (target === 'skills:amendify') {
    if (!options.skillId) {
      throw new Error('skills:amendify requires --skill <id>');
    }

    return proposeSkillAmendment(options.skillId, observations);
  }

  if (target === 'skills:evaluate') {
    if (!options.skillId) {
      throw new Error('skills:evaluate requires --skill <id>');
    }

    return buildSkillEvaluationScaffold(options.skillId, observations, {
      amendmentId: options.amendmentId || null
    });
  }

  return null;
}

function main() {
  const { target, adapterId, targetType, writePath, listAdapters, skillId, amendmentId, observationsPath } = parseArgs(process.argv);

  if (listAdapters) {
    const registry = createAdapterRegistry();
    console.log(JSON.stringify({ adapters: registry.listAdapters() }, null, 2));
    return;
  }

View on GitHub (pinned to 8321021c54)