Skip to content

Fix Kimi skill paths so installed skills reach the CLI - #1646

Merged
currentbits merged 2 commits into
mainfrom
coder/kimi-skills-never-reach-the-cli-wrong-in-ae36e8
Oct 16, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/kimi-skills-never-reach-the-cli-wrong-in-ae36e8

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Kimi skills managed by Solenta never reached kimi-cli (#695). There were three causes:

  1. Wrong user skills dir. SKILL_DIRS().kimi pointed 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 respect KIMI_CODE_HOME.
  2. Skills not linked into the per-session Kimi home. materializeKimiHome and the guardrail overlay shell loop symlinked credentials, sessions, plugins and other entries from ~/.kimi-code, but not skills. The CLI never saw the user's skills even when they were in the right place. skills is now in KIMI_HOME_LINKS and in the overlay's for f in … list.
  3. Wrong project skills dir. Project skills were looked up at .<provider>/skills, which for Kimi gives .kimi/skills. kimi-cli actually reads .kimi-code/skills. A new projectSkillRel(target) helper in skills.js holds that mapping, and cliCommands.js uses it when resolving /name commands.

Also changed

  • listSkills used to read project skills only from <project>/.claude/skills. It now scans each target's project dir through projectSkillRel, 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 in SKILL_TARGETS wins.

Tests

  • skills.test.js: the Kimi user dir defaults to ~/.kimi-code/skills and follows KIMI_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/skills and repo skills from .kimi-code/skills, and ignores the legacy ~/.kimi/skills.
  • kimi-home.test.js: the materialized Kimi home links skills back to the source home.

🤖 Generated with Claude Code

Solenta-Message-Id: 764023e3-d91d-4d92-b749-c5a0f93eb3f0
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T07:53:20.784635Z 083b9a5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread electron/skills.js
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"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@currentbits
currentbits merged commit 1451af1 into main Oct 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant