Skip to content

feat(soul): add /reload-skills command to discover new skills without session restart - #2097

Open
cyliu0 wants to merge 3 commits into
MoonshotAI:mainfrom
cyliu0:feat/reload-skills
Open

feat(soul): add /reload-skills command to discover new skills without session restart#2097
cyliu0 wants to merge 3 commits into
MoonshotAI:mainfrom
cyliu0:feat/reload-skills

Conversation

@cyliu0

@cyliu0 cyliu0 commented Apr 28, 2026

Copy link
Copy Markdown

Related Issue

N/A

Description

Add /reload-skills soul-level slash command that rescans skill directories and rebuilds the slash command registry without restarting the session.

Changes

  • /reload-skills: New soul-level slash command. Reloads skills from disk, updates the LLM context with the new skill list, and refreshes shell tab-completion.
  • Runtime.reload_skills(): Rescans all skill directories and updates the KIMI_SKILLS builtin argument.
  • Runtime.override_skills_dirs: New field to preserve the CLI --skills-dir intent. This fixes a bug where skills_dirs (used for Glob access) was incorrectly passed to resolve_skills_roots, causing project-level skills to be skipped during reload when user-level skills exist.
  • KimiSoul.refresh_slash_commands(): Rebuilds the slash command registry after skills change.
  • Shell UI: Automatically syncs slash commands from the soul and refreshes prompt completers after each turn.
  • Tests: Add tests/core/test_reload_skills.py covering runtime reload, soul refresh, and builtin args update.
  • Docs: Update changelog and user documentation (slash-commands, skills, interaction).

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Copilot AI review requested due to automatic review settings April 28, 2026 05:43
devin-ai-integration[bot]

This comment was marked as resolved.

This comment was marked as resolved.

@cyliu0

cyliu0 commented Apr 28, 2026

Copy link
Copy Markdown
Author

Addressed all review comments in ff5111a:

  1. Shell-mode completer bug (prompt.py + shell/init.py): now only rebuilds the agent-mode completer. Shell-mode commands are static (sourced from ) and never change dynamically, so the shell-mode completer no longer gets polluted with agent-only commands.

  2. B018 bare string literals (agent.py): Converted the standalone triple-quoted strings under / to comments.

  3. Unused import (test_reload_skills.py): Removed the unused import.

All fixes verified locally: , , and pass.

devin-ai-integration[bot]

This comment was marked as resolved.

@cyliu0
cyliu0 force-pushed the feat/reload-skills branch from ff5111a to 72daae8 Compare April 28, 2026 06:16
@cyliu0

cyliu0 commented Apr 28, 2026

Copy link
Copy Markdown
Author

All review comments addressed and rebased onto latest main:

  1. Shell-mode completer (Copilot): refresh_slash_completers() now only rebuilds the agent-mode completer. Shell-mode commands are static and never change dynamically.

  2. skills_dirs reference break (Devin): reload_skills() now uses clear()+extend() instead of list assignment, preserving the reference held by the Glob tool.

  3. Merge conflicts: Rebased onto latest main; regenerated CHANGELOG and release notes.

Verified locally: ruff, pyright, and pytest all pass.

devin-ai-integration[bot]

This comment was marked as resolved.

@cyliu0
cyliu0 force-pushed the feat/reload-skills branch 2 times, most recently from 73b1028 to 2fa83ae Compare April 28, 2026 06:33
devin-ai-integration[bot]

This comment was marked as resolved.

@cyliu0
cyliu0 force-pushed the feat/reload-skills branch 2 times, most recently from a566b1b to 4e5defa Compare April 28, 2026 06:44
# Conflicts:
#	docs/en/configuration/config-files.md
#	docs/zh/configuration/config-files.md
devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Signed-off-by: Chengyou Liu <35356271+cyliu0@users.noreply.github.com>
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.

2 participants