Symmetric to install-side --prune (e871c20). Removes
dist/<name>.skill files whose <name> is not in skills/*.
Design choices match install:
- Combined flag (build + prune in one run)
- Global scan, ignores -Names / positional filter
- Default off, print-and-delete, no confirmation
Bash wrinkle: when build.sh delegates to powershell.exe -File
build.ps1 (Windows-without-zip case), --prune is NOT forwarded.
Bash runs prune itself at the end of the script against the
shared dist/. Keeps the delegation surface narrow and the prune
logic single-sourced per shell.
[skip-tdd: wrapper] — same carve-out as install-side, smoke-test
evidence: fake dist/fake-stale-{sh,ps}.skill files created in real
dist/, ran build.{sh,ps1} --prune, verified fakes removed, real
caveman.skill etc. left intact.
Wiki .wiki/concepts/install-cross-platform.md extended:
- title broadened (Install → Install / Build)
- new "Build-side --prune" section
- scope note: dist-hermes/ is separate (managed by build-hermes.py)
Closes [install-ps1-build-prune-followup].
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.
PowerShell 5.1 on Russian Windows reads .ps1 files as ANSI (CP1251),
breaking em dashes and box-drawing characters in comments/strings.
Also fix NullArray error when Select-String finds no version match.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds the conversion infrastructure for the Hermes-rollout (Nous Research):
- hermes/mapping.yaml — per-skill schema (mode: auto|manual|skip|pending,
category, replace-rules, source override). Every skills/<name>/ has an
explicit entry; the build fails on unmapped skills.
- scripts/build-hermes.py — Python converter. Reads mapping.yaml; for auto
applies replace-rules to SKILL.md and copies the rest verbatim; for manual
copies hermes/skills/<source>/ as-is; for skip / pending records to
dist-hermes/SKIPPED.md.
- dist-hermes/ — pre-converted Hermes-flavour tree (committed; consumed by
the recursive installer in [hermes-installer-skill]). Includes 4 universal
skills: pulling-before-work, active-platform (with Linux+bash replacement
rule), project-discipline, using-markitdown. Plus SKIPPED.md listing
8 skip + 10 pending entries.
- README.md — adds "Build for Hermes" section, updates layout, mentions
hermes/, dist-hermes/, build-hermes.py.
Mapping is the source of truth for the audit table from
.wiki/concepts/hermes-skills-rollout-design.md (Q1-Q8). Pending entries
preserve the audit decision (intended mode/category) for the follow-up
tasks: hermes-flavour-mcp-setups, hermes-installer-skill,
hermes-mvp-coverage. Security carry-forward (extraheader-pattern,
POSIX-absolute paths, semver bumps) — infrastructure ready (replace-rules +
manual mode); concrete content lands in hermes-flavour-mcp-setups.
Smoke-tests: idempotent re-run produces no diff; replace-rules verified on
active-platform (Linux+bash); strict-mapping fail-fast verified on a
synthetic unmapped skill (exit 1).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
Stock macOS ships bash 3.2 (frozen 2007 due to GPLv3) and BSD find.
Both scripts used `mapfile` (bash 4+) and `find -printf` (GNU only),
so a fresh Mac user running `bash scripts/install.sh` died on line 11
before copying anything. Replace with a portable shell glob — same
sort order, no `find` dependency, works on bash 3.2 and 4+.
Verified on git-bash: 16 skills discovered, install dry-run copies all,
`build.sh` produces a valid archive.
See .wiki/concepts/install-portability.md for the full gotcha.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Split context7 concerns into two skills:
- using-context7 (policy, every-time): when to call, how to query well
- setup-context7 (infrastructure, one-time): install plugin, inject API
key, clean manual MCP entries, with confirmation gates
setup-context7 reuses an existing CONTEXT7_API_KEY by searching, in order:
~/.claude/settings.json → ~/.claude.json (top-level + project-scoped) →
~/.claude/settings.local.json → env. Asks the user only if nothing found.
Cross-platform (paths identical on Win/Linux/macOS; only JSON validator
differs). Phase-2 confirmation gate before any write; per-edit JSON
validation; rollback procedure documented.
using-context7 gets a small Prerequisites section pointing at
setup-context7 when MCP tools are missing.
Bonus fix: scripts/build.sh PS multi-arg bug. Comma-joined -Names didn't
split into [string[]] when build.ps1 was invoked via -File. Now the bash
side loops one PS invocation per skill.
Wiki: extended .wiki/concepts/context7-setup.md with the design rationale
(why split policy from setup) — template for future "X plugin + how to
use X" pairs. index.md and log.md updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- skills/active-platform/SKILL.md: default = Windows/PowerShell; trigger
phrases in RU+EN switch the active platform for the session; per-platform
conventions (chaining, paths, env vars, install scripts) documented
- dist/active-platform.skill: built archive
- .wiki/source/active-platform-decision.md: rationale (skill chosen over
global CLAUDE.md / project memory; user wanted a discoverable, iterable
artifact)
- scripts/build.sh: fix PS arg-passing — single-quotes were leaking into
-Names value, so multi-arg builds on Windows were rejected with
"not found in skills/"
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>