feat(shared-skills): add user skill sources

This commit is contained in:
YeonGyu-Kim
2026-05-26 20:28:24 +09:00
parent 74ece8181a
commit 3ccbe2fd4f
94 changed files with 24640 additions and 0 deletions
+23
View File
@@ -1,4 +1,5 @@
import { describe, expect, test } from "bun:test"
import { stat } from "node:fs/promises"
describe("shared skills package manifest", () => {
test("#given root package metadata #when shared-skills package is required #then workspace and tarball entries include it", async () => {
@@ -22,4 +23,26 @@ describe("shared skills package manifest", () => {
description: "Cross-harness SKILL.md files shared between OMO and Codex",
})
})
test("#given shared user skills #when copied into the package #then frontmatter and resource directories are preserved", async () => {
// given
const copiedSkills = ["debugging", "programming", "refactor", "remove-ai-slops"] as const
// when
const skillFiles = await Promise.all(
copiedSkills.map(async (skillName) => ({
name: skillName,
content: await Bun.file(`packages/shared-skills/skills/${skillName}/SKILL.md`).text(),
})),
)
// then
for (const skill of skillFiles) {
expect(skill.content.startsWith("---\n")).toBe(true)
expect(skill.content).toContain(`name: ${skill.name}`)
}
expect((await stat("packages/shared-skills/skills/debugging/references")).isDirectory()).toBe(true)
expect((await stat("packages/shared-skills/skills/programming/references")).isDirectory()).toBe(true)
expect((await stat("packages/shared-skills/skills/programming/scripts")).isDirectory()).toBe(true)
})
})