feat(skills): add uncle-bob-craft third-party skill

This commit is contained in:
csh
2026-05-31 13:43:49 +08:00
parent 7db5e4a697
commit 7656ee2907
8 changed files with 146 additions and 5 deletions
+47 -1
View File
@@ -56,6 +56,7 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
"brooks-lint",
"codebase-recon",
"codebase-migrate",
"uncle-bob-craft",
],
)
@@ -115,6 +116,22 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
)
self.assertEqual(migrate["include_skill_dirs"], ["codebase-migrate"])
craft = next(
item for item in data["sources"] if item["id"] == "uncle-bob-craft"
)
self.assertEqual(
craft["upstream_repo"],
"https://github.com/sickn33/antigravity-awesome-skills.git",
)
self.assertEqual(craft["upstream_ref"], "main")
self.assertEqual(craft["sync_mode"], "copy_skill_dirs")
self.assertEqual(craft["snapshot_dir"], "antigravity-awesome-skills")
self.assertEqual(craft["skills_subdir"], "skills")
self.assertEqual(
craft["source_list"], "skills/thirdparty/.sources/uncle-bob-craft.list"
)
self.assertEqual(craft["include_skill_dirs"], ["uncle-bob-craft"])
def test_superpowers_manifest_prunes_non_superpowers_paths(self):
data = load_manifest()
superpowers = next(item for item in data["sources"] if item["id"] == "superpowers")
@@ -209,6 +226,26 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
clone_mirror = run_command("git", "clone", "--mirror", str(ROOT), str(mirror))
self.assertEqual(clone_mirror.returncode, 0, msg=clone_mirror.stderr)
thirdparty_ref = run_command(
"git",
f"--git-dir={mirror}",
"rev-parse",
"refs/remotes/origin/thirdparty/skill",
)
self.assertEqual(thirdparty_ref.returncode, 0, msg=thirdparty_ref.stderr)
expose_thirdparty_branch = run_command(
"git",
f"--git-dir={mirror}",
"update-ref",
"refs/heads/thirdparty/skill",
thirdparty_ref.stdout.strip(),
)
self.assertEqual(
expose_thirdparty_branch.returncode,
0,
msg=expose_thirdparty_branch.stderr,
)
clone_work = run_command("git", "clone", str(mirror), str(work))
self.assertEqual(clone_work.returncode, 0, msg=clone_work.stderr)
@@ -217,7 +254,16 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
)
self.assertEqual(set_remote.returncode, 0, msg=set_remote.stderr)
shutil.copy2(MANIFEST, work / ".gitea" / "ci" / "thirdparty_skills.json")
manifest_data = load_manifest()
manifest_data["sources"] = [
entry
for entry in manifest_data["sources"]
if entry["id"] == "andrej-karpathy-skills"
]
(work / ".gitea" / "ci" / "thirdparty_skills.json").write_text(
json.dumps(manifest_data, indent=2) + "\n",
encoding="utf-8",
)
shutil.copy2(SYNC_SCRIPT, work / ".gitea" / "ci" / "sync_thirdparty_skills.sh")
sync_result = run_command("bash", ".gitea/ci/sync_thirdparty_skills.sh", cwd=work)