From claude-code-hermit
Registers and manages scheduled routines from config.json as idle-gated CronCreate jobs in Claude Code sessions. Provides load, list, status, and stop commands for per-session automation without mid-task interruptions.
npx claudepluginhub gtapps/claude-code-hermit --plugin claude-code-homeassistant-hermitThis skill uses the workspace's default tool permissions.
Register and manage scheduled routines as per-session CronCreate jobs. Each routine fires only when the REPL is idle — no mid-task interruptions. Mirrors the `/watch` skill pattern.
Schedules recurring and one-off tasks via local OS cron/Task Scheduler or remote Anthropic Cron APIs. Supports list/add/remove with quota-aware defaults.
Manages recurring Claude dispatch schedules via OS-native schedulers: launchd on macOS, crontab on Linux/WSL. Supports register with cron expressions, list, and cancel.
View and modify Hermit agent configuration for projects including model, channels, budget prompts, morning brief, heartbeat, routines, idle behavior, compaction thresholds, Docker packages, and unattended mode.
Share bugs, ideas, or general feedback.
Register and manage scheduled routines as per-session CronCreate jobs. Each routine fires only when the REPL is idle — no mid-task interruptions. Mirrors the /watch skill pattern.
/claude-code-hermit:hermit-routines load register all enabled config.routines as CronCreates
/claude-code-hermit:hermit-routines list list configured routines from config.json
/claude-code-hermit:hermit-routines status list active CronCreate registrations
/claude-code-hermit:hermit-routines stop [id] stop a specific routine's CronCreate
/claude-code-hermit:hermit-routines stop --all stop all active routine CronCreates
Called automatically by hermit-start.py on always-on launches. Can also be called manually to apply config changes mid-session.
Resolve the plugin root path: run echo $CLAUDE_PLUGIN_ROOT via Bash. Store as pluginRoot. This env var is available at skill execution time but NOT inside cron-delivered prompts — it must be baked into each prompt at registration.
Read config.routines, filter enabled: true. If none, log "No enabled routines in config." and stop.
Call CronList. For each entry whose prompt contains [hermit-routine:: call CronDelete with its ID. Unconditional reset — ensures stale entries from prior sessions are cleared and the 7-day auto-expiry clock is reset.
For each enabled routine, build the prompt string (see templates below), then call CronCreate:
cron: the routine's schedule fieldrecurring: truedurable: falseprompt: the resolved prompt stringPer-routine error isolation: if CronCreate throws for one routine (bad cron expression, hit the 50-task session limit, etc.), record the failure and continue with the next routine. Do not abort the loop — one bad config entry must not prevent unrelated routines from registering.
Log one line summarizing outcomes: Routines registered: <id1>, <id2> (<N> ok, <M> failed). If any failed, list each failed id with the error on its own line.
Use run_during_waiting (rdw) from the config entry to select the template. Default run_during_waiting is false when the field is absent.
rdw=true — routine fires even when session_state is waiting:
[hermit-routine:<id>] Invoke /<skill>. After it completes, run:
<pluginRoot>/scripts/log-routine-event.sh <id> fired
rdw=false (default) — routine is suppressed when session_state is waiting:
[hermit-routine:<id>] Read .claude-code-hermit/state/runtime.json. If session_state is "waiting", run:
<pluginRoot>/scripts/log-routine-event.sh <id> skipped-waiting
and stop. Otherwise: invoke /<skill>. After it completes, run:
<pluginRoot>/scripts/log-routine-event.sh <id> fired
Replace <pluginRoot> with the resolved absolute path from step 1, <id> with the routine's id, and <skill> with the routine's skill field. The skill string is passed verbatim to the slash invocation (so claude-code-hermit:brief --morning becomes /claude-code-hermit:brief --morning). log-routine-event.sh takes <id> <event> only.
Special case — heartbeat-restart: append Then invoke /claude-code-hermit:hermit-routines load to re-arm all routine CronCreates and reset the 7-day expiry clock. to the prompt (after the trailing fired log line). Daily re-arm via this routine is what keeps routine CronCreates from ever reaching the 7-day auto-expiry in always-on deployments.
Show configured routines from config.json (not from CronList — this is the config view, not the live view).
config.routines.Routines (config.json):
# ID Schedule Skill RDW Status
1. heartbeat-restart 0 4 * * * claude-code-hermit:heartbeat start true enabled
2. weekly-review 0 23 * * 0 claude-code-hermit:weekly-review false disabled
Show active CronCreate registrations for hermit routines.
CronList. Filter entries whose prompt starts with [hermit-routine:./claude-code-hermit:hermit-routines load to register."Active routine CronCreates:
ID CRON-ID SCHEDULE
heartbeat-restart 4e007cf4 0 4 * * *
Extract the routine ID from the [hermit-routine:<id>] prefix in the prompt.
stop <id>:
CronList. Find the entry whose prompt contains [hermit-routine:<id>].CronDelete it. Log: "Stopped routine: ."stop (no id):
CronList, filter [hermit-routine:*] entries.--all).stop --all:
CronList. For each [hermit-routine:*] entry: CronDelete.hermit-settings routines automatically invokes /claude-code-hermit:hermit-routines load after writing config. If you edit config.json by hand, run /claude-code-hermit:hermit-routines load to apply — no session restart needed.hermit-start.py calls /claude-code-hermit:hermit-routines load only on always-on launches. Operators using /session interactively who want routines must run /claude-code-hermit:hermit-routines load themselves.$CLAUDE_PLUGIN_ROOT is NOT available in cron-delivered prompts. Always resolve and bake the absolute path at load time.durable: false (default). CronCreates die with the session. hermit-start.py re-registers on every always-on launch.heartbeat-restart. load resets the 7-day clock unconditionally on each call. The heartbeat-restart routine fires daily and re-invokes /claude-code-hermit:hermit-routines load, so entries never reach expiry. If you disable heartbeat-restart, routine CronCreates expire after 7 days — re-enable it, or run /claude-code-hermit:hermit-routines load weekly by hand.