From b9ca192c514d5ad8889aff5c1c8abfb7b1984c4e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 30 Oct 2026 19:25:03 +0100 Subject: [PATCH] fix(update): update every locked source and install for Claude Code only Co-Authored-By: Claude Opus 5.5 (1M context) --- scripts/update.sh | 2 +- tests/test_update.py | 46 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tests/test_update.py diff --git a/scripts/update.sh b/scripts/update.sh index fd58c99..bf6fe0b 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -30,6 +30,6 @@ fi log "skills: updating from ${lockfile}..." jq -r '.skills[].source' "${lockfile}" | sort -u | while read -r source; do log "skills: updating ${source}..." - npx --yes skills add --yes "${source}" + npx --yes skills add --yes --agent claude-code "${source}" /dev/null\necho "$@" >> "{self.log}"\n', encoding="utf-8") + npx.chmod(0o755) + for tool in ("jq", "sort"): + (self.bin / tool).symlink_to(shutil.which(tool)) + + def test_every_source_is_updated_for_claude_code_only(self): + lock = json.loads((REPO_ROOT / "skills-lock.json").read_text(encoding="utf-8")) + sources = sorted({entry["source"] for entry in lock["skills"].values()}) + subprocess.run( + ["bash", str(UPDATE)], + check=True, + capture_output=True, + env={"PATH": f"{self.bin}:/usr/bin:/bin"}, + stdin=subprocess.DEVNULL, + ) + calls = self.log.read_text(encoding="utf-8").splitlines() + self.assertEqual([c.split()[-1] for c in calls], sources) + for call in calls: + self.assertIn("--agent claude-code", call) + + +if __name__ == "__main__": + unittest.main()