Add batch install mode with lock file support - #2
Merged
Merged
Conversation
Enable batch skill installation from a declarative .skills-versions file (similar to asdf's .tool-versions). When install-skill is invoked with no arguments, it reads .skills-versions from the current directory and installs all listed skills. A .skills-versions.lock file (JSON) records resolved versions for reproducible installs, similar to composer.lock. Key changes: - Make <skill> positional parameter optional (arity 0..1) - Add -u/--update flag to force re-resolution ignoring lock file - Add SkillCoordinates value class for resolved Maven coordinates - Add SkillVersionsFile parser (.skills-versions format) - Add SkillLockFile read/write with resolution plan computation - Refactor InstallSkillCommand: extract resolveSkillCoordinates(), installResolved(), installSingleSkill() for reuse in batch flow - Add installFromVersionsFile() batch install method - Add unit tests for SkillVersionsFile and SkillLockFile - Add integration tests for batch install, lock reuse, --update, no-arg error, and Maven coordinates in .skills-versions https://claude.ai/code/session_01S2WwJRMhqBfPyeM117hD6J
Document the full CLI usage including single-skill install, batch install from .skills-versions, lock file behavior, all CLI options, and examples. Add CLAUDE.md with architecture overview, key files, method flow, file formats, build commands, and testing patterns. https://claude.ai/code/session_01S2WwJRMhqBfPyeM117hD6J
- Test on Java 11 (project target) and Java 17 (current LTS) - Upgrade actions/checkout and actions/setup-java to v4 - Enable Maven dependency caching for faster builds https://claude.ai/code/session_01S2WwJRMhqBfPyeM117hD6J
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.
Summary
This PR adds batch installation mode to install-skill, allowing users to install multiple skills from a
.skills-versionsfile with reproducible resolution via a.skills-versions.lockfile. The CLI now supports two modes: single-skill install (existing behavior) and batch install from a versions file (new).Key Changes
Batch install mode: When invoked with no arguments,
install-skillreads.skills-versionsfrom the current directory and installs all listed skills sequentially.Lock file support: A
.skills-versions.lockfile (JSON format) records resolved Maven coordinates for reproducible installs across machines and CI environments. Subsequent runs reuse locked versions for unchanged entries, only re-resolving new or modified entries.New classes:
SkillVersionsFile— Parser for.skills-versionsfiles (one entry per line asname[@version])SkillLockFile— Reader/writer for.skills-versions.lockwith hand-rolled JSON serialization (no external dependency)SkillCoordinates— Immutable value class for resolved Maven coordinatesResolution plan computation:
SkillLockFile.computeResolutionPlan()compares desired vs. locked state, categorizing entries as reusable, needing re-resolution, or removed.CLI enhancements:
arity = "0..1")--update/-uflag to force re-resolution of all versions, ignoring the lock fileworkingDirectoryfield for testabilityRefactored coordinate resolution: Extracted
resolveSkillCoordinates()andresolveRegistryName()methods to support both single-skill and batch modes.Comprehensive tests: Added
SkillVersionsFileTest,SkillLockFileTest, and integration tests inInstallSkillITcovering batch install, lock reuse, and update scenarios.Documentation: Updated README with usage examples,
.skills-versionsformat, lock file behavior, and added CLAUDE.md for developer guidance.Implementation Details
lockVersionfield for forward compatibilityrequestedVersionfield in lock entries tracks what was requested (null means latest/RELEASE was requested)requestedVersionmatches the current request.skills-versionshttps://claude.ai/code/session_01S2WwJRMhqBfPyeM117hD6J