Repository navigation
feat(skills): version skill sources and add update/sync commands - #30
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, ora 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 everysource) 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 syncreinstalls skills at the versions already locked inthe 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
descriptionorinstalled_atfor askill; both are derived from the catalog at a given version, so storing
them would create a second source of truth.
skills listnow shows NAME,SOURCE, and VERSION.
Adds golang.org/x/mod for semver comparison.
Follow-up in this PR
The second commit restructures
internal/skillaround one type perdomain term — Source, Store/Snapshot, Catalog/Entry, Target, Manifest,
Manager/Events — so
cmd/is purely presentational. Removing a sourcenow also deletes its cached versions under ~/.clime/sources.
Test evidence
go build ./...,go vet ./...— cleango test ./... -v— all packages pass (skill 4.9s, cmd 2.7s)🤖 Generated with Claude Code