fix(installer): fix agent detection, global install, and add interactive agent selection#93
Merged
Merged
Conversation
Tests for global -g flag and --agent profile relied on Cursor being detected via macapp:Cursor, which only works on macOS. CI (Ubuntu) has no /Applications/Cursor.app, so detection returned empty and the assertions failed. Extract args-building into exported buildSkillsAddArgs() and test it directly — no detection, no file system, no OS dependency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shellEscapemissing closing quote — allcommand:-based agent detections (claude, gemini, opencode, codex, …) silently returnednot foundbecausesh -c "command -v 'claude"is a syntax error; only agents with amacapp:fallback (Cursor) were detectedinstallViaSkillsnever passed-gtonpx skills add, so global and local modes both installed project-local--alloverriding agent profile filter — replaced--allshorthand with explicit--agent <profile> --skill '*'so the per-provider profile is respectedfetchSkillignoring bundled skills — when run vianpx,detectRepoRoot()returned null (noplugins/in the npm package) so skills were always fetched over HTTPS even thoughskills/ships in the package; now falls back to__dirname/../skills/before hitting the network--only,--non-interactive, or single-agent scenarios--help— document--non-interactive, the two-prompt flow, and--onlyskipping agent selectionTest plan
shellEscapeunit tests: plain strings, embedded quotes, shell round-trip viaprintf,command -vdetection--agent <profile> --skill '*' -gappear;--allabsent-g, paths target cwd.claude/skills/and.agents/skills/--only <unknown>exits non-zero with "unknown agent" error--non-interactive --localexits 0 without hangingAll 22 tests pass (
npm test).🤖 Generated with Claude Code