Installation failed: Skill directory does not exist cc-switch
Quick fix
Upgrade to cc-switch v3.14.0 or use local ZIP installation to fix URL install failures for repos with SKILL.md in the root.
Symptom
Section titled “Symptom”安装失败: 技能目录不存在Installation failed: Skill directory does not exist
In older versions of cc-switch, the `download_and_extract` function strips the top-level directory prefix from GitHub ZIP files when installing skills via URL, extracting files directly into the temp directory. If the repository's `SKILL.md` is located in the root directory, the installer incorrectly looks for the skill directory under `temp_dir/<repo.name>/`, resulting in a 'directory not found' error. In contrast, local ZIP installation (`extract_local_zip`) preserves the full directory structure and does not trigger this issue. This problem was fixed in v3.14.0 by adding a fallback check for the root directory.
Upgrade cc-switch to v3.14.0 or later, which includes the fallback check fix for root directory `SKILL.md`.
As a temporary workaround, manually download the target repository's ZIP file and use cc-switch's "Install from ZIP" feature.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why can the same repository be installed successfully via ZIP but fails via URL?
- The URL installation process (`download_and_extract`) strips the top-level directory prefix from GitHub ZIPs, causing the program to fail to find the file when searching for a subdirectory by repository name; whereas ZIP installation (`extract_local_zip`) preserves the complete directory structure, allowing successful recognition.
Related problems
Section titled “Related problems”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.