Skip to content

fix(cron): bump skill usage when cron jobs load skills#19433

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-9728230f
May 4, 2026
Merged

fix(cron): bump skill usage when cron jobs load skills#19433
teknium1 merged 1 commit into
mainfrom
hermes/hermes-9728230f

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented May 4, 2026

Summary

Cron jobs that list skills via their `skills:` config now bump `last_used_at` when each skill is loaded, so the curator's stale-skill timer sees them as active instead of auto-archiving them at 90 days.

Root cause

`cron/scheduler.py` imports `tools.skills_tool.skill_view` directly and bypasses the `_skill_view_with_bump` tool-dispatch wrapper that normally calls `bump_use()` on success. v0.12.0 (#17932) wired bump into invocation / preload / skill_view tool-calls; cron was the only direct-call site missed.

Changes

  • `cron/scheduler.py`: one try/except-wrapped `bump_use(skill_name)` after each successful load.
  • `tests/cron/test_scheduler.py`: 3 tests — happy path, missing skill skips bump, bump failure doesn't break prompt.

Validation

`scripts/run_tests.sh tests/cron/test_scheduler.py::TestBuildJobPromptBumpUse` → 3/3 pass.

Salvaged from PR #18811 by @cdanis — cherry-picked with authorship preserved. Closes #18810.

Cron jobs that reference skills via their skills: config never bumped
the usage counters in .usage.json, so the curator could auto-archive
skills actively used by cron jobs based on stale timestamps.

Now _build_job_prompt() calls bump_use(skill_name) for each
successfully loaded skill so the curator sees them as active.
@teknium1 teknium1 merged commit 363cc93 into main May 4, 2026
9 of 10 checks passed
@teknium1 teknium1 deleted the hermes/hermes-9728230f branch May 4, 2026 00:06
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cron Cron scheduler and job management tool/skills Skills system (list, view, manage) labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(curator): bump skill usage when cron jobs load skills

3 participants