fix(skills): wire bump_use() into skill invocation and preload paths (#17782)#17818
Closed
Bartok9 wants to merge 1 commit into
Closed
fix(skills): wire bump_use() into skill invocation and preload paths (#17782)#17818Bartok9 wants to merge 1 commit into
Bartok9 wants to merge 1 commit into
Conversation
…ousResearch#17782) bump_use() existed and was tested but had zero production call sites — use_count stayed 0 for all skills, breaking Curator's stale-detection logic which relies on last_used_at. Wire bump_use() into: 1. build_skill_invocation_message() — when a user invokes /skill-name 2. build_preloaded_skills_prompt() — when a skill is preloaded at session start Both are the canonical 'a skill is actively being used' moments, distinct from 'browsing' (bump_view in skill_view tool call). Closes NousResearch#17782
This was referenced Apr 30, 2026
teknium1
added a commit
that referenced
this pull request
Apr 30, 2026
Widen #17818 to cover the dominant 'agent actively used this skill' path: when the model calls the skill_view tool, bump use_count alongside view_count. The slash-command and --skill preload paths (covered by the cherry-picked commit) only catch user-initiated invocation; most skill activation happens via the agent calling skill_view to consume an indexed skill. Curator's stale-timer keys off last_used_at (agent/curator.py:233), so without this wire-up agent-created skills would transition to stale simultaneously regardless of actual use.
Contributor
|
Salvaged and merged via PR #17932 — your commit was cherry-picked onto current main with your authorship preserved in git log. Thanks @Bartok9! Widened slightly on top to also bump use_count when the agent calls the skill_view tool (the dominant skill-activation path), so curator's last_used_at signal tracks all three invocation paths: slash command, --skill preload, and skill_view tool call. |
donald131
pushed a commit
to donald131/hermes-agent
that referenced
this pull request
May 2, 2026
Widen NousResearch#17818 to cover the dominant 'agent actively used this skill' path: when the model calls the skill_view tool, bump use_count alongside view_count. The slash-command and --skill preload paths (covered by the cherry-picked commit) only catch user-initiated invocation; most skill activation happens via the agent calling skill_view to consume an indexed skill. Curator's stale-timer keys off last_used_at (agent/curator.py:233), so without this wire-up agent-created skills would transition to stale simultaneously regardless of actual use.
nickdlkk
pushed a commit
to nickdlkk/hermes-agent
that referenced
this pull request
May 11, 2026
Widen NousResearch#17818 to cover the dominant 'agent actively used this skill' path: when the model calls the skill_view tool, bump use_count alongside view_count. The slash-command and --skill preload paths (covered by the cherry-picked commit) only catch user-initiated invocation; most skill activation happens via the agent calling skill_view to consume an indexed skill. Curator's stale-timer keys off last_used_at (agent/curator.py:233), so without this wire-up agent-created skills would transition to stale simultaneously regardless of actual use.
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.
Summary
Connects
bump_use()to its intended call sites so Curator's lifecycle tracking actually works.Problem
bump_use()intools/skill_usage.pyexisted and was fully tested, but had zero production call sites. As a result:use_countstayed at 0 for all skillslast_used_atstayedNoneforeverstalesimultaneouslyMeanwhile
bump_view()was correctly wired intoskills_tool.py.Fix
Wire
bump_use()into the two canonical "a skill is actively being used" paths inagent/skill_commands.py:build_skill_invocation_message()— when a user invokes a/skill-nameslash command and the skill content is injected into the promptbuild_preloaded_skills_prompt()— when a skill is preloaded at CLI session start viahermes --skill <name>Both calls are wrapped in try/except to remain non-critical — skill invocation proceeds regardless of usage tracking errors.
Why these paths
bump_viewwhich tracks browsing/listing)Testing
Existing
test_skill_usage.pytests forbump_usepass. The function itself is well-tested; it simply had no callers.Closes #17782