feat: rewrite skill creator skill in ts and bundle (#333)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-21 17:25:23 -08:00
committed by GitHub
parent e410edb6d0
commit a6f27c7971
17 changed files with 1079 additions and 797 deletions

View File

@@ -108,11 +108,15 @@ async function readSkillContent(
skillId: string,
skillsDir: string,
): Promise<string> {
// 1. Check bundled skills first (they have embedded content)
const bundledSkills = getBundledSkills();
// 1. Check bundled skills first (they have a path now)
const bundledSkills = await getBundledSkills();
const bundledSkill = bundledSkills.find((s) => s.id === skillId);
if (bundledSkill?.content) {
return bundledSkill.content;
if (bundledSkill?.path) {
try {
return await readFile(bundledSkill.path, "utf-8");
} catch {
// Bundled skill path not found, continue to other sources
}
}
// 2. Try global skills directory