affaan-m/ECC · error · Error

skills:amendify requires --skill <id>

Error message

skills:amendify requires --skill <id>

What it means

Thrown by session-inspect when the report target is 'skills:amendify' but options.skillId is falsy. Generating a skill amendment proposal requires knowing which skill to amend, so a missing --skill is treated as a hard precondition failure.

Source

Thrown at scripts/session-inspect.js:81

  return { target, adapterId, targetType, writePath, listAdapters, skillId, amendmentId, observationsPath };
}

function inspectSkillLoopTarget(target, options = {}) {
  const observations = readSkillObservations({
    cwd: options.cwd,
    projectRoot: options.cwd,
    observationsPath: options.observationsPath
  });

  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;
}

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Add `--skill <skill-id>` matching a directory under skills/.
  2. List available skills first (ls skills/) to copy the exact id.
  3. Confirm the target name; use skills:health if you want a cross-skill overview (it does not require --skill).

Example fix

# before
node scripts/session-inspect.js skills:amendify
# after
node scripts/session-inspect.js skills:amendify --skill tdd-workflow
Defensive patterns

Strategy: validation

Validate before calling

const argv = process.argv.slice(2);
if (argv.includes('skills:amendify')) {
  const i = argv.indexOf('--skill');
  if (i === -1 || !argv[i + 1]) { console.error('skills:amendify requires --skill <id>'); process.exit(2); }
}

Try / catch

try { buildReport({ target, skillId }); } catch (err) { console.error(err.message); process.exit(2); }

Prevention

When it happens

Trigger: Running `node scripts/session-inspect.js skills:amendify` with no --skill, or passing --skill with an empty value (which readArgValue-style parsing may strip).

Common situations: Forgetting that the amendify target is per-skill; copying an evaluate command and dropping --skill; auto-complete inserting the target name without the id.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/4ac08aa303c37dce. Report an issue: GitHub.