MCPcopy Create free account
hub / github.com/basecamp/hey-cli / newSkillCommand

Function newSkillCommand

internal/cmd/skill.go:16–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func newSkillCommand() *skillCommand {
17 sc := &skillCommand{}
18 sc.cmd = &cobra.Command{
19 Use: "skill",
20 Short: "Manage the embedded agent skill",
21 Long: "Print or install the SKILL.md embedded in this binary.",
22 RunE: func(cmd *cobra.Command, args []string) error {
23 data, err := skills.FS.ReadFile("hey/SKILL.md")
24 if err != nil {
25 return apierr.ErrAPI(0, fmt.Sprintf("reading embedded skill: %v", err))
26 }
27 if _, err = fmt.Fprint(cmd.OutOrStdout(), string(data)); err != nil {
28 return apierr.ErrAPI(0, fmt.Sprintf("writing skill output: %v", err))
29 }
30 return nil
31 },
32 }
33 sc.cmd.AddCommand(newSkillInstallCommand())
34 return sc
35}

Callers 1

newRootCmdFunction · 0.85

Calls 1

newSkillInstallCommandFunction · 0.85

Tested by

no test coverage detected