Repository navigation
Fix Kimi skill paths so installed skills reach the CLI - #1646
Conversation
Solenta-Message-Id: 764023e3-d91d-4d92-b749-c5a0f93eb3f0
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 083b9a5e9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| opencode: path.join(home, ".config", "opencode", "skills"), | ||
| kimi: path.join(home, ".kimi", "skills"), | ||
| // kimi-cli reads $KIMI_CODE_HOME/skills; ~/.kimi/skills is the legacy tree. | ||
| kimi: path.join(env.KIMI_CODE_HOME || path.join(home, ".kimi-code"), "skills"), |
There was a problem hiding this comment.
Migrate skills from the former Kimi directory
When upgrading, skills previously installed only for Kimi remain under ~/.kimi/skills: the parent version's addSkill wrote there, but this change makes inventory, synchronization, removal, and future installs use only $KIMI_CODE_HOME/skills, with no migration or legacy fallback anywhere in the repository. Those existing managed skills therefore disappear from the Skills tab and are never copied into the directory the CLI now reads; migrate the legacy contents or retain a compatibility scan during upgrade.
Useful? React with 👍 / 👎.
Kimi skills managed by Solenta never reached kimi-cli (#695). There were three causes:
SKILL_DIRS().kimipointed at~/.kimi/skills, which is the legacy tree. kimi-cli reads$KIMI_CODE_HOME/skills(default~/.kimi-code/skills), so installs, syncs and listings now use that path and respectKIMI_CODE_HOME.materializeKimiHomeand the guardrail overlay shell loop symlinked credentials, sessions, plugins and other entries from~/.kimi-code, but notskills. The CLI never saw the user's skills even when they were in the right place.skillsis now inKIMI_HOME_LINKSand in the overlay'sfor f in …list..<provider>/skills, which for Kimi gives.kimi/skills. kimi-cli actually reads.kimi-code/skills. A newprojectSkillRel(target)helper inskills.jsholds that mapping, andcliCommands.jsuses it when resolving/namecommands.Also changed
listSkillsused to read project skills only from<project>/.claude/skills. It now scans each target's project dir throughprojectSkillRel, so repo skills for Kimi, Codex and the other CLIs appear too. If two targets have a skill with the same name, the first target inSKILL_TARGETSwins.Tests
skills.test.js: the Kimi user dir defaults to~/.kimi-code/skillsand followsKIMI_CODE_HOME. Project skill listing covers dirs beyond.claude, including the first-target-wins case for duplicate names.cli-commands.test.js: Kimi resolves user skills from~/.kimi-code/skillsand repo skills from.kimi-code/skills, and ignores the legacy~/.kimi/skills.kimi-home.test.js: the materialized Kimi home linksskillsback to the source home.🤖 Generated with Claude Code