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

Method DisplayName

internal/skills/discovery/discovery.go:61–76  ·  view source on GitHub ↗

DisplayName returns the skill name, prefixed with namespace if present to disambiguate skills from different authors in the same repository. Skills discovered via non-standard conventions (plugins, root) include a convention tag to distinguish them from identically-named skills in the standard skill

()

Source from the content-addressed store, hash-verified

59// a convention tag to distinguish them from identically-named skills in
60// the standard skills/ directory.
61func (s Skill) DisplayName() string {
62 name := s.Name
63 if s.Namespace != "" {
64 name = s.Namespace + "/" + name
65 }
66 switch s.Convention {
67 case "plugins":
68 return "[plugins] " + name
69 case "root":
70 return "[root] " + name
71 case "hidden-dir", "hidden-dir-namespaced":
72 return "[hidden-dir] " + name
73 default:
74 return name
75 }
76}
77
78// InstallName returns the relative path used for the install directory.
79// For namespaced skills it returns "namespace/name" (creating a nested directory),

Callers 1

previewRunFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected