Skip to content

fix(installer): fix agent detection, global install, and add interactive agent selection#93

Merged
derek-palmer merged 2 commits into
mainfrom
fix/install-flags
Jun 2, 2026
Merged

fix(installer): fix agent detection, global install, and add interactive agent selection#93
derek-palmer merged 2 commits into
mainfrom
fix/install-flags

Conversation

@derek-palmer
Copy link
Copy Markdown
Owner

@derek-palmer derek-palmer commented Jun 2, 2026

Summary

  • Fix shellEscape missing closing quote — all command:-based agent detections (claude, gemini, opencode, codex, …) silently returned not found because sh -c "command -v 'claude" is a syntax error; only agents with a macapp: fallback (Cursor) were detected
  • Fix global install not being globalinstallViaSkills never passed -g to npx skills add, so global and local modes both installed project-local
  • Fix --all overriding agent profile filter — replaced --all shorthand with explicit --agent <profile> --skill '*' so the per-provider profile is respected
  • Fix fetchSkill ignoring bundled skills — when run via npx, detectRepoRoot() returned null (no plugins/ in the npm package) so skills were always fetched over HTTPS even though skills/ ships in the package; now falls back to __dirname/../skills/ before hitting the network
  • Add interactive agent selection — when multiple agents are detected and stdin/stdout are TTYs, the installer now prompts users to choose which agents to install to (numbered list, space-separated selection, default: all); skipped by --only, --non-interactive, or single-agent scenarios
  • Update README and --help — document --non-interactive, the two-prompt flow, and --only skipping agent selection

Test plan

  • shellEscape unit tests: plain strings, embedded quotes, shell round-trip via printf, command -v detection
  • Global dry-run: --agent <profile> --skill '*' -g appear; --all absent
  • Local dry-run: no -g, paths target cwd .claude/skills/ and .agents/skills/
  • --only <unknown> exits non-zero with "unknown agent" error
  • --non-interactive --local exits 0 without hanging

All 22 tests pass (npm test).

🤖 Generated with Claude Code

@derek-palmer derek-palmer changed the title fix agent selection and skills args fix(installer): fix agent detection, global install, and add interactive agent selection Jun 2, 2026
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>
@derek-palmer derek-palmer marked this pull request as ready for review June 2, 2026 14:32
@derek-palmer derek-palmer merged commit 7ce30a3 into main Jun 2, 2026
12 checks passed
@derek-palmer derek-palmer mentioned this pull request Jun 2, 2026
3 tasks
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.

1 participant