Skip to content

Omnio: refresh slash-command registry when a skill is created/edited/deleted - #18

Merged
ppazosp merged 1 commit into
mainfrom
ppp/omnio-skill-reload-on-change
Jun 25, 2026
Merged

Omnio: refresh slash-command registry when a skill is created/edited/deleted#18
ppazosp merged 1 commit into
mainfrom
ppp/omnio-skill-reload-on-change

Conversation

@ppazosp

@ppazosp ppazosp commented Jun 25, 2026

Copy link
Copy Markdown

A skill created mid-session — e.g. via /learn, which authors through skill_manage — wasn't invocable until the gateway restarted. skill_manage cleared the skills system-prompt cache on success but never rescanned the slash-command registry (agent.skill_commands._skill_commands), which only refreshes on /reload-skills or a platform change. The result: GET /v1/skills returned the new skill with command: 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()) 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 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.pyTestRegistryRefreshOnMutation:

  • create → /test-skill resolves in get_skill_commands()
  • delete → the command is gone
  • 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/skills on 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

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

🔎 Lint report: ppp/omnio-skill-reload-on-change vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11253 on HEAD, 11253 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5936 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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
ppazosp force-pushed the ppp/omnio-skill-reload-on-change branch from eebb445 to 5beba1b Compare June 25, 2026 11:10
@ppazosp
ppazosp merged commit de04567 into main Jun 25, 2026
27 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