Add --global flag for system-wide skill installation#76
Merged
albertodebortoli merged 6 commits intoLucaTools:mainfrom Apr 27, 2026
Merged
Conversation
Introduces global skill installation support so skills useful across all projects do not require a per-project Lucafile. New commands: - luca install --global (installs from ~/.config/luca/Lucafile) - luca install <repo> --skill <name> --global (install single skill) - luca install --global --spec <path> (custom global Lucafile) - luca uninstall <name> --global - luca installed --skills --global Path conventions: - Global Lucafile: ~/.config/luca/Lucafile - Global skill cache: ~/.luca/skills/ - Global agent dirs: per agent (e.g. ~/.claude/skills/) Implementation: - Added globalSkillsCacheFolder to FileManaging and relevant sub-protocols - Added AgentInfo.resolvedGlobalSkillsPath(homeDirectory:) for safe tilde expansion - SkillSymLinker, SkillUninstaller, InstalledSkillsLister support isGlobal parameter - Skips .gitignore management and git hook installation in global mode - --global and --only-tools are mutually exclusive Tests: 11 new unit tests covering AgentInfo expansion, global list/uninstall/symlink paths
fileExists(atPath:) follows symlinks and returns false once the target is deleted, so symlinks were silently skipped. Fix: remove agent symlinks before deleting the cache folder, while the symlink targets still exist.
| let package = Package( | ||
| name: "Luca", | ||
| platforms: [.macOS(.v13)], | ||
| platforms: [.macOS(.v14)], |
Member
There was a problem hiding this comment.
I have no problem with this but it is necessary for these changes?
| .package(url: "https://github.com/tuist/Noora", exact: "0.56.0"), | ||
| .package(url: "https://github.com/jpsim/Yams.git", exact: "6.1.0"), | ||
| .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0") | ||
| .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"), |
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "originHash" : "a31213e24adf1d343da5ebac02f62e47ad7592b105c37b1affd30cd2c4f9c737", | |||
| "originHash" : "4a3ad8fae5a41167e7c6a01e509b954827de48429c49753a85921d47a45c4914", | |||
Member
There was a problem hiding this comment.
Unclear why this changed since nothing else changed in the file.
Contributor
Author
There was a problem hiding this comment.
think it changed because of the update on package.swift file, (both reverted)
Member
|
From Claude Code: |
…l mode, and cleanup - Fix @Flag help text: clarify ~/.config/luca/Lucafile is the source spec, not a destination - Fix confirmation messages in Installer to say "globally" when isGlobal is true - Auto-promote installMode to .skillsOnly when --global is set, preventing unintended tool installation - Promote try? to try when creating ~/.config/luca/ so permission errors surface immediately - Revert Package.swift platform from .v14 back to .v13 (no macOS 14 API is used) - Remove trailing comma from Package.swift dependency list - Delete InstallCommandTests.swift (stub-only file with zero active tests) - Add lastIsGlobal tracking to SkillSymLinkerMock - Add InstallerTests coverage verifying global installs route to globalSkillsCacheFolder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….v13 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…global-skill-installation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Some skills are useful across all projects and shouldn't need a per-project
Lucafileto install. This PR adds a--globalflag toinstall,uninstall, andinstalledso users can manage skills at the system level.New commands
Path conventions
~/.config/luca/Lucafile(XDG-style)~/.luca/skills/(consistent with existing~/.luca/tools/)~/.claude/skills/,~/.config/opencode/skills/Behaviour notes
luca install --globalfetches the latest version of all skills — no separate update command neededrepos:aliases in the globalLucafilework — the same spec parser is used--globalis skills-only; tools already install globally to~/.luca/tools/--global --only-toolsis rejected with a clear validation error.gitignoremanagement and post-checkout hook installation are skipped in global mode (no project repo involved)