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

Function runSkillShow

cmd/skill.go:62–89  ·  view source on GitHub ↗
(root, name string)

Source from the content-addressed store, hash-verified

60}
61
62func runSkillShow(root, name string) {
63 idx, err := skills.LoadSkills(root)
64 if err != nil {
65 fmt.Fprintf(os.Stderr, "Error loading skills: %v\n", err)
66 os.Exit(1)
67 }
68
69 skill, ok := idx.ByName[name]
70 if !ok {
71 fmt.Fprintf(os.Stderr, "Skill %q not found.\n", name)
72 fmt.Fprintln(os.Stderr, "Run 'codemap skill list' to see available skills.")
73 os.Exit(1)
74 }
75
76 fmt.Printf("# %s\n\n", skill.Meta.Name)
77 fmt.Printf("Source: %s\n", skill.Source)
78 if skill.Meta.Description != "" {
79 fmt.Printf("Description: %s\n", skill.Meta.Description)
80 }
81 if len(skill.Meta.Keywords) > 0 {
82 fmt.Printf("Keywords: %s\n", strings.Join(skill.Meta.Keywords, ", "))
83 }
84 if len(skill.Meta.Languages) > 0 {
85 fmt.Printf("Languages: %s\n", strings.Join(skill.Meta.Languages, ", "))
86 }
87 fmt.Println()
88 fmt.Println(skill.Body)
89}
90
91func runSkillInit(root string) {
92 skillsDir := root + "/.codemap/skills"

Callers 1

RunSkillFunction · 0.85

Calls 1

LoadSkillsFunction · 0.92

Tested by

no test coverage detected