Implement agenting skills support via Vercel Labs' skills#41
Open
albertodebortoli wants to merge 6 commits intomainfrom
Open
Implement agenting skills support via Vercel Labs' skills#41albertodebortoli wants to merge 6 commits intomainfrom
albertodebortoli wants to merge 6 commits intomainfrom
Conversation
dcb84d7 to
768b766
Compare
Extends `luca install` to also install agentic SKILL.md-based skills from Git repositories by delegating to `npx skills add`. Adds a new `skills:` key alongside `tools:` in the Lucafile, and `--only-tools` / `--only-skills` flags to the install command for selective installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a top-level `agents:` key to the Lucafile so skills can be targeted at specific agents (e.g. claude-code, github-copilot) via `--agent` flags. Also fixes the `npx skills add` hang by switching from `waitUntilExit()` (which depends on RunLoop and deadlocks on Swift Concurrency threads) to `terminationHandler` + `withCheckedContinuation`, closing stdin on the subprocess, and moving skill installation outside Noora's progress step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract installArchive, installExecutable, and validateArchitectureIfNeeded from Installer into a dedicated ToolInstaller struct behind a ToolInstalling protocol, mirroring the existing SkillInstaller/SkillInstalling pattern. Installer now delegates per-tool download and installation to ToolInstalling, retaining only orchestration responsibilities (spec loading, orphan unlinking, reinstall). Tests are updated accordingly: ToolInstallerTests covers the installation pipeline directly, InstallerTests wires a real ToolInstaller with a mock downloader for integration tests and ToolInstallerMock for orchestration tests.
reinstall belongs alongside install inside ToolInstaller — all its dependencies (binaryFinder, permissionManager, symLinker) were already there. Installer sheds those three stored properties and delegates via toolInstaller.reinstall(tool:). The regression test for binaryPath-aware reinstall moves to ToolInstallerTests and calls ToolInstaller directly.
768b766 to
dd6152a
Compare
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.
Add skills support to Luca
Extends
luca installto install agentic SKILL.md-based skills from Git repositories, alongside existing binary tool management.Description
skills:key in Lucafile: Declare agentic skills hosted in Git repositories. Each skill entry takes arepository(owner/reposhorthand or full HTTPS/GIT URL) and an optionalname. Omittingnameinstalls all skills from that repository.agents:key in Lucafile: Optional list of agent identifiers (e.g.claude-code,github-copilot,opencode) of supported agents to target when installing skills. When omitted, skills are installed for all supported agents.--only-tools/--only-skillsflags: Selective install modes onluca installto run only one half of the pipeline. Mutually exclusive; validated at argument parse time.SkillInstaller: New component behind aSkillInstallingprotocol. Builds and runsnpx skills add <repository> --yes [--skill name...] [--agent name...]viaSubprocessRunner. Verifiesnpxavailability before proceeding and maps non-zero exit codes to typed errors. skills is a tool developed and maintained by Vercel Labs.SubprocessRunner: NewSubprocessRunningabstraction wrappingFoundation.Process. UsesterminationHandler+withCheckedThrowingContinuation(instead ofwaitUntilExit()) to avoid deadlocking on Swift Concurrency threads. Closes stdin viaFileHandle.nullDeviceso subprocesses do not block waiting for input.SkillsInfoFactory: GroupsSkillentries from the spec by repository intoSkillSetbatches, merging per-repo entries (a repo listed without a name takes precedence and installs all its skills).ToolInstaller(refactor): Extracts the per-tool download, validate, and install pipeline out ofInstallerinto a dedicatedToolInstallerstruct behindToolInstalling. This creates a symmetric architecture — one installer per domain — and leavesInstalleras a pure orchestrator (spec loading, orphan unlinking, delegation).reinstallmoved toToolInstaller: All tool-specific dependencies (binaryFinder,permissionManager,symLinker) already lived inToolInstaller;reinstallmoved there too, shedding those stored properties fromInstaller.Lucafile example:
Type of Change
How Has This Been Tested?
New test files:
Tests/Core/SubprocessRunnerTests.swift— verifiesSubprocessRunneragainst real/bin/trueand/bin/falseexecutablesTests/Core/SkillInstallerTests.swift— coversnpxavailability check, argument construction, and error paths viaSubprocessRunnerMockTests/Core/SkillsInfoFactoryTests.swift— covers spec-based grouping, "all skills" vs named skills merging, and empty/nil casesTests/Core/ToolInstallerTests.swift— full pipeline tests (zip/tar.gz/executable, arch validation, reinstall) extracted from the formerInstallerTests, now callingToolInstallerdirectlyInstallerTestsupdated to useToolInstallerMockfor orchestration tests and a realToolInstaller+ mock downloader for integration testsScreenshots / Demo (if applicable)
Checklist
CI Considerations
Breaking Changes?
Additional Notes
npx(and Node.js) must be present in the environment for skill installation to work. Ifnpxis not found,luca installfails with a clear error message pointing the user to install Node.js. Skills installation is silently skipped when the Lucafile contains noskills:key.The
SubprocessRunnerdeadlock fix (terminationHandlerinstead ofwaitUntilExit()) is required because Swift Concurrency tasks do not run aRunLoop, whichwaitUntilExit()depends on internally.