MCPcopy Create free account
hub / github.com/compozy/agh / runLocalSkillViewCommand

Function runLocalSkillViewCommand

internal/cli/skill_commands.go:191–210  ·  view source on GitHub ↗
(
	cmd *cobra.Command,
	deps commandDeps,
	name string,
	filePath string,
	agentName string,
)

Source from the content-addressed store, hash-verified

189}
190
191func runLocalSkillViewCommand(
192 cmd *cobra.Command,
193 deps commandDeps,
194 name string,
195 filePath string,
196 agentName string,
197) error {
198 ctx, err := loadSkillCommandContext(cmd.Context(), deps, agentName)
199 if err != nil {
200 return err
201 }
202 skill, err := findSkillByName(ctx.skills, name)
203 if err != nil {
204 return err
205 }
206 if strings.TrimSpace(filePath) != "" {
207 return runLocalSkillResourceViewCommand(cmd, ctx, skill, filePath)
208 }
209 return runLocalSkillXMLViewCommand(cmd, ctx, skill)
210}
211
212func runLocalSkillResourceViewCommand(
213 cmd *cobra.Command,

Callers 1

runSkillViewCommandFunction · 0.85

Calls 4

loadSkillCommandContextFunction · 0.85
findSkillByNameFunction · 0.70

Tested by

no test coverage detected