MCPcopy Create free account
hub / github.com/JordanCoin/codemap / runSkillList

Function runSkillList

cmd/skill.go:39–60  ·  view source on GitHub ↗
(root string)

Source from the content-addressed store, hash-verified

37}
38
39func runSkillList(root string) {
40 idx, err := skills.LoadSkills(root)
41 if err != nil {
42 fmt.Fprintf(os.Stderr, "Error loading skills: %v\n", err)
43 os.Exit(1)
44 }
45
46 if len(idx.Skills) == 0 {
47 fmt.Println("No skills found.")
48 return
49 }
50
51 fmt.Printf("Available skills (%d):\n\n", len(idx.Skills))
52 for _, s := range idx.Skills {
53 source := fmt.Sprintf("[%s]", s.Source)
54 keywords := ""
55 if len(s.Meta.Keywords) > 0 {
56 keywords = fmt.Sprintf(" (%s)", strings.Join(s.Meta.Keywords, ", "))
57 }
58 fmt.Printf(" %-20s %-10s %s%s\n", s.Meta.Name, source, s.Meta.Description, keywords)
59 }
60}
61
62func runSkillShow(root, name string) {
63 idx, err := skills.LoadSkills(root)

Callers 1

RunSkillFunction · 0.85

Calls 1

LoadSkillsFunction · 0.92

Tested by

no test coverage detected