Files
ClaudeDo/tests/ClaudeDo.Worker.Tests/Skills/SkillFixtureBuilder.cs
T

54 lines
1.5 KiB
C#

namespace ClaudeDo.Worker.Tests.Skills;
/// <summary>Builds local fixture directories mirroring skill-repo layouts for FakeRepoCloner.</summary>
public static class SkillFixtureBuilder
{
public static string MultiSkillRepo(string rootDir)
{
WriteSkillMd(Path.Combine(rootDir, "skills", "ponytail"), """
---
name: ponytail
description: >
Ties hair into a ponytail.
Works on long hair only.
---
# Ponytail skill body
""");
WriteSkillMd(Path.Combine(rootDir, "skills", "ponytail-help"), """
---
name: ponytail-help
description: Help text for the ponytail skill.
---
# Ponytail help body
""");
return rootDir;
}
public static string RootSkillRepo(string rootDir)
{
WriteSkillMd(rootDir, """
---
name: solo-skill
description: A single root-level skill.
---
# Solo skill body
""");
return rootDir;
}
public static string EmptyRepo(string rootDir)
{
Directory.CreateDirectory(rootDir);
File.WriteAllText(Path.Combine(rootDir, "README.md"), "nothing to see here");
return rootDir;
}
private static void WriteSkillMd(string dir, string content)
{
Directory.CreateDirectory(dir);
File.WriteAllText(Path.Combine(dir, "SKILL.md"), content);
}
}