From ae8930afa52c75c7e16891281427e531edca64e4 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 30 Apr 2026 05:00:41 -0700 Subject: [PATCH] fix(skills): also bump_use on skill_view tool invocation 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. --- tools/skills_tool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/skills_tool.py b/tools/skills_tool.py index ed7a3e6a..37319a74 100644 --- a/tools/skills_tool.py +++ b/tools/skills_tool.py @@ -1497,8 +1497,12 @@ def _skill_view_with_bump(args, **kw): # qualified forms ("plugin:skill") return with the canonical name. resolved = parsed.get("name") or name if resolved: - from tools.skill_usage import bump_view + from tools.skill_usage import bump_use, bump_view bump_view(str(resolved)) + # A skill_view tool call is the agent actively loading the skill + # to act on it — that counts as use, not just a browse/view. + # Curator's stale timer keys off last_used_at (see agent/curator.py). + bump_use(str(resolved)) except Exception: pass return result