Codex skill toggle not working: still loads legacy directory ~/.agents/skills
Quick fix
Remove leftover copies in ~/.agents/skills or disable them in config; CC-Switch cannot manage that shared directory.
Symptom
Section titled “Symptom”[Bug] Codex 技能开关不生效:codex 仍会加载遗留目录 ~/.agents/skills 中的技能副本[Bug] Codex skill toggle not working: codex still loads skill copies from the legacy directory ~/.agents/skills
Codex CLI natively loads skills from two directories: the current canonical directory ${CODEX_HOME:-~/.codex}/skills and the legacy directory ~/.agents/skills (the user-level directory for the Agent Skills open standard). cc-switch manages only the former via symlinks. Turning a skill off in cc-switch removes only the link under ~/.codex/skills and does not touch the real copies in ~/.agents/skills. As a result, Codex still loads those skills from ~/.agents/skills even when the toggle is off, making the toggle appear ineffective.
If the user changes the storage location in cc-switch settings to ~/.agents/skills, that directory becomes the single source of truth (SSOT). cc-switch then creates a symlink in ~/.codex/skills pointing to it. Turning the toggle off removes only the symlink in ~/.codex/skills, while the files remain in ~/.agents/skills and Codex can still read them. Codex does not deduplicate skills with the same name, so the same skill present in both directories can also cause duplicate entries in the skill list.
Identify which skill copies in ~/.agents/skills/ are marked off in cc-switch but are still loaded.
Manually delete the corresponding skill folders under ~/.agents/skills/ to remove all copies accessible to Codex.
# 路径: ~/.agents/skills/<skill-name>/Alternatively, edit the Codex config file config.toml to explicitly disable specific skills.
路径: ~/.codex/config.toml [[skills.config]]path = "/Users/user-name/.agents/skills/<skill-name>/SKILL.md"enabled = false
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Why can't cc-switch automatically clean up ~/.agents/skills?
- ~/.agents/skills is the user-level directory for the Agent Skills open standard, and other tools (such as Claude Code and Copilot CLI) may also write skills there. cc-switch respects this shared standard and does not modify or delete content in that directory, to avoid breaking other tools' configurations.
- How do I avoid duplicate skill entries?
- Ensure skills exist in only one directory. Either set the cc-switch storage location to the default ~/.cc-switch/skills and clean up copies in ~/.agents/skills, or set the storage location to ~/.agents/skills and ensure there are no extra symlinks in ~/.codex/skills pointing to the same skills.
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.