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

Function MatchesSkillPath

internal/skills/discovery/discovery.go:424–430  ·  view source on GitHub ↗

MatchesSkillPath checks if a file path matches any known skill convention and returns the skill name. Returns empty string if the path doesn't match.

(filePath string)

Source from the content-addressed store, hash-verified

422// MatchesSkillPath checks if a file path matches any known skill convention
423// and returns the skill name. Returns empty string if the path doesn't match.
424func MatchesSkillPath(filePath string) string {
425 m := matchSkillConventions(treeEntry{Path: filePath})
426 if m == nil {
427 return ""
428 }
429 return m.name
430}
431
432// MatchSkillPath checks if a file path matches any known skill convention
433// and returns the skill name and namespace. Returns empty strings if the

Callers 1

TestMatchesSkillPathFunction · 0.85

Calls 1

matchSkillConventionsFunction · 0.85

Tested by 1

TestMatchesSkillPathFunction · 0.68