[Bug] extra_skill_dirs does not expand Windows-style ~\ paths
What version of Kimi Code is running?
2.6.3 (source main snapshot, 2026-11-18). Reproduces in the repository's unit tests without a login.
Which open platform/subscription were you using?
None involved.
Which model were you using?
None involved.
What platform is your computer?
Windows 11 x64.
What issue are you seeing?
extra_skill_dirs supports ~ and ~/, but not the Windows-style ~\.
With extra_skill_dirs = ["~\\notes"], the path is resolved relative to the project root as a literal ~ directory instead of the user's home directory, so the skill directory is never discovered.
What steps can reproduce the bug?
-
Create
C:\Users\<name>\notesand put a skill under it. -
In
config.toml, set:extra_skill_dirs = ["~\\notes"] -
Start Kimi in a git repository and check the skill catalog.
-
~\notesis resolved as<project>/~\notes(which does not exist), so the skill is missing.
A unit test reproduces the same behavior in packages/agent-core-v2/test/features/skill/catalog/skillRoots.test.ts:
const roots = await configuredRoots(['~\\notes'], root, homeDir, 'extra');
// before the fix: roots is []
What is the expected behavior?
Paths beginning with ~\ should expand to the user's home directory, the same way ~/ does.
Additional information
Root cause: resolveConfiguredDir in packages/agent-core-v2/src/features/skill/catalog/skillRoots.ts only checks dir.startsWith('~/').
Proposed fix: also accept dir.startsWith('~\\') and join the remainder with osHomeDir.
I have a local fix and a regression test ready. Please /approve this issue if you want me to open a PR.
Contribution
- [x] I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)