OpenClaw Scheduler Token Auditor
by @yueeli
Audit OpenClaw scheduler token usage for cron jobs, scheduled tasks, and heartbeat sessions. Use when the user wants to know which scheduled job is expensive...
clawhub install openclaw-scheduler-token-auditor๐ About This Skill
name: openclaw-scheduler-token-auditor description: Audit OpenClaw scheduler token usage for cron jobs, scheduled tasks, and heartbeat sessions. Use when the user wants to know which scheduled job is expensive, which cron is burning the most tokens, whether a cron or heartbeat run exceeds a token threshold or budget, why scheduler token usage is high, or to investigate unexpected token burn. Trigger explicitly on slash-style phrases like "/token_auditor" and "/schedule_auditor". Also match requests such as "audit scheduler tokens", "which cron uses the most tokens", "check whether this scheduled task exceeds 50000 tokens", "audit heartbeat token usage", "find expensive scheduled tasks", "ๆฅๅชไธช cron ๆ็ง token", or "ๆฃๆฅ่ฟไธชๅฎๆถไปปๅกๆๆฒกๆ่ถ token".
OpenClaw Scheduler Token Auditor
Audit scheduler token usage conservatively. Separate what is measured, what is only bounded, and what remains unknown.
What this skill is for
Use this skill to answer questions like:
How users typically trigger it
This skill should trigger for requests such as:
/token_auditor/schedule_auditorAudit scheduler token usageFind expensive cron jobsCheck whether this cron exceeds 50000 tokensInvestigate unexpected token burn in scheduled tasksAudit heartbeat token usageWhich scheduled runs are the costly ones?If the user gives no threshold, use 50000 tokens per run.
Core rule set
1. For cron runs, only usage.total_tokens is authoritative.
Do not replace it with hand-summed input + output values.
2. Session status, session lists, and transcripts are supporting evidence.
Use them to explain a result, not to manufacture one.
3. Missing usage means unknown.
If a run lacks usage.total_tokens, do not call it cheap or safe.
4. Heartbeat analysis is usually bounded, not exact.
Without explicit usage fields, you may rule out obviously huge per-run usage, but you may not claim an exact token count.
5. State the threshold explicitly.
Default to 50000 unless the user specifies another threshold.
6. Do not invent commands or undocumented fields.
Prefer first-class OpenClaw tools.
Evidence classes
Use exactly one label per audited target:
usage.total_tokensAudit workflow
1) Classify the target
Separate the audit by evidence type:
Do not blur them into one vague conclusion.
2) Audit cron jobs
Preferred path:
cron(action="list")cron(action="runs", jobId=..., limit=...)Procedure:
1. Identify the relevant cron job or jobs.
2. Fetch recent run records.
3. Read usage.total_tokens from each run.
4. Compare each exact count to the active threshold.
5. Only after that, inspect session metadata or transcripts to explain *why* a verified expensive run happened.
CLI fallback only if needed:
openclaw cron list
openclaw cron runs --id --limit 50
Interpretation:
usage.total_tokens -> Exactusage.total_tokens -> Inconclusiveinput + output3) Explain expensive cron runs
Once a run is already verified as expensive, look for causes such as:
These are explanations for an exact finding, not substitutes for exact usage.
4) Audit heartbeat sessions
Treat heartbeat as bounded-risk analysis unless explicit usage data exists.
Useful checks:
sessions_list to find heartbeat sessionssession_status to inspect context accumulationsessions_history to inspect recent transcript size, repetition, and tool fan-outA Bounded conclusion is reasonable when the observed pattern shows:
Without explicit usage, phrase conclusions like:
No evidence of 50000+-per-run behaviorObserved structure appears lightweightExact per-run tokens are unavailableDecision rules
Cron with usage.total_tokens
Allowed:
Not allowed:
Cron without usage.total_tokens
Allowed:
InconclusiveNot allowed:
Heartbeat without explicit usage
Allowed:
current evidence rules out obvious 80000+-per-run behaviorNot allowed:
Output pattern
Always state the threshold used.
Examples:
Threshold used: 50000 tokens per runThreshold used: 80000 tokens per runFor each target, report:
cron or heartbeatExact, Bounded, or InconclusiveExample phrasings:
Nightly report cron โ Exact โ 158784 tokens on the latest run โ exceeds 50000.Main heartbeat โ Bounded โ observed structure rules out obvious 80000+-per-run behavior, but exact per-run tokens are unavailable.Daily digest cron โ Inconclusive โ run record lacks usage.total_tokens, so the threshold result is unknown.Failure modes to avoid
1. Hand-sum trap โ input + output may disagree with usage.total_tokens
2. Missing-data optimism โ missing usage is not low usage
3. Transcript-as-meter trap โ transcript size is not a billing source
4. Heartbeat overclaim โ lightweight structure supports bounded conclusions, not exact counts
5. Mixed-evidence blur โ do not merge Exact cron findings and Bounded heartbeat findings into one vague claim
6. Invented-command trap โ if CLI syntax is uncertain, check docs or openclaw help first
7. Threshold drift โ always say whether the threshold was default or user-specified
Minimal examples
Exact cron result
A run record contains usage.total_tokens: 158784, and the user gave no threshold.
Correct conclusion:
50000Exactexceeds 50000Custom threshold
A run record contains usage.total_tokens: 47617, and the user asks for 80000.
Correct conclusion:
80000Exactdoes not exceed 80000Misleading hand-sum
A run shows input_tokens: 49680 and output_tokens: 9612, while the authoritative record says usage.total_tokens: 47617.
Correct conclusion:
4761759292Bounded heartbeat result
A heartbeat session shows near-zero context accumulation and a repeating pattern of small checklist reads plus short acknowledgements.
Correct conclusion:
Boundedno evidence of +-per-run behavior exact per-run tokens unavailableMissing usage
A cron run exists but the record has no usage.total_tokens.
Correct conclusion:
Inconclusiveunknown