feat(cli): Add interactive skill picker for dotagents add#31
Conversation
When a repo contains multiple skills and the user hasn't specified --name or --all, present an interactive multiselect prompt (via @clack/prompts) so they can pick which skills to add. Non-TTY environments retain the current error behavior. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/R6EttaJuTcw8L33gP-5t82VySXm4eadM4jnisCjQuS4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The interactive "select all" path was missing the duplicate wildcard guard that the --all flag path has, allowing duplicate wildcard entries in agents.toml. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/pgZaHzduxghyisSik8y-K80PIfcUI2MfQN0hK5wGT8k
…essage Track which skills were actually added vs skipped as duplicates, and only report the added ones. Error if all selected skills already exist. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
src/cli/commands/add.ts
Outdated
| }); | ||
| } | ||
| await runInstall({ scope }); | ||
| return selected; |
There was a problem hiding this comment.
Return value includes skipped already-existing skills
Medium Severity
When multiple (but not all) skills are selected interactively, the loop silently skips skills that already exist in config via continue, but return selected returns the full user selection — including skipped skills. The caller then prints "Added skills: X, Y, Z" even for skills that weren't actually added. If every selected skill already exists, none are added yet the success message still appears, and runInstall runs unnecessarily.
Additional Locations (1)
There was a problem hiding this comment.
Already fixed in 4dbd254 — we now track added separately and return only actually-added skills, with an error if all selected already exist.
| exclude: [], | ||
| }); | ||
| await runInstall({ scope }); | ||
| return "*"; |
There was a problem hiding this comment.
Duplicated wildcard addition logic across two code paths
Low Severity
The wildcard addition logic (duplicate check, addWildcardToConfig call, runInstall, and return "*") is copy-pasted identically from the --all flag path (lines 68–80) into the new interactive "all selected" path (lines 149–159). If the wildcard-addition behavior ever changes, both sites need updating independently, risking inconsistent bug fixes.
Additional Locations (1)
There was a problem hiding this comment.
Intentional — the two call sites are in different control flow contexts (--all flag vs interactive selection) and the duplication is small. Extracting a helper here would be premature abstraction per project guidelines.


When a repo contains multiple skills and the user hasn't specified
--nameor--all, present an interactive multiselect prompt so they can pick which skills to add. Non-TTY environments (CI, piped output) retain the current error-with-suggestions behavior.Uses
@clack/promptsmultiselect()(already a dependency) following the same pattern as the interactiveinitcommand. Selecting all skills adds a wildcard entry, selecting one or more adds them individually.Agent transcript: https://claudescope.sentry.dev/share/a7zMsQbGvgNK2JqarFg_J6DiDOUOy5IKTD6GWXNnjNo