Skip to content

feat(skills): add --force/-f to skills install to reinstall installed skills#17

Merged
git-hulk merged 1 commit into
git-hulk:masterfrom
tallguys:feat/skills-install-force
Jul 9, 2026
Merged

feat(skills): add --force/-f to skills install to reinstall installed skills#17
git-hulk merged 1 commit into
git-hulk:masterfrom
tallguys:feat/skills-install-force

Conversation

@tallguys

@tallguys tallguys commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Problem

clime skills install <owner/repo> filters already-installed skills out of the selection picker (installFromRepo), so there's no way to reinstall/refresh a skill you already have from that command — you have to uninstall it first, then install and re-pick it.

The interactive Update installed skills action does exist, but it's only reachable by running clime skills install with no args and drilling into the source→action menu; it isn't available directly from install <repo>.

Change

Add --force / -f to skills install:

  • With a repo arg, already-installed skills are kept in the picker (labelled (reinstall)) instead of being filtered out, and installing overwrites their files.
  • Without --force, behavior is unchanged (installed skills are still filtered).
  • The interactive source menu and runSkillsSourceAction signatures are untouched, so existing interactive tests are unaffected.
$ clime skills install owner/repo --force
✓ Found N skill(s) in "owner/repo"
? Select skills to install (space to toggle, enter to confirm)
  ○ some-skill — ... (reinstall)
  ○ another-installed-skill — ... (reinstall)
  ○ a-new-skill — ...
  ...

Implementation notes

  • The candidate-filtering logic is extracted from installFromRepo into a pure selectInstallCandidates(repoSkills, manifest, force) helper so the force branch is unit-testable without the network/git path.
  • Reinstall relies on the existing overwrite behavior of installFiles (writes files in place) and Manifest.AddSkill (upsert by name), so no duplicate manifest entries.

Tests

New cmd/skills_force_test.go:

  • default mode filters out installed skills;
  • --force keeps installed skills and marks them (reinstall), without mislabelling not-installed ones;
  • empty repo yields no candidates.

go build ./..., go vet ./..., and go test ./... all pass. Also verified end-to-end against a real repo: install <repo> -f now lists the installed skills (marked (reinstall)) that plain install <repo> hides.

🤖 Generated with Claude Code

…ed skills

`clime skills install <repo>` filters out already-installed skills from
the selection picker, so there is no way to reinstall/refresh a skill you
already have (short of `uninstall` then `install`). The interactive
"Update installed skills" action exists but isn't reachable from the
`install <repo>` command directly.

Add `--force`/`-f`: when installing from a repo, already-installed skills
are kept in the picker (marked `(reinstall)`) instead of being filtered
out, and reinstalling overwrites their files. Non-force behavior and the
interactive source menu are unchanged.

The candidate-filtering logic is extracted into a pure
`selectInstallCandidates` helper and unit-tested for both default and
force modes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@git-hulk
git-hulk merged commit 3f04ed7 into git-hulk:master Jul 9, 2026
1 check passed
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.

2 participants