plugins/claude-code-hermit/skills/cost-reflect/SKILL.md
Use when the user asks about cost structure or composition: which token types cost the most, how cache reads compare to output costs, which sessions are draining budget, or what cold starts add up to. This is the 'why is my bill high' skill. It audits where spend goes across token categories (cache_read, cache_write, output, input) and per-session attribution. Invoke for questions like 'cost breakdown', 'which sessions are expensive', 'what's driving spend', or 'cold start costs'. Not for week-over-week trend lines (use hermit-evolution) or simple total-spend summaries.
npx skillsauth add gtapps/claude-code-hermit cost-reflectInstall 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.
Runs a structural cost audit over the last 7 days of cost-log.jsonl and delivers the result to the operator. The math is done by a script — your job is to run it and deliver the output through the right channel.
If this skill was invoked from a channel-arrived message (the inbound prompt contains a <channel source="..."> tag), reply via that channel's reply tool. Otherwise emit to conversation.
bun ${CLAUDE_PLUGIN_ROOT}/scripts/cost-reflect.ts .claude-code-hermit
Capture stdout. If the output starts with "No cost data", report that message and stop — there's nothing to send.
The script output is already formatted and capped at 1500 characters. Relay it verbatim. Don't summarize, reformat, or add commentary — the output is the report.
When this skill fires from a routine or proactively (i.e., not from a direct operator conversation), deliver the report through the operator's channel:
Resolve the outbound channel:
bun ${CLAUDE_PLUGIN_ROOT}/scripts/resolve-outbound-channel.ts .claude-code-hermit
Parse stdout as JSON. On success ("id" and "chat_id" present), send via mcp__plugin_<id>_<id>__reply with { chat_id, text: <report> } where <id> is the resolved channel name.
If the script exits non-zero or returns {"error":"no_reachable_channel"}: if push_notifications === true in config.json, fire PushNotification(message="cost-reflect: <first line of report>", status="proactive") so the summary still reaches the operator. Then append a single Findings line to .claude-code-hermit/sessions/SHELL.md: "cost-reflect: no reachable channel configured, channel-send skipped". Only log this once per session to avoid noise.
To set a preferred channel, add "primary": "<channel-name>" inside channels in config.json.
/claude-code-hermit:hermit-settings — a Sunday 22:00 cadence (0 22 * * 0) before weekly-review works well./claude-code-hermit:hermit-evolution instead.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.