Skip to content

fix(skills): UUID resolution, ambiguity errors, delete command, short IDs#57

Merged
scotthavird merged 1 commit into
mainfrom
fix/skills-id-resolution-and-delete
May 23, 2026
Merged

fix(skills): UUID resolution, ambiguity errors, delete command, short IDs#57
scotthavird merged 1 commit into
mainfrom
fix/skills-id-resolution-and-delete

Conversation

@scotthavird
Copy link
Copy Markdown
Contributor

Summary

Closes the four CLI gaps that surfaced while installing one global skill:

  1. Silent name-match selection. `findSkillByName` returned the first match. Renamed to `resolveSkill` — accepts name or UUID, errors loudly on ambiguous names with each candidate's UUID/scope/confidence/state.
  2. No way to address a skill by ID. Every command that took `` now also accepts a UUID.
  3. No CLI delete. Added `promptconduit skills delete <name|uuid> [--yes]` → `DELETE /v1/skills/:id` (soft). Requires `--yes` on non-TTY.
  4. `list` didn't expose IDs. Text output now shows the first 8 chars of each UUID as a prefix column.

Plus: API client gains `GetSkill(id)`, `DeleteSkill(id)`, and a `deleteRequest` helper paralleling `patchRequest`.

Why now

Repeated runs of `skills generate` create duplicate skills with the same name but different IDs (the platform doesn't dedup across detection runs). Before this change, the CLI silently picked the first match — could approve, install, or reject the wrong row without any signal. Caught it manually this week; would have caused real damage in scripted/CI use.

Behavior contract

Scenario Before After
`install foo` with 2 `foo` rows Silently picks first Errors with both UUIDs + scope + state
`install ` N/A (UUIDs rejected by name validation) Hits `GET /v1/skills/:id`, installs that exact row
`approve ` with duplicates Silently picks first Same disambiguation error as install
`delete ` Didn't exist Confirms on TTY, requires `--yes` on non-TTY
`list` text output Just `/name` `<8-char-id> /name` so you can copy a UUID directly

Test plan

  • 10 new tests covering UUID resolution, name resolution (single+ambiguous), empty input, 404 on missing UUID, install-by-UUID disambiguation, ambiguity surfacing IDs in install error, delete via name + UUID, non-TTY refusal without `--yes`
  • All existing tests pass (`make test`)
  • Lint clean (`make lint` shows no new issues in changed files)
  • Smoke against prod: deleted the dupe `git-pr-workflow` row via CLI, approved + installed the survivor, file landed at `~/.claude/skills/git-pr-workflow/SKILL.md`

Out of scope (separate ticket)

  • Repo-detection bug where workspace-root sessions all tag as `promptconduit` regardless of which sub-repo edits happened. Different problem (CLI behavior at session start), bigger blast radius, deserves its own design.

Ships as v0.3.6 — additive, no breaking changes.

… IDs

Re-running 'skills generate' creates name duplicates by design (the
platform doesn't dedup across detection runs). Before this change, the
CLI silently picked the first match in any name lookup — install,
uninstall, approve, reject — so you could end up with the wrong row.
There was also no way to soft-delete a duplicate from the CLI.

Changes:
- Positional argument on install/uninstall/approve/reject/delete now
  accepts either a skill name or a UUID. UUIDs route through
  GET /v1/skills/:id directly; names use the list+filter path.
- Ambiguous name lookups now error loudly with each candidate's UUID,
  repo scope, confidence, and approval state — actionable surface for
  picking the right row.
- New 'promptconduit skills delete <name|uuid> [--yes]' calls
  DELETE /v1/skills/:id (soft-delete). Requires --yes on non-TTY.
- 'skills list' now shows the first 8 chars of each skill's UUID as a
  prefix column, so users can copy a UUID into install/delete/etc.
  without dropping to --format json.
- Resolved name shown in approve/reject output (friendlier than echoing
  a UUID back when the user passed one).

API client additions:
- Client.GetSkill(id) — GET /v1/skills/:id
- Client.DeleteSkill(id) — DELETE /v1/skills/:id (soft)
- Client.deleteRequest helper, paralleling patchRequest
@scotthavird scotthavird merged commit 2ef6d34 into main May 23, 2026
1 check passed
@scotthavird scotthavird deleted the fix/skills-id-resolution-and-delete branch May 23, 2026 03:18
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