plugins/claude-code-hermit/skills/daily-auto-close/SKILL.md
Daily routine that closes the current session at midnight when the operator has been idle ≥10 minutes. Queues a pending close (drained by heartbeat) when the operator is currently active. Intended to fire via the `daily-auto-close` routine; safe to invoke manually.
npx skillsauth add gtapps/claude-code-hermit daily-auto-closeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Closes long-running daemon sessions on a daily cadence so cross-session learning surfaces (reflect, weekly-review, hermit-brain, hermit-evolution) have archives to work with.
The skill is invoked by the daily-auto-close routine at 0 0 * * * (local). The routine prompt is prefixed [hermit-routine:daily-auto-close] so scripts/record-operator-action.ts does not bump state/last-operator-action.json (load-bearing: this skill reads that clock to decide whether to close now or queue).
Read .claude-code-hermit/state/runtime.json (session_state).
Read .claude-code-hermit/state/last-operator-action.json (at).
Check whether .claude-code-hermit/state/pending-close.json exists.
Branch:
a. session_state not in {"in_progress", "idle"} — nothing to close.
pending-close.json exists → delete it (stale flag from a prior session that already closed). Use the Bash tool: rm -f .claude-code-hermit/state/pending-close.json.routine-metrics.jsonl (no-op events are not part of the existing log-routine-event.sh vocabulary).b. session_state in {"in_progress", "idle"} AND now - last_operator_action > 10min — safe lull; close directly.
/claude-code-hermit:session-close --auto. The auto-close path archives the session and clears pending-close.json itself on archive success.c. session_state in {"in_progress", "idle"} AND now - last_operator_action ≤ 10min — operator is currently active; queue.
.claude-code-hermit/state/pending-close.json with {"queued_at":"<now ISO>","queued_by":"daily-auto-close"} (singleton; overwrite unconditionally). Use the Write tool.AUTO_CLOSE on the next tick where the operator has been idle >10 minutes.If last-operator-action.json is absent, unreadable, or has no valid at timestamp: treat as "operator has been idle indefinitely" → take branch (b) (close directly). Fail-open: it's better to close an arguably-still-active session than to leak the routine into perpetual noop.
Auto-closed S-NNN notification from /session-close --auto is the only operator-facing signal.scripts/heartbeat-precheck.ts.data-ai
Initializes or resumes a work session. Loads context from OPERATOR.md and SHELL.md, orients the agent, and establishes what to work on. Use at the beginning of every work session.
tools
Evolves hermit configuration and templates after a plugin update. Detects version gaps, presents new features, walks through new settings. Run after updating the plugin.
testing
Initializes the autonomous agent in the current project. Creates the state directory, templates, OPERATOR.md, and config.json. Appends session discipline to CLAUDE.md. Detects installed hermits. Run once per project, like git init.
tools
Generates Docker scaffolding and walks the operator through the full deployment — token setup, build, start, MCP plugin configuration, workspace trust, and verification. Offers to back up and overwrite existing Docker files. Run after /hatch.