Omnio: refresh slash-command registry when a skill is created/edited/deleted - #18
Merged
Merged
Conversation
🔎 Lint report:
|
A skill created mid-session (e.g. via /learn, which authors through skill_manage) was not invocable until the gateway restarted: skill_manage cleared the skills system-prompt cache but never rescanned the slash-command registry (agent.skill_commands._skill_commands), which only refreshes on /reload-skills or a platform change. So GET /v1/skills returned the new skill with command=null and the chat path wouldn't expand /<command>. Rescan the registry (scan_skill_commands) in skill_manage's success block for the actions that change the skill set or a skill's name — create/edit/patch/delete. write_file/remove_file touch only supporting files (not names), so they skip it. A rescan failure is logged, not silently swallowed. Tests: create -> /command resolves in get_skill_commands(); delete -> it's gone; write_file -> no rescan. Full skill_manager suite green (97), ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0184TxzJd1SYeBedsTLEfEwM
ppazosp
force-pushed
the
ppp/omnio-skill-reload-on-change
branch
from
June 25, 2026 11:10
eebb445 to
5beba1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A skill created mid-session — e.g. via
/learn, which authors throughskill_manage— wasn't invocable until the gateway restarted.skill_managecleared the skills system-prompt cache on success but never rescanned the slash-command registry (agent.skill_commands._skill_commands), which only refreshes on/reload-skillsor a platform change. The result:GET /v1/skillsreturned the new skill withcommand: null, and the chat path wouldn't expand/<command>— so a just-learned skill couldn't be run from the UI palette or by typing it.Fix
Rescan the registry (
scan_skill_commands()) inskill_manage's success block for the actions that change the skill set or a skill's name — create / edit / patch / delete.write_file/remove_filetouch only supporting files (not names), so they skip the (relatively costly) rescan. A rescan failure is logged, not silently swallowed.This sits right next to the existing
clear_skills_system_prompt_cache()call — same "invalidate caches on a successful skill mutation" seam, just covering the registry that was missed.Tests
tests/tools/test_skill_manager_tool.py—TestRegistryRefreshOnMutation:/test-skillresolves inget_skill_commands()write_file→ no rescan (supporting files don't change the registry)Full skill_manager suite green (97 passing), ruff clean.
Context
Pairs with an Omnia-side change (palette refetches
/v1/skillson open) so a newly-created skill also shows up in the chat's/menu without a reload. Follow-up to the slash-command palette work (hermes #17 / omnia NousResearch#3315).🤖 Generated with Claude Code
https://claude.ai/code/session_0184TxzJd1SYeBedsTLEfEwM