Install a Claude Code skill from a GitHub skills repository URL.
Steps
Route the input. Decide whether the user gave a GitHub tree URL or a repo/skill reference.
- Completion criterion: the input is classified as exactly one of URL or reference.
Extract repo and skill path. For a tree URL of the form
https://github.com/OWNER/REPO/tree/<ref>/skills/<category>/<skill>, extractOWNER/REPOand the path underskills/— for example,productivity/writing-great-skills. If the user gaveOWNER/REPO <path>directly, use it as-is.- Completion criterion: both the repository and the skill path are identified.
Install for Claude Code. Run:
gh skill install <repo> <skill-path> --agent claude-code- Completion criterion: the command exits successfully.
Report result. Show the installed skill path and any warnings.
- Completion criterion: the user can see whether the install succeeded.
Failure modes
ghmissing or unauthenticated: stop and ask the user to rungh auth login.- URL with no
skills/segment: stop and ask for a repo/skill reference. gh skill installfails: print the full error and do not retry.