配置WSL路径但技能读不到 cc-switch
Quick fix
在 Windows 版 cc-switch 中无法直接读取或安装 WSL 的 ~/.agents/skills,需直接在 WSL 内安装并运行 Linux 版 cc-switch。
Symptom
Section titled “Symptom”已经配置WSL路径,但\\wsl.localhost\Ubuntu-22.04\home\cutem\\.agents\skills 下的技能好像读不到?跨文件系统统一管理会产生各种边界问题,根本原因是 cc-switch 只有一个 SSOT 和一个 DB,跑在 Windows 侧。WSL override dir 的设计初衷很窄:只是让 cc-switch 知道“这个 app 的配置在 WSL 里”,然后正确地读写 app 专属目录(如 .claude/skills)。By design,Windows CC Switch 不会扫描 WSL 的 ~/.agents/skills,因此会导致技能读取不完全或默认安装到 Windows 中。
停止在 Windows 桌面端管理 WSL 技能,改为直接在 WSL 子系统内部操作。
在 WSL 中下载并安装 Linux 版 cc-switch(以 v3.9.1 为例): wget https://github.com/farion1231/cc-switch/releases/download/v3.9.1/CC-Switch-v3.9.1-Linux.deb chmod 644 ~/CC-Switch-v3.9.1-Linux.deb sudo apt install ./CC-Switch-v3.9.1-Linux.deb
安装 WSL 运行 GUI 所需的系统依赖、中文字体及 Chromium 浏览器: sudo apt update sudo apt install -y libnss3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2t64 libxshmfence1 libxkbcommon0 sudo apt install -y fonts-noto-cjk fonts-wqy-zenhei fonts-wqy-microhei fonts-arphic-uming fonts-arphic-ukai fc-cache -fv sudo apt install -y chromium-browser xdg-settings set default-web-browser chromium.desktop
在 WSL 终端中直接运行 cc-switch 启动图形界面,此时即可正常读取和管理 WSL 内的技能目录。
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”本页汇总自 3 个真实 issue
- 为什么 Windows 版 cc-switch 不能直接读取 WSL 的 ~/.agents/skills?
- By design,Windows CC Switch 不会扫描 WSL 的 ~/.agents/skills。WSL 覆盖目录的设计初衷仅用于读写 app 专属目录(如 .claude/skills),跨文件系统统一管理会产生各种边界问题。
- 在 WSL 中运行 cc-switch 提示缺少依赖或无法显示界面怎么办?
- 需要确保 WSL 支持图形界面(如 WSLg),并在 WSL 中安装 GUI 依赖(如 libnss3 等)、中文字体(如 fonts-noto-cjk)以及 Chromium 浏览器。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。