orgkit-cadence

A command that studies your Claude Code activity and recommends how often and when to run an automated batch capture of missed lessons.

In plain words
What is it for?
Use it to inspect activity, choose a capture cadence and time slot, and optionally install a background cron job.
Why use it?
It bases the schedule on actual usage and asks about plan limits so background work is less likely to compete with busy periods.

Command

Part of the orgkit plugin — 10 commands, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/hdk10/orgkit/orgkit-cadence
Clone the repo
git clone --depth 1 https://github.com/hdk10/orgkit

Or install orgkit, the plugin that ships this one along with the rest of its 10 commands, 3 hooks.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,254 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.01254
Opus 5 $0.00018 $0.00627
Sonnet 5 $0.00007 $0.00251
Haiku 4.5 $0.00004 $0.00125

Measured 2d ago against content hash acfc584365d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

orgkit-cadence scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/orgkit-cadence.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are helping the user choose a capture cadence — how often, and at what time, an automated batch /capture should sweep their roles — grounded in their actual Claude Code usage, not a guess.

Capture has two paths and this command tunes the second:

  • Live capture (always on) — the model writes lessons to _pending.md as it works. Primary.
  • Batch capture (what this configures) — a periodic sweep that mines any session the live path missed, across all roles with pending activity.

Steps

  1. Run the analysis (read-only, writes nothing, no API calls):

    python3 .org/cadence.py
    

    Show the user the report: their core hours, busiest weekday, the lightest in-range slot, per-role activity, and the recommended cadence + slot.

  2. Ask the one thing the data can't tell you — plan + headroom. The analysis sees Claude activity but not your plan tier or token limits (those aren't readable locally). Ask:

    • Which plan? (Pro / Max / API pay-as-you-go)
    • Do you regularly hit usage limits, or is there headroom?

    Use the answer to sanity-check the slot: if headroom is tight, lean toward a slot well outside their busiest window so batch capture never competes with active work.

  3. Present the recommendation and the trade-off honestly. Default mechanism is cron, deliberately (see below). State the recommended cadence (e.g. "every 2 days") and slot from the analysis.

    The slot is chosen by awake-probability (how many distinct days the laptop was on in that hour), NOT token volume — a cron only fires if the machine is on. If even the best hour is awake <60% of days (common for people without a true idle window), do not pick one slot: spread several --slot-hours across the hours they're most reliably on (e.g. a couple midday + a couple evening). The once-per-cadence guard fires only the first attempt that catches the laptop awake; every other slot no-ops for free. Surface the per-hour awake% so the user understands firing odds.

  4. Explain cron vs launchd — and why cron is the default here:

    • launchd runs a missed job as a catch-up at next wake. That's exactly the wrong moment: you wake with a full day and limited tokens, and capture fires across every role before you start. Rejected for that reason.
    • cron only fires if the machine is awake at the scheduled minute; if asleep, it simply skips — no wake-time ambush. The cost is a missed cycle when you're asleep at that time. We mitigate that with multiple attempts across the quiet window plus an idempotency guard: capture runs at most once per cadence period (a .last_capture_run marker short-circuits the rest), so extra cron entries are free retries that catch the laptop whenever it happens to be awake — never repeated token spend, never on wake.
  5. Offer the opt-in install, and state what they lose by declining:

    Without scheduled batch capture you rely only on live capture. Anything the model didn't write live — it didn't comply, or under-valued a session — is recoverable only by manually running /capture. If you never do, those lessons rot when the transcript is cleaned (~30 days). Batch is the safety net.

    If they opt in, install the cron with the recommended (or user-adjusted) cadence + slot:

    python3 .org/install_cron.py --cron --cadence-days <N> --slot-hours <h1,h2,...>
    

    The installer:

    • resolves absolute claude + python3 paths (cron has a stripped PATH),
    • uses the user's subscription token onlyCLAUDE_CODE_OAUTH_TOKEN from claude setup-token, placed in a 0600 .org/.capture_env. Never an API key (that bills a separate pay-as-you-go account); the script hard-refuses if ANTHROPIC_API_KEY is set,
    • runs an auth probe (claude -p once) and refuses to install if headless auth fails, telling the user how to fix it,
    • generates a batch script that, per run: checks the .last_capture_run guard (exits free if within cadence), then for each role with un-captured pending activity runs capture on Sonnet (--model claude-sonnet-4-6, never Opus), sequentially, logging to a file,
    • touches .last_capture_run only on success.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 57 lines · 37 tokens per session scan A acfc584365d7

Subscribe to this mod's changes

orgkit-cadence is a command published in the GitHub repository hdk10/orgkit (2 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 1,254 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.