fix(skills): wire bump_use() into skill invocation, preload, and skill_view tool (#17782 salvage)#17932
Merged
Conversation
…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 #17782
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.
This was referenced Apr 30, 2026
teknium1
added a commit
that referenced
this pull request
Apr 30, 2026
…r status` Alongside the existing 'least recently used' section, surface two more rankings so users can see which of their agent-created skills actually get exercised: - 'most used (top 5)' — sorted by use_count descending. Hidden when every skill has use_count=0 (noise suppression on fresh installs). - 'least used (top 5)' — sorted by use_count ascending. Always shown when the catalog is non-empty. use_count started tracking real agent skill activation in PR #17932 (bump_use wired into skill_view tool + slash invocation + --skill preload), so these rankings are now meaningful. Tests: 3 new in tests/hermes_cli/test_curator_status.py — happy path with mixed use_counts, zero-use suppression of the most-used section, and the no-skills clean-empty case.
teknium1
added a commit
that referenced
this pull request
Apr 30, 2026
…r status` (#18033) Alongside the existing 'least recently used' section, surface two more rankings so users can see which of their agent-created skills actually get exercised: - 'most used (top 5)' — sorted by use_count descending. Hidden when every skill has use_count=0 (noise suppression on fresh installs). - 'least used (top 5)' — sorted by use_count ascending. Always shown when the catalog is non-empty. use_count started tracking real agent skill activation in PR #17932 (bump_use wired into skill_view tool + slash invocation + --skill preload), so these rankings are now meaningful. Tests: 3 new in tests/hermes_cli/test_curator_status.py — happy path with mixed use_counts, zero-use suppression of the most-used section, and the no-skills clean-empty case.
donald131
pushed a commit
to donald131/hermes-agent
that referenced
this pull request
May 2, 2026
…r status` (NousResearch#18033) Alongside the existing 'least recently used' section, surface two more rankings so users can see which of their agent-created skills actually get exercised: - 'most used (top 5)' — sorted by use_count descending. Hidden when every skill has use_count=0 (noise suppression on fresh installs). - 'least used (top 5)' — sorted by use_count ascending. Always shown when the catalog is non-empty. use_count started tracking real agent skill activation in PR NousResearch#17932 (bump_use wired into skill_view tool + slash invocation + --skill preload), so these rankings are now meaningful. Tests: 3 new in tests/hermes_cli/test_curator_status.py — happy path with mixed use_counts, zero-use suppression of the most-used section, and the no-skills clean-empty case.
nickdlkk
pushed a commit
to nickdlkk/hermes-agent
that referenced
this pull request
May 11, 2026
…r status` (NousResearch#18033) Alongside the existing 'least recently used' section, surface two more rankings so users can see which of their agent-created skills actually get exercised: - 'most used (top 5)' — sorted by use_count descending. Hidden when every skill has use_count=0 (noise suppression on fresh installs). - 'least used (top 5)' — sorted by use_count ascending. Always shown when the catalog is non-empty. use_count started tracking real agent skill activation in PR NousResearch#17932 (bump_use wired into skill_view tool + slash invocation + --skill preload), so these rankings are now meaningful. Tests: 3 new in tests/hermes_cli/test_curator_status.py — happy path with mixed use_counts, zero-use suppression of the most-used section, and the no-skills clean-empty case.
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.
Salvage of #17818 by @Bartok9, widened to cover the dominant agent-initiated path.
What
bump_use()intools/skill_usage.pyhad zero production call sites —use_countstayed at 0 andlast_used_atstayedNonefor every skill. Since curator's stale timer keys offlast_used_at(agent/curator.py:233), every non-pinned agent-created skill would transition tostalesimultaneously regardless of actual use.Changes
agent/skill_commands.py— callbump_use()frombuild_skill_invocation_message(slash command) andbuild_preloaded_skills_prompt(--skillpreload). [@Bartok9's commit]tools/skills_tool.py— also callbump_use()alongside the existingbump_view()in_skill_view_with_bump. This is the dominant path: the agent callingskill_viewto load a skill is explicit "I'm using this skill to do work," stronger than passive system-prompt indexing. [widening]All three bumps are wrapped in try/except — usage telemetry failures never break tool calls.
Validation
skill_viewtool call--skill)E2E: isolated HERMES_HOME, real agent-created skill, all three paths traced. Unit:
scripts/run_tests.sh tests/tools/test_skill_usage.py tests/tools/test_skills_tool.py tests/agent/test_curator.py→ 153 passed.Closes #17782. Supersedes #17866 (same fix, submitted ~2h later) and the overlapping
bump_useportion of #17598.