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

Function runLocalSkillResourceViewCommand

internal/cli/skill_commands.go:212–230  ·  view source on GitHub ↗
(
	cmd *cobra.Command,
	ctx skillCommandContext,
	skill *skills.Skill,
	filePath string,
)

Source from the content-addressed store, hash-verified

210}
211
212func runLocalSkillResourceViewCommand(
213 cmd *cobra.Command,
214 ctx skillCommandContext,
215 skill *skills.Skill,
216 filePath string,
217) error {
218 content, err := readSkillResource(skill, ctx.bundledFS, filePath)
219 if err != nil {
220 return err
221 }
222 item := skillViewItem{
223 Name: skill.Meta.Name,
224 Source: skillSourceLabel(skill.Source),
225 Path: skill.FilePath,
226 File: strings.TrimSpace(filePath),
227 Content: content,
228 }
229 return writeCommandOutput(cmd, skillViewBundle(item, content))
230}
231
232func runLocalSkillXMLViewCommand(cmd *cobra.Command, ctx skillCommandContext, skill *skills.Skill) error {
233 resources, err := listSkillResources(skill, ctx.bundledFS)

Callers 1

runLocalSkillViewCommandFunction · 0.85

Calls 4

readSkillResourceFunction · 0.85
writeCommandOutputFunction · 0.85
skillViewBundleFunction · 0.85
skillSourceLabelFunction · 0.70

Tested by

no test coverage detected