PATCH-HEADLINE
LLM: current description doesn't precisely describe the goal
- frontmatter description is 224 chars (over 200 cap)
PROPOSED FIX
replace the `description:` line with:
description: "Query Hermes Agent token usage, cost, and session
health from state.db. Includes sessions schema, cost-reconstruction recipes,
and the broken-billing caveat."
PATCH-COMPACT
LLM: body has restatement or prose bloat
PROPOSED FIX
tighten the body — a working tighter version:
# Observability — Hermes Token, Cost & Agent Health Monitoring
## ⚠️ Critical: Two Stacks, One Right Answer
There are TWO observability stacks on this machine. **Use the first one only.**
| Stack | DB Path | Status | Use For |
|---|---|---|---|
| **Hermes-native** | `~/.hermes/state.db` | **LIVE, current** | Token usage, cost, session analysis |
| OpenClaw legacy | `~/.openclaw/observability.db` | **ORPHANED, 50+ days stale** | Nothing — do not use |
The OpenClaw stack (scripts in `~/.openclaw/skills/observability/`) was written for a different system. Its cron job disappeared, its source jsonl files stopped being written ~June 7, and all paths point to `~/.openclaw/` instead of `~/.hermes/`. **Ignore it completely.**
---
## Primary Source: Hermes state.db (always correct)
**Path:** `~/.hermes/state.db`
This is Hermes's own session database. It is live and current — query this first for any token/cost question. ### sessions table schema
```sql
sessions (
id TEXT PRIMARY KEY,…
PATCH-PUBLISH
LLM: internal references leak — strip before public
- line 53: hardcoded ~/.hermes path — `db = sqlite3.connect('/Users/morsy/.hermes/state.db')`
- line 75: hardcoded ~/.hermes path — `db = sqlite3.connect('/Users/morsy/.hermes/state.db')`
PROPOSED FIX
replace each internal reference:
line 3: description: "Query Hermes Agent token usage, cost, and session health from
state.db. Includes sessions schema, cost-reconstruction recipes, and the
broken-billing caveat."
line 25: |
Hermes-native | ${HERMES_HOME}/state.db | LIVE, current | Token usage, cost,
session analysis |
line 26: | OpenClaw legacy | ~/.openclaw/observability.db |
ORPHANED (machine-specific legacy) | Nothing — do not use |
line 28: If an older OpenClaw stack is present on the
host, ignore it — its cron job and source jsonl files are no longer written
and its paths do not match Hermes. Use state.db only.
line 34: Path: ${HERMES_HOME}/state.db (default ~/.hermes/state.db on a user
install)
PATCH-GOAL
LLM: first paragraph doesn't make the goal concrete
- no 'when to use' / 'load this when' trigger in opening paragraph
PROPOSED FIX
replace the opening paragraph:
Use this skill when you need to work with observability — hermes token, cost & agent health monitoring — it provides the conventions, examples, and reusable code so the agent can act without inventing the wheel.