Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/.system/skill-creator/scripts/init_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

SKILL_TEMPLATE = """---
name: {skill_name}
description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
description: "[TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]"
---

# {skill_title}
Expand Down
37 changes: 37 additions & 0 deletions skills/.system/skill-creator/tests/test_init_skill.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python3

import contextlib
import io
import sys
import tempfile
import unittest
from pathlib import Path


SCRIPTS_DIR = Path(__file__).resolve().parents[1] / "scripts"
sys.path.insert(0, str(SCRIPTS_DIR))

import init_skill
import quick_validate


class InitSkillTemplateTests(unittest.TestCase):
def test_generated_skill_template_passes_validator(self):
with tempfile.TemporaryDirectory() as tmpdir:
with contextlib.redirect_stdout(io.StringIO()):
skill_dir = init_skill.init_skill(
"example-skill",
tmpdir,
[],
False,
[],
)

self.assertIsNotNone(skill_dir)

valid, message = quick_validate.validate_skill(skill_dir)
self.assertTrue(valid, message)


if __name__ == "__main__":
unittest.main()