Maintain AI agent skills — add from upstream repositories, update from upstream sources, check for updates, sync with upstream, and manage skill provenance. Works in any project. Triggers on 'add skill from [URL]', 'install skill', 'update skills', 'sync skills from upstream', 'check for skill updates', 'which skills are from upstream?', 'compare skill with upstream', or 'update the anthropic skills'.
Maintain AI agent skills — add new skills from external sources, update existing skills from upstream, and manage skill provenance tracking. Works in any project context.
Before performing any operation, detect the environment:
# Check if this is a Nix config repo with Home Manager skill infrastructure
if [ -f "flake.nix" ] && [ -d "modules/home-manager/features/ai-tools" ]; then
echo "nix-config-repo"
else
echo "generic-project"
fi
Always ask the user where to install. Present applicable options based on context:
Where would you like to install this skill?
modules/home-manager/features/ai-tools/common/skills/general/ (all systems)modules/home-manager/features/ai-tools/common/skills/work/ (work profile)modules/home-manager/features/ai-tools/common/skills/personal/ (personal profile).agents/skills/ (this repo only)Where would you like to install this skill?
- Project-level —
.agents/skills/(this repo only)- Specific coding tool — directly into a tool's config directory
When the user chooses "specific coding tool", ask which tool:
| Tool | Skill Path |
|---|---|
| OpenCode | ~/.config/opencode/skills/ |
| Claude Code | ~/.claude/skills/ |
| Factory.ai | ~/.factory/skills/ |
If the user's tool is not listed, ask them for the path.
Skills from external sources have an upstream field in their YAML frontmatter:
---