feat(worker): session skill registry (install/update/remove, pinned clone)

This commit is contained in:
Mika Kuns
2026-07-23 16:47:14 +02:00
committed by mika kuns
parent 54cdaf89d5
commit dea2b7db8b
8 changed files with 611 additions and 0 deletions
@@ -0,0 +1,53 @@
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);
}
}