
Cron Cost Optimize
Audit a user's registered cron jobs and recommend a cheaper mode for each, a...
Install
npx skills add kirodotdev/KiroCrew --skill cron-cost-optimize -g -a claude-code -y- Repository
- kirodotdev/KiroCrew4.7k
- Category
- AI and agents
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,377 tokens
- Runs scripts
- Yes, review before use
What it does
Audit a user's registered cron jobs and recommend a cheaper mode for each, a zero-token script/command job, or an agent job with minimal context. Use when the user asks why scheduled jobs cost so much, wants to cut cron token spend, or is porting crons into Kiro Crew. Read-only; never edits a job.
Optimize what registered cron jobs cost
A cron job that dispatches to the model pays for its whole injected context on every wake, whether or not that wake had anything to do. Two cheaper modes exist and neither reaches a job that was already registered without them.
| Mode | What it costs | What it gives up |
|---|---|---|
script or command job | no model turn at all | all reasoning, and the carried previous result |
agent job with minimal_context | a model turn on a small context | memory, lessons, steering, skills, prior session history |
| plain agent job | a model turn on the full context | nothing |
Your job in this skill is to move each of the user's jobs to the cheapest mode it can safely use, and to leave alone the ones that genuinely reason.
Run the scan first
The scan is deterministic, so it costs no inference. Run it before forming any opinion.
It reads nothing from disk. Two steps, and the first one matters:
- Call
cron_listwithjsonset to true. That is the only reader that can see what the scan needs. The job store is scoped to the jobs your session owns, and the run history is readable only by the gateway, so a script cannot fetch either itself. - Write that JSON to a file and pass it in. Do NOT put the document on the command
line -- a prompt inside it containing backticks or
$(...)would be executed by the shell.
python3 <this skill's dir>/scripts/cron_cost_scan.py --input <the file you wrote>
Resolve <this skill's dir> from wherever you loaded this SKILL.md, rather than
hardcoding a path. The data home moves with KIROCREW_HOME, so a hardcoded
~/.kiro/crew/skills/... is wrong for some users.
Useful flags:
--jsonfor machine-readable output when you need to fold the result into a table.--min-runs Nto change how many recorded runs count as evidence. Default is 5.
To look at one job, narrow the cron_list call with its ids instead of filtering
afterwards.

