MCPcopy Create free account
hub / github.com/cli/cli / writeSkill

Function writeSkill

pkg/cmd/skills/list/list_test.go:509–514  ·  view source on GitHub ↗
(t *testing.T, baseDir, relDir, content string)

Source from the content-addressed store, hash-verified

507}
508
509func writeSkill(t *testing.T, baseDir, relDir, content string) {
510 t.Helper()
511 skillDir := filepath.Join(baseDir, filepath.FromSlash(relDir))
512 require.NoError(t, os.MkdirAll(skillDir, 0o755))
513 require.NoError(t, os.WriteFile(filepath.Join(skillDir, "SKILL.md"), []byte(content), 0o644))
514}
515
516func remoteSkillFrontmatter(name, sourcePath, ref, pinned string) string {
517 return remoteSkillFrontmatterForRepo(name, "https://github.com/monalisa/skills-repo", sourcePath, ref, pinned)

Callers 1

TestListRunFunction · 0.70

Calls 4

JoinMethod · 0.80
MkdirAllMethod · 0.80
WriteFileMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected