Install a .skill file into a dotfiles-managed skills location so it becomes available globally in Claude Code.
Target directories
- private:
~/workspace/github.com/YosukeIida/dotfiles-private/agents/skills/— for personal/sensitive skills - public:
~/workspace/github.com/YosukeIida/personal-agent-skills/— for shareable skills (root-level<skill>/SKILL.mdlayout)
Steps
- Determine the skill name from the filename (strip
.skillextension) - Ask the user whether to install into private or public dotfiles before proceeding
- If the file is in
~/Downloads/, warn the user that macOS may block terminal access and ask them to move it to~/Desktop/or~/workspace/first - Create the destination directory:
<target>/<skill-name>/ - Extract using:
unzip -j <file> "*/SKILL.md" -d <dest> 2>/dev/null || unzip -j <file> "SKILL.md" -d <dest>- The
-jflag discards subdirectory paths, avoiding nested directory issues
- The
- Verify
SKILL.mdexists in the destination - Report the installed path
Notes
- If the user doesn't provide a path, ask for it
- If
~/Downloads/access fails with "Operation not permitted", instruct the user to move the file to~/Desktop/or~/workspace/(macOS privacy restriction)