get-skills-skill (interactive)
Install skills based on input, global/local selectable:
- Fetches the requested skill via npx.
- Prompts if the target is missing: "Install globally or locally?"
- Creates missing skills folders and opencode.json.
- Moves the skill into the target.
- Updates the correct opencode.json.
- Returns success or error.
Prompt formats:
- "Install the skill from <repo/url> --skill "
- "Install the skill from <repo/url> global"
- "Install the skill from <repo/url> local"
No CLI needed – use as an OpenCode skill.
Behavior
- Detects
--skill <name>in the prompt - Detects
global/localand prompts if missing - Updates opencode.json with
"<skill>": "allow" - Returns
success,message, optionalerror, and on successskill,target,config
Output example
Success: { "success": true, "message": "Skill installed and registered", "skill": "pdf", "target": "/home/tk/.config/opencode/skills/pdf", "config": "/home/tk/.config/opencode/opencode.json" }
Error: { "success": false, "message": "Temp skills directory not found after npx install" }