MCPcopy Index your code
hub / github.com/coder/coder / writeSkillMetaFileInRoot

Function writeSkillMetaFileInRoot

agent/agentcontextconfig/api_test.go:26–38  ·  view source on GitHub ↗
(t *testing.T, skillsRoot, name, description string)

Source from the content-addressed store, hash-verified

24}
25
26func writeSkillMetaFileInRoot(t *testing.T, skillsRoot, name, description string) string {
27 t.Helper()
28
29 skillDir := filepath.Join(skillsRoot, name)
30 require.NoError(t, os.MkdirAll(skillDir, 0o755))
31 require.NoError(t, os.WriteFile(
32 filepath.Join(skillDir, "SKILL.md"),
33 []byte("---\nname: "+name+"\ndescription: "+description+"\n---\nSkill body"),
34 0o600,
35 ))
36
37 return skillDir
38}
39
40func writeSkillMetaFile(t *testing.T, dir, name, description string) string {
41 t.Helper()

Callers 3

writeSkillMetaFileFunction · 0.85
TestContextPartsFromDirFunction · 0.85
TestResolveFunction · 0.85

Calls 3

MkdirAllMethod · 0.80
HelperMethod · 0.65
WriteFileMethod · 0.65

Tested by

no test coverage detected