Summary
The CLI hardcodes its skills SSOT directory to {config_dir}/skills (default ~/.cc-switch/skills/). The upstream GUI (farion1231/cc-switch) exposes a skillStorageLocation setting with a "unified" mode that stores skills in ~/.agents/skills/ — the cross-tool standard directory adopted by skills.sh, LangChain, and six major harnesses. This feature was never ported to the CLI fork, forcing users of the .agents convention into two divergent skill copies.
Motivation
~/.agents/skills/ is the de-facto cross-harness standard for agent skills. The CLI already scans it as an import source (get_agents_skills_dir() in src-tauri/src/services/skill.rs:391) but cannot use it as SSOT, so the two directories drift apart — we observed SKILL.md content divergence between ~/.cc-switch/skills/ and ~/.agents/skills/ (the 8/2 copy vs the 8/15 re-fetch).
Harness adoption matrix (verified sources)
| Harness |
.agents/skills handling |
Source |
| OpenAI Codex |
Native: primary discovery path (~/.agents/skills/ + hierarchical project scan) |
skill-system-foundry tool-integration |
| Gemini CLI |
Native: .agents/ takes precedence over .gemini/ |
same |
| DSH (DeepSeek) |
Native: default agentsHome = ~/.agents (env DSH_AGENTS_HOME overridable) |
dsh-skill-filesystem source:78 |
| OpenCode |
Native: scans .agents/skills/ alongside .opencode/skills/ |
skill-system-foundry |
| Windsurf |
Native (v1.9552.21+) |
skill-system-foundry |
| Warp |
Native (recommended path) |
skill-system-foundry |
| Cursor |
Partial: personal alias ~/.agents/skills/ (release-dependent); project-level needs pointer |
skill-system-foundry |
| Claude Code |
Not native: reads ~/.claude/skills/; .agents requires symlink pointer; skills in ~/.agents/skills/ reported unrecognized |
anthropics/claude-code #53950 |
| Kiro |
Not native; pointer required |
skill-system-foundry |
| LangChain deepagents |
Native: user ~/.agents/skills/ + project, .agents precedence |
langchain-ai/deepagents commit #1059 |
Conclusion: 6 of 10 major harnesses scan ~/.agents/skills/ natively; skills.sh (Vercel, 28k★) installs there by default (AGENTS_DIR = '.agents'). The ecosystem is consolidating on .agents/skills/ as the canonical location. The CLI's locked SSOT is the outlier, contradicting this direction and fragmenting skills into divergent copies.
Current behavior (source evidence)
src-tauri/src/services/skill.rs:544 — get_ssot_dir():
let dir = get_app_config_dir().join("skills");
create_managed_config_dir_all(&dir)?;
Ok(dir)
src-tauri/src/config.rs:80-95 — get_app_config_dir() returns $HOME/.cc-switch (env CC_SWITCH_CONFIG_DIR overridable). There is no way to redirect only the skills SSOT — the whole config root moves or nothing.
- The CLI already recognizes
~/.agents/skills as an import source (get_agents_skills_dir(), skill.rs:391; parse_agents_lock(), skill.rs:397) — the directory is known, just not usable as SSOT.
Upstream precedent
farion1231/cc-switch already implements this as skillStorageLocation:
src/types.ts:
// Skill 存储位置:cc_switch(默认)或 unified(~/.agents/skills/)
skillStorageLocation?: SkillStorageLocation;
src/components/settings/SkillStorageLocationSettings.tsx — settings UI with cc_switch / unified options and a storage migration flow (skillsApi.migrateStorage(target))
Proposed change (minimal)
- Settings: add
skillStorageLocation to CLI settings (src-tauri/src/settings.rs), mirroring upstream semantics: cc_switch (default) | unified (~/.agents/skills).
- SSOT resolution: in
get_ssot_dir() (skill.rs:544), when unified, return ~/.agents/skills instead of {config_dir}/skills.
- Migration: provide a migration path for existing SSOT skills into
~/.agents/skills (reference upstream's migrateStorage), or document a manual move.
Acceptance criteria
- With
skillStorageLocation: unified (or equivalent CC_SWITCH_SKILLS_DIR env var), ~/.agents/skills/ becomes the SSOT — install / import-from-apps / sync all operate on it.
- Existing skills migrate without data loss (file + DB state consistent).
- WebDAV sync continues to work with the new root.
scan-unmanaged still detects both .agents and app-dir skills without double-counting.
Environment
- cc-switch CLI: v5.10.0 (also affects latest v5.10.1)
- OS: WSL2 (Ubuntu 24.04) + Windows 10
- Repo: SaladDay/cc-switch-cli (CLI fork of farion1231/cc-switch)
Summary
The CLI hardcodes its skills SSOT directory to
{config_dir}/skills(default~/.cc-switch/skills/). The upstream GUI (farion1231/cc-switch) exposes askillStorageLocationsetting with a "unified" mode that stores skills in~/.agents/skills/— the cross-tool standard directory adopted by skills.sh, LangChain, and six major harnesses. This feature was never ported to the CLI fork, forcing users of the.agentsconvention into two divergent skill copies.Motivation
~/.agents/skills/is the de-facto cross-harness standard for agent skills. The CLI already scans it as an import source (get_agents_skills_dir()insrc-tauri/src/services/skill.rs:391) but cannot use it as SSOT, so the two directories drift apart — we observedSKILL.mdcontent divergence between~/.cc-switch/skills/and~/.agents/skills/(the 8/2 copy vs the 8/15 re-fetch).Harness adoption matrix (verified sources)
.agents/skillshandling~/.agents/skills/+ hierarchical project scan).agents/takes precedence over.gemini/agentsHome = ~/.agents(envDSH_AGENTS_HOMEoverridable).agents/skills/alongside.opencode/skills/~/.agents/skills/(release-dependent); project-level needs pointer~/.claude/skills/;.agentsrequires symlink pointer; skills in~/.agents/skills/reported unrecognized~/.agents/skills/+ project,.agentsprecedenceConclusion: 6 of 10 major harnesses scan
~/.agents/skills/natively; skills.sh (Vercel, 28k★) installs there by default (AGENTS_DIR = '.agents'). The ecosystem is consolidating on.agents/skills/as the canonical location. The CLI's locked SSOT is the outlier, contradicting this direction and fragmenting skills into divergent copies.Current behavior (source evidence)
src-tauri/src/services/skill.rs:544—get_ssot_dir():src-tauri/src/config.rs:80-95—get_app_config_dir()returns$HOME/.cc-switch(envCC_SWITCH_CONFIG_DIRoverridable). There is no way to redirect only the skills SSOT — the whole config root moves or nothing.~/.agents/skillsas an import source (get_agents_skills_dir(), skill.rs:391;parse_agents_lock(), skill.rs:397) — the directory is known, just not usable as SSOT.Upstream precedent
farion1231/cc-switch already implements this as
skillStorageLocation:src/types.ts:src/components/settings/SkillStorageLocationSettings.tsx— settings UI withcc_switch/unifiedoptions and a storage migration flow (skillsApi.migrateStorage(target))Proposed change (minimal)
skillStorageLocationto CLI settings (src-tauri/src/settings.rs), mirroring upstream semantics:cc_switch(default) |unified(~/.agents/skills).get_ssot_dir()(skill.rs:544), whenunified, return~/.agents/skillsinstead of{config_dir}/skills.~/.agents/skills(reference upstream'smigrateStorage), or document a manual move.Acceptance criteria
skillStorageLocation: unified(or equivalentCC_SWITCH_SKILLS_DIRenv var),~/.agents/skills/becomes the SSOT —install/import-from-apps/syncall operate on it.scan-unmanagedstill detects both.agentsand app-dir skills without double-counting.Environment