25 hyhmrright

sync-skill-cache Skill

把 Logic-Lens 工作副本中的 skills/ 同步到已安装的插件缓存,让 content-evals 测试的是编辑后的技能而非上次发布的版本。编辑任何 skills/**/SKILL.md 或 guide/_shared 文件后、运行 content-evals 之前必须执行——否则评估会悄悄基于过期内容打分,浪费所有 token。也可用于确认缓存是否同步("缓存是最新的吗?"、"我的修改在评估里生效了吗?"、"检查技能缓存漂移")。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

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//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

  1. Sync + verify from the repo root:
   bash .claude/skills/sync-skill-cache/scripts/sync-cache.sh

The script reads the active version from package.json, rsyncs skills/ 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 prints OK … on success.

  1. If it prints DRIFT or a missing-cache error: do not run evals. The two common causes:
  • The cache dir for the current package.json version 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.
  1. 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.