From 54db014c7c2ef81ef1737ba3c511b3b8d26f9be8 Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Fri, 15 May 2026 21:43:23 -0700 Subject: [PATCH] fix(sync): point sync.sh at this repo's plugin cache, not the private repo's (#402) sync.sh was written against the layout of mvanhorn/last30days-skill-private (`.../cache/last30days-skill-private/last30days-3/{version}`) and that path was never updated when this public repo got its own copy. Running sync.sh from here populated the BETA channel's cache (`/last30days-beta`) instead of this repo's own `/last30days` cache, so devs working in this repo could not test their changes via the public slash command without waiting for a marketplace release. Path now derives from this repo's own manifests: - marketplace name `last30days-skill` (.claude-plugin/marketplace.json) - plugin name `last30days` (.claude-plugin/plugin.json) Drops the `last30days-3-nogem` target along with it - that's a private-repo variant with no public equivalent. Updates test_sync_cache_path_uses_skill_version to assert the new path pattern and clarifies the COMMON_TARGETS comment so the next person editing it understands which marketplace/plugin name segments come from where. --- skills/last30days/scripts/sync.sh | 15 +++++++++------ tests/test_version_consistency.py | 5 ++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/skills/last30days/scripts/sync.sh b/skills/last30days/scripts/sync.sh index 2a63c5a..6ec3bba 100755 --- a/skills/last30days/scripts/sync.sh +++ b/skills/last30days/scripts/sync.sh @@ -7,12 +7,15 @@ SRC="$(cd "$(dirname "$0")/.." && pwd)" echo "Source: $SRC" COMMON_TARGETS=( - # Claude Code plugin cache: marketplace installs overwrite on update, - # but local development needs the cache kept in sync with the repo. - # Do NOT add ~/.claude/skills/last30days - it creates a duplicate - # /last30days-3 in the slash command menu alongside the plugin version. - "$HOME/.claude/plugins/cache/last30days-skill-private/last30days-3/3.2.1" - "$HOME/.claude/plugins/cache/last30days-skill-private/last30days-3-nogem/3.0.0-nogem" + # Claude Code plugin cache for this (public) repo's marketplace install. + # Marketplace name = last30days-skill (.claude-plugin/marketplace.json). + # Plugin name = last30days (.claude-plugin/plugin.json). + # Path shape = .../cache/{marketplace-name}/{plugin-name}/{version}. + # Marketplace pulls overwrite this on update; local sync keeps it fresh + # against the working tree so /last30days reflects local dev without + # waiting for a release. Do NOT add ~/.claude/skills/last30days - it + # creates a duplicate slash-command entry alongside the plugin version. + "$HOME/.claude/plugins/cache/last30days-skill/last30days/3.2.1" "$HOME/.agents/skills/last30days" "$HOME/.codex/skills/last30days" ) diff --git a/tests/test_version_consistency.py b/tests/test_version_consistency.py index b4ec79d..47d0255 100644 --- a/tests/test_version_consistency.py +++ b/tests/test_version_consistency.py @@ -24,7 +24,10 @@ class TestVersionConsistency(unittest.TestCase): def test_sync_cache_path_uses_skill_version(self) -> None: sync_text = (SKILL_ROOT / "scripts" / "sync.sh").read_text(encoding="utf-8") version = _skill_version() - self.assertIn(f'last30days-3/{version}"', sync_text) + self.assertIn( + f'last30days-skill/last30days/{version}"', + sync_text, + ) def test_memory_save_dir_uses_single_env_variable(self) -> None: skill_text = (SKILL_ROOT / "SKILL.md").read_text(encoding="utf-8")