MCPcopy Create free account
hub / github.com/cli/cli / installCommandArgs

Function installCommandArgs

pkg/cmd/skills/search/search.go:586–604  ·  view source on GitHub ↗
(skill skillResult, agent, scope string)

Source from the content-addressed store, hash-verified

584}
585
586func 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):

Callers 2

promptInstallFunction · 0.85
TestInstallCommandArgsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestInstallCommandArgsFunction · 0.68