skillshare icon indicating copy to clipboard operation
skillshare copied to clipboard

Bug: -s/--skill flag installs all agents from repo

Open dotned opened this issue 6 months ago • 1 comments

Summary

Using -s/--skill to select a specific skill also installs all agents from the repo. The -a/--agent flag does not have the inverse problem because it implicitly sets opts.Kind = "agent", but -s/--skill does not set opts.Kind = "skill".

Steps to reproduce

  1. Have a repo with both skills and agents (e.g. 3 skills, 2 agents)
  2. Install a specific skill:
skillshare install [email protected]:Acme/skills -s example-pr-description
  1. Both agents are installed alongside the selected skill

Expected behaviour

Only the specified skill should be installed. Agents should only be installed when explicitly requested via -a or --all.

Workaround

Adding --kind skill suppresses agent installation:

skillshare install [email protected]:Acme/skills -s example-pr-description --kind skill

Root cause

In cmd/skillshare/install.go, the -a/--agent flag handler sets opts.Kind = "agent" (line 116), but the -s/--skill flag handler does not set opts.Kind = "skill".

In cmd/skillshare/install_handlers.go, installDiscoveredAgents() (line 1111) only skips agent installation when opts.Kind == "skill" (line 1115). Since -s never sets this, agents are always installed from mixed repos.

Suggested fix

Either:

  • Set opts.Kind = "skill" when -s/--skill is used (matching the -a/--agent behaviour)
  • Or add a check in installDiscoveredAgents() for len(opts.SkillNames) > 0

Environment

skillshare version: 0.20.2
OS: Windows

dotned avatar May 31 '26 17:05 dotned

Fixed in v0.20.3 — thanks for the precise root-cause analysis, that made this an easy fix. 🙏

-s/--skill now scopes the install correctly:

  • -s <names> installs only the named skills — no agents
  • -s <names> -a <names> installs the named skills and the named agents
  • --all/--yes still install everything

As a bonus, an unknown -a name now fails the whole command up front (before any skill is installed), so automation never sees a half-completed install.

You no longer need the --kind skill workaround. Let me know if anything still looks off!

runkids avatar Jun 01 '26 08:06 runkids