Skip to content

feat(skills): version skill sources and add update/sync commands - #30

Merged
git-hulk merged 2 commits into
masterfrom
feat/versioned-skill-management
Sep 7, 2026
Merged

git-hulk merged 2 commits into
masterfrom
feat/versioned-skill-management

Conversation

@git-hulk

@git-hulk git-hulk commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Skill sources are now versioned per repository, following the design in
docs/2026-08-30-versioned-skill-management.md. A source can be installed
with a version query (owner/repo@latest, @v1, @v1.2.3, a branch, or
a commit SHA) that resolves against the remote's advertised refs using the
same rules as go get. The resolved version is locked in the manifest at
~/.clime/skills.yaml on the source entry rather than on each skill.

New commands:

  • clime skills update [source[@version]] re-resolves a source (or every
    source) and reinstalls its skills from the new version. The update is
    refused when the new catalog no longer lists an installed skill, so a
    skill is never removed implicitly.

  • clime skills sync reinstalls skills at the versions already locked in
    the manifest, using the local snapshot cache when available.

Older manifests are migrated on load: version queries embedded in source
strings and legacy per-skill versions move to the source entry, duplicate
source spellings fold together case-insensitively, and every installed
skill's source is listed. The pre-migration file is kept as
skills.yaml.bak. A source recorded before versions were tracked is
stamped with its resolved version on its next update or sync.

The manifest no longer persists description or installed_at for a
skill; both are derived from the catalog at a given version, so storing
them would create a second source of truth. skills list now shows NAME,
SOURCE, and VERSION.

Adds golang.org/x/mod for semver comparison.

Follow-up in this PR

The second commit restructures internal/skill around one type per
domain term — Source, Store/Snapshot, Catalog/Entry, Target, Manifest,
Manager/Events — so cmd/ is purely presentational. Removing a source
now also deletes its cached versions under ~/.clime/sources.

Test evidence

  • go build ./..., go vet ./... — clean
  • go test ./... -v — all packages pass (skill 4.9s, cmd 2.7s)

🤖 Generated with Claude Code

git-hulk and others added 2 commits September 3, 2026 21:19
Skill sources are now versioned per repository, following the design in
docs/2026-08-30-versioned-skill-management.md. A source can be installed
with a version query (`owner/repo@latest`, `@v1`, `@v1.2.3`, a branch, or
a commit SHA) that resolves against the remote's advertised refs using the
same rules as `go get`. The resolved version is locked in the manifest at
~/.clime/skills.yaml on the source entry rather than on each skill.

New commands:

  - `clime skills update [source[@Version]]` re-resolves a source (or every
    source) and reinstalls its skills from the new version. The update is
    refused when the new catalog no longer lists an installed skill, so a
    skill is never removed implicitly.

  - `clime skills sync` reinstalls skills at the versions already locked in
    the manifest, using the local snapshot cache when available.

Older manifests are migrated on load: version queries embedded in source
strings and legacy per-skill versions move to the source entry, duplicate
source spellings fold together case-insensitively, and sources recorded
before versions were tracked are stamped with their latest version. The
pre-migration file is kept as skills.yaml.bak.

The manifest no longer persists `description` or `installed_at` for a
skill; both are derived from the catalog at a given version, so storing
them would create a second source of truth. `skills list` now shows NAME,
SOURCE, and VERSION.

Adds golang.org/x/mod for semver comparison.

Assistant By Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The skill package had grown into a set of loosely related functions:
sources were raw strings re-parsed at every call site, github.go mixed
six concerns, and cmd/skills.go carried domain logic interleaved with
spinner rendering. Restructure the package around one type per domain
term:

  - Source (source.go): repository/path identity plus version query,
    parsed once at the boundary by ParseSource.

  - Store and Snapshot (store.go): the immutable per-version cache
    under ~/.clime/sources, and a source materialized on disk at one
    concrete version.

  - Catalog and Entry (catalog.go): what a source offers at a version,
    read from skills.yaml, marketplace.json, or plugin.json.

  - Target (target.go): the ~/.claude and ~/.codex destinations.

  - Manifest (manifest.go): the persistent install record; the legacy
    layout migration is quarantined in legacy.go.

  - Manager and Events (manager.go): install/update/sync/uninstall
    orchestration, reporting progress through an Events interface that
    cmd/ implements with spinners.

cmd/skills.go and cmd/plugin_skills.go become purely presentational,
and cmd/skill.go reuses Target instead of its own copy of the install
loop. Behavior tests moved with their behavior: the sync/update
lock-version tests now live in internal/skill/manager_test.go.

Two deliberate behavior changes:

  - LoadManifest no longer resolves versions over the network; a source
    recorded without a version is stamped on its next update or sync
    instead of at load time.

  - Removing a source now also deletes its cached versions under
    ~/.clime/sources.

Assistant By Claude Fable 5
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@git-hulk
git-hulk merged commit 51368dc into master Sep 7, 2026
4 checks 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.

1 participant