(skill skillResult, agent, scope string)
| 584 | } |
| 585 | |
| 586 | func installCommandArgs(skill skillResult, agent, scope string) []string { |
| 587 | // Use the repo-relative directory path (e.g. "skills/author/name") |
| 588 | // for disambiguation when installing namespaced skills, so the |
| 589 | // install command can resolve the exact skill without ambiguity. |
| 590 | installArg := skill.SkillName |
| 591 | if skill.Namespace != "" { |
| 592 | installArg = strings.TrimSuffix(skill.Path, "/SKILL.md") |
| 593 | } |
| 594 | |
| 595 | return []string{ |
| 596 | "skills", "install", |
| 597 | "--agent", agent, |
| 598 | "--scope", scope, |
| 599 | // Keep untrusted repository and skill-selector values after -- so |
| 600 | // they cannot be parsed as flags. |
| 601 | "--", |
| 602 | skill.Repo, installArg, |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | // relevanceScore computes a numeric ranking score for a search result. |
| 607 | // Higher scores rank first. Signals (in priority order): |
no outgoing calls