Skip to content

feat(cli): installer options, help, and error-message fixes - #74

Merged
xaleryb merged 9 commits into
intel:mainfrom
vchamarthi:feat/installer-cli-polish
Oct 28, 2026
Merged

xaleryb merged 9 commits into
intel:mainfrom
vchamarthi:feat/installer-cli-polish

Conversation

@vchamarthi

@vchamarthi vchamarthi commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Small fixes and additions to bin/intel-skills.mjs, the installer. All local, no new dependencies, no network.

New

  • list --json (whole catalog, descriptions not cut at 100 chars), list --imported / --own
  • install --dry-run, install <a> <b> ... (several names; each attempted, failures listed, exit 1 if any failed)
  • uninstall <skill> --target|--dir (removes only <root>/<name>, and only if it holds a SKILL.md)
  • show <skill> --files (exactly what install would write), show <skill> --json (name, description, source, files)
  • verify <skill> --target|--dir (resolves the directory install wrote), verify --all, verify --all-problems (every drifted file, not the first four)
  • --version / -v

Fixed

  • install/verify accept flags before the skill name
  • unknown options are rejected (--forse used to be dropped silently; install <skill> --all used to install the whole catalog)
  • show with no name prints usage instead of invalid skill name: undefined
  • a misspelt --target is an error even when --dir is given (it used to be ignored)
  • show rejects unknown options and extra skill names
  • --help / -h after any subcommand prints usage and exits 0
  • unknown command is named; unknown skill suggests similar names
  • verify --path <file> says not a directory instead of raw ENOTDIR
  • list no longer shows YAML quotes around four descriptions

Checklist

  • description check: N/A, no skill text changed.
  • python3 tools/validate_skills.py passes locally.

Evidence

  • base: 5fdf63e
  • python3 -m unittest discover -s tools/tests -p 'test_cli_*.py': 47 tests, OK on Python 3.11 and 3.15. They skip themselves without node.
  • Before, on main: verify linux-perf --target claude-code, install --dry-run, uninstall, show --files, list --json, --version, install --help all print usage or ignore the flag.
  • After: install --all --dir D && verify --all --path D prints 33/33 verified. A bad name in install no-such-skill linux-perf still installs linux-perf, reports the failure, exits 1.
  • validate.yml gets steps for list --json/filters, show --files, uninstall, several names, and the unittest suite (test_cli_*.py).

Blast radius

bin/intel-skills.mjs, README.md (usage lines), validate.yml, new tools/tests/test_cli_*.py. Existing invocations (install <skill> --target T, verify <skill> --path P, plain list/show) are unchanged.

vchamarthi and others added 7 commits October 23, 2026 08:57
…rget with --dir

show now refuses unknown options and extra skill names, and prints
name, description, source and files as JSON with --json. verify
--all-problems lists every drifted file instead of the first four.
install and verify check --target even when --dir overrides the location.
Four new test files called node unconditionally, so without node the
suite raised 18 FileNotFoundError errors instead of skipping, contrary
to the workflow comment. They now carry the same skipIf as the others.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
The only dry-run check used one name, so dropping dryRun from the
multi-name loop survived every test and step while writing the whole
catalog.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
uninstall was the one command without rejectUnknownOptions and read
only its first name, so 'uninstall X --dry-run' deleted X and
'uninstall a b' removed a alone, both with exit 0.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
uninstall checked only for <root>/<name>/SKILL.md, so a user's own
skill or another hub's (my-notes) was deleted with exit 0, despite the
JSDoc's promise. It now resolves the name through skillDir first.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
verify read only its first name, so 'verify linux-perf xpu-discover'
checked one skill and exited 0 even if the other had drifted, and a name
next to --all was dropped without a word.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
The catalog check now refuses the old not-a-skill case first, so no CI case reached the SKILL.md guard: deleting it left the step green. A catalog name with no SKILL.md under it covers that branch again.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Ran on the head: the unit tests with and without node on PATH, every validate.yml step, and a mutation pass over the new guards. Pushed fixes, each with a check that fails without it:

  • 514e562: uninstall linux-perf --dir D --dry-run (also --forse, --path X, --all) deleted the skill with rc 0, and uninstall a b removed only a. Unknown options and a second name are now errors.
  • 9942b2f: uninstall my-notes --dir D deleted a folder that is not in the catalog but holds a SKILL.md. uninstall now takes catalog names only; ab7ea42 keeps the SKILL.md guard covered in CI.
  • f772d1c: verify linux-perf xpu-discover checked only the first name and exited 0. A second name, or a name with --all, is now an error.
  • 5eea0b3: dropping dryRun from the multi-name install loop wrote the whole catalog with CI green; CI now runs install --all --dry-run.
  • 9928308: four test_cli_* files errored without node (errors=18); they now skip.

Your call: with the catalog check, a skill later dropped from the catalog can no longer be removed with uninstall.

@xaleryb xaleryb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at ab7ea42 with the fixes from the comment above; CI is green on this head.

uninstall takes catalog names only, so a skill dropped from the catalog after it was installed could not be removed. --force skips only that check; the SKILL.md guard, the name check and the root check still apply. Without it the error names --force.

Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
@xaleryb

xaleryb commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

cc5bd8f answers the open point above: uninstall <skill> --force removes a skill that is no longer in the catalog. It skips only the catalog check; the SKILL.md guard, the name check and the root check still apply, and without --force the error now says to pass it. Covered in the uninstall CI step.

@xaleryb
xaleryb merged commit e04536c into intel:main Oct 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants