Skip to content

Skill updates silently overwrite local changes - cc-switch

Quick fix

Back up local changes before updating; the proposed fix will exclude locally modified Skills from “Update All.”

Error output
更新时整个目录被替换为上游内容,本地修改只留在 `skill-backups/`(最多 20 份),界面没有提示。
English translation

During an update, the entire directory is replaced with upstream content. Local changes remain only in `skill-backups/` (up to 20 copies), and the UI shows no warning.

In the reported 3.20.4, `update_skill` backs up the Skill, then runs `remove_dir_all` and copies upstream content. As a result, “Update All” silently overwrites local changes. Up to 20 backups are retained, but the UI provides no warning before the update.

When the recorded hash is empty, `local_hash_for_update_check` backfills it with the current local directory hash. If the Skill has local changes, that hash differs from the remote hash, so it can be incorrectly reported as having an update even when upstream is unchanged. In addition, `__pycache__` and `*.pyc` are included in hash calculations. A comment says backend PR #7781 proposes skipping the update comparison during the hash-backfill pass and excluding locally modified Skills from the update list. The Issue remains open, with no evidence of a merged fix.

  1. Before clicking “Check for Updates” or “Update All,” back up local changes in `~/.cc-switch/skills/<skill>/`; the current update process replaces the entire directory.

  2. For a Skill reported as needing an update because its recorded hash is empty while upstream has not changed, avoid “Update All”; the proposed backend fix skips the update comparison during the hash-backfill pass.

  3. To discard local changes and force a refresh, uninstall and reinstall the Skill as described in the Issue comments.

Toolcc-switch
Version3.20.4(报告的受影响版本)
PlatformsmacOS

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.