feat(autotune): persist skills to repo and mirrors
A skill written only under .claude/skills is lost on the next install, and one written only into the skills repository is not live until the next restart, so both writers now do both: locate the operator's skills repository through an ordered first-hit lookup, write the source of truth there, then mirror the whole skill directory into the live locations so hooks and references come along. The lookup ends in a question to the operator rather than a silent skip when no repository matches. autoskill routes to the same section instead of carrying its own copy of the paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,20 @@ class TestAutotuneSkill(unittest.TestCase):
|
||||
self.assertIn("multiSelect: false", text)
|
||||
|
||||
|
||||
class TestSkillPersistence(unittest.TestCase):
|
||||
"""Both skill writers must persist to the skills repository AND the live dirs."""
|
||||
|
||||
def test_autotune_names_every_target(self):
|
||||
text = SKILL.read_text(encoding="utf-8")
|
||||
for target in ("SKILLS_REPO", "skills/<name>/SKILL.md", "~/.claude/skills/", "~/.agents/skills/"):
|
||||
self.assertIn(target, text)
|
||||
|
||||
def test_autoskill_routes_to_the_same_persistence(self):
|
||||
text = (REPO_ROOT / "skills" / "autoskill" / "SKILL.md").read_text(encoding="utf-8")
|
||||
for target in ("Persistence", "~/.claude/skills/", "~/.agents/skills/"):
|
||||
self.assertIn(target, text)
|
||||
|
||||
|
||||
class TestAutotuneHook(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
|
||||
Reference in New Issue
Block a user