Skip to content

Add --global flag for system-wide skill installation#76

Open
julioyg wants to merge 2 commits intoLucaTools:mainfrom
julioyg:feature/global-skill-installation
Open

Add --global flag for system-wide skill installation#76
julioyg wants to merge 2 commits intoLucaTools:mainfrom
julioyg:feature/global-skill-installation

Conversation

@julioyg
Copy link
Copy Markdown

@julioyg julioyg commented Apr 22, 2026

Summary

Some skills are useful across all projects and shouldn't need a per-project Lucafile to install. This PR adds a --global flag to install, uninstall, and installed so users can manage skills at the system level.

New commands

# Install all skills from your global Lucafile
luca install --global

# Install a specific skill globally
luca install org/repo --skill my-skill --global

# Use a custom global Lucafile
luca install --global --spec ~/my-global-skills.yaml

# Uninstall a globally-installed skill
luca uninstall my-skill --global

# List globally-installed skills
luca installed --skills --global

Path conventions

Resource Path
Global Lucafile ~/.config/luca/Lucafile (XDG-style)
Global skill cache ~/.luca/skills/ (consistent with existing ~/.luca/tools/)
Global agent dirs Per agent — e.g. ~/.claude/skills/, ~/.config/opencode/skills/

Behaviour notes

  • Re-running luca install --global fetches the latest version of all skills — no separate update command needed
  • Project-local skills take precedence over global skills when agent tools resolve paths
  • repos: aliases in the global Lucafile work — the same spec parser is used
  • --global is skills-only; tools already install globally to ~/.luca/tools/
  • --global --only-tools is rejected with a clear validation error
  • .gitignore management and post-checkout hook installation are skipped in global mode (no project repo involved)

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
@julioyg julioyg marked this pull request as draft April 22, 2026 14:19
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.
@julioyg julioyg marked this pull request as ready for review April 22, 2026 14:36
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