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

Function MatchesSkillPath

internal/skills/discovery/discovery.go:395–401  ·  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

393// MatchesSkillPath checks if a file path matches any known skill convention
394// and returns the skill name. Returns empty string if the path doesn't match.
395func MatchesSkillPath(filePath string) string {
396 m := matchSkillConventions(treeEntry{Path: filePath})
397 if m == nil {
398 return ""
399 }
400 return m.name
401}
402
403// MatchSkillPath checks if a file path matches any known skill convention
404// 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