affaan-m/ECC · error · Error
Missing value for ${argName}
Error message
Missing value for ${argName} What it means
Thrown by requireValue() in skills-health.js when a value-taking flag (--runs-file, --now, --panel, --warn-threshold) is followed by no token or by a token beginning with '--'. As with other ECC CLIs, the parser refuses to consume a neighboring flag as a value.
Source
Thrown at scripts/skills-health.js:29
Options:
--json Emit machine-readable JSON
--skills-root <path> Override curated skills root
--learned-root <path> Override learned skills root
--imported-root <path> Override imported skills root
--home <path> Override home directory for learned/imported skill roots
--runs-file <path> Override skill run JSONL path
--now <timestamp> Override current time for deterministic reports
--dashboard Show rich health dashboard with charts
--panel <name> Show only a specific panel (success-rate, failures, amendments, versions)
--warn-threshold <n> Decline sensitivity threshold (default: 0.1)
--help Show this help text
`);
}
function requireValue(argv, index, argName) {
const value = argv[index + 1];
if (!value || value.startsWith('--')) {
throw new Error(`Missing value for ${argName}`);
}
return value;
}
function parseArgs(argv) {
const options = {};
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index];
if (arg === '--json') {
options.json = true;
continue;
}
if (arg === '--help' || arg === '-h') {
options.help = true;View on GitHub (pinned to 01e15490f0)
Solutions
- Supply the value right after the flag: `--panel failures`.
- Use a numeric for --warn-threshold (e.g. `--warn-threshold 0.2`).
- Re-run with --help to confirm which flags take values.
Example fix
# before node scripts/skills-health.js --panel --json # after node scripts/skills-health.js --panel failures --json
Defensive patterns
Strategy: validation
Validate before calling
const VALUE_FLAGS = new Set(['--runs-file', '--now', '--panel', '--warn-threshold']);
for (let i = 0; i < argv.length; i += 1) {
if (VALUE_FLAGS.has(argv[i]) && (!argv[i + 1] || argv[i + 1].startsWith('--'))) {
throw new Error(`Missing value for ${argv[i]}`);
}
} Try / catch
try { parseArgs(process.argv.slice(2)); } catch (err) { console.error(err.message); showHelp(); process.exit(2); } Prevention
- Pre-flight value-flags before invoking skills-health.
- Use `--flag=value` form to prevent adjacent-flag collisions.
When it happens
Trigger: `node scripts/skills-health.js --panel` with nothing after; `--warn-threshold --json` (the boolean flag is read as the threshold); a dropped/quoted value.
Common situations: Trailing value-flag at end of command; reordering flags so they collide; typos where the user expected a boolean.
Related errors
- Unknown argument: ${arg}
- --write requires a path
- Unknown argument: ${arg}
- Invalid ${flag}: expected a single cache path segment
- Unknown argument: ${arg}
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/2aa8ea06662c36ff.
Report an issue: GitHub.