perf(skills): cut skill tokens and load hooks from cached bytecode

Hooks start their script as __main__ from cached bytecode instead of recompiling it on every call, and the installer migrates registered old hook commands to that form. A disabled plugin is written as false instead of deleted, because a deleted key in settings.local.json lets a true in settings.json win; the auto-compact window drops to 300000. The coach hour prints one ready line chosen by the time of day instead of asking the agent to load the skill, kvb-cleanup moves its procedure into plan.md, and the token counter reads subagent transcripts too and counts with Counter and defaultdict instead of .get defaults.

🎯 Fix: 88 %
💥 Break: 8 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 81
🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-18 19:40:37 +00:00
1 parent d695bb2b58
commit 6c63c364bd
13 files changed
+250 -130

No files matched your search

+4 -1
View File
@@ -36,6 +36,9 @@ class TestContext(unittest.TestCase):
]
(self.root / "project").mkdir()
(self.root / "project" / "session.jsonl").write_text("\n".join(lines) + "\n", encoding="utf-8")
subagents = self.root / "project" / "session" / "subagents"
subagents.mkdir(parents=True)
(subagents / "agent-a1.jsonl").write_text(turn(self.today, "s1", 0) + "\n", encoding="utf-8")
def _run(self, *args: str) -> subprocess.CompletedProcess:
return subprocess.run(
@@ -52,7 +55,7 @@ class TestContext(unittest.TestCase):
)
self.assertEqual(
(today["day"], today["turns"], today["tokens"], today["compactions"], today["over"]["300000"]),
(self.today, 2, 450_100, 1, {"turns": 50, "tokens": 22}),
(self.today, 3, 450_200, 1, {"turns": 33, "tokens": 22}),
)
def test_usage_errors_exit_2(self):