sync-skill-cache
Sync the Logic-Lens working-copy skills/ into the installed plugin cache so content-evals test the EDITED skill, not the last published one. ALWAYS run this after editing any skills/**/SKILL.md or guide/_shared file and BEFORE running content-evals — otherwise the eval silently grades stale content and every token is wasted. Also use to verify the cache is in sync ("is the cache fresh?", "did my edit take effect in evals?", "check skill cache drift").
hyhmrright · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add hyhmrright/logic-lens --skill sync-skill-cache技能说明
name: sync-skill-cache description: Sync the Logic-Lens working-copy skills/ into the installed plugin cache so content-evals test the EDITED skill, not the last published one. ALWAYS run this after editing any skills/**/SKILL.md or guide/_shared file and BEFORE running content-evals — otherwise the eval silently grades stale content and every token is wasted. Also use to verify the cache is in sync ("is the cache fresh?", "did my edit take effect in evals?", "check skill cache drift"). disable-model-invocation: true
sync-skill-cache
content-evals invoke each skill through Claude Code's plugin mechanism, which loads from
~/.claude/plugins/cache/logic-lens-marketplace/logic-lens/<version>/skills/ — not the
repo's skills/. Editing skills/ changes nothing the eval sees until you copy it into the
cache. This is the single most expensive footgun in the iteration loop: skip it and you grade
the previous skill while believing you tested your change.
Steps
-
Sync + verify from the repo root:
bash .claude/skills/sync-skill-cache/scripts/sync-cache.shThe script reads the active version from
package.json, rsyncsskills/into the matching cache dir (--delete, so removed files are removed in the cache too), then diffs the two to confirm they are byte-identical. It printsOK …on success. -
If it prints
DRIFTor a missing-cache error: do not run evals. The two common causes:- The cache dir for the current
package.jsonversion doesn't exist (plugin not installed at this version) — reinstall/refresh the plugin, or check you didn't just bump the version without refreshing the cache. - rsync was blocked — rerun and read the diff list it prints.
- The cache dir for the current
-
Verify-only mode (no copy) to answer "is the cache fresh?":
bash .claude/skills/sync-skill-cache/scripts/sync-cache.sh --check
This skill is the mandatory gate between editing a skill and grading it. The iterate-skill
orchestrator calls it automatically; run it by hand whenever you edit a skill outside that loop.