Skip to content

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

@cdanis

Description

@cdanis

Problem

The curator archives agent-created skills based on activity timestamps in .usage.json (last_used_at, last_viewed_at, last_patched_at). These counters are only bumped during interactive sessions when skill_view() or skill_manage() is called.

Cron jobs that reference skills via their skills: config never bump these counters. The skills loader in cron runs does inject the skill text, but it doesn't call the telemetry hooks (bump_use / bump_view). Result: a skill actively used by a cron job can be auto-archived by the curator as "stale".

Reproduction

  1. Create a skill with scripts referenced by a cron job
  2. Configure the cron job with skills: ["skill-name"]
  3. Never load the skill in an interactive session (so usage counters stay at 0)
  4. Run the curator — it will archive the skill despite active cron usage

Example

The `gloom-index-calculator` skill was archived by the first curator run on May 1, 2026 even though it had an active cron job using its scripts. It was one of 36 skills pruned for "staleness" during that pass.

Root Cause

In `agent/skill_loader.py` (or wherever the skill text injection happens), when a cron job loads attached skills via the `skills:` config, the code reads SKILL.md and injects it into the prompt but doesn't call `tools.skill_usage.bump_use(skill_name)`.

Fix

Call `bump_use(skill_name)` in the skill loader path for cron jobs (and any other non-interactive context like background tasks or subagents). This ensures the curator sees these skills as actively used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cronCron scheduler and job managementtool/skillsSkills system (list, view, manage)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions