Commit Graph

4 Commits

Author SHA1 Message Date
550f87d239 fix(scripts): prune never removes prod skills silently
install.ps1/-sh -Prune: a prod skill with no source in skills/ is
potentially lost knowledge. Now:
- interactive: ask per skill (default No)
- non-interactive: skip with warning
- -Yes/--yes: remove, but warn loudly
Also fixes WinPS 5.1 parse break: removed em-dash (UTF-8 0x94 reads as
" in cp1251) from install.ps1 — file is ASCII-clean again.
Lesson: pi-add-models got pruned because it lived only in prod, no source.
2026-08-20 13:38:14 +03:00
348f6f3108 feat(update-skills): dual install target — ~/.claude/skills + ~/.agents/skills (agent-neutral); pi settings hack removed (v0.2.1) 2026-08-12 21:43:00 +03:00
7ca5a5ad3c feat(install): add --prune flag to install.{ps1,sh} [skip-tdd: wrapper]
For each <name>/ dir in $target that has no matching skills/<name>/,
remove it. Catches stale installs after skill rename/retire
(motivating case: using-synology-ops just removed but install dir
lingered until manual rm).

Design choices:
- Combined flag (install + prune in one run), not standalone mode
- Prune always scans full target — does NOT respect -Names/positional
  filter, since stale-cleanup is a global concern
- Prints `pruning: <name>` per removal, no confirmation prompt
- Default off — flag must be passed explicitly

[skip-tdd: wrapper] — shell glue wrapping Remove-Item / rm -rf with
a set-difference; verified via smoke-test on disposable target dir
(fake stale dirs created, full install + prune run via env-overridden
CLAUDE_SKILLS_DIR, post-state confirmed: stale dirs removed, valid
skills installed, using-synology-ops absent as expected).

Closes 1/3 of [install-ps1] acceptance (the --prune flag). The
remaining doc .wiki/concepts/install-cross-platform.md is deferred
to a follow-up commit.
2026-05-25 13:11:10 +03:00
ef14594a9f Add scripts/install.ps1 — PowerShell port of install.sh
Native cmdlet equivalent of install.sh: same behavior (copy each
skills/<name>/ into ~\.claude\skills\<name>\, skip if SKILL.md is
missing, support $env:CLAUDE_SKILLS_DIR override and -Names filter).

Removes bash dependency on Windows — no need to invoke git-bash from
pwsh, mirrors the existing build.sh / build.ps1 pair.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 11:48:04 +03:00