cost-reflectlisted
Install: claude install-skill gtapps/claude-code-hermit
# Cost Reflect
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.
## Step 0 — Channel reply
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.
## Step 1 — Run the analyzer
```
node ${CLAUDE_PLUGIN_ROOT}/scripts/cost-reflect.js .claude-code-hermit
```
Capture stdout. If the output starts with "No cost data", report that message and stop — there's nothing to send.
## Step 2 — Relay the report
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.
## Step 3 — Channel delivery
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:
1. Resolve the outbound channel:
```
node ${CLAUDE_PLUGIN_ROOT}/scripts/resolve-outbound-channel.js .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.
2. If the script exits non-zero or returns `{"error":"no_reachable_channel"}`: if `push_notifications === true` in `config.json`,