Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/atlasomnia/hermes-custom-pack/hermes-context-optimizationnpx skills add AtlasOmnia/hermes-custom-pack --skill hermes-context-optimizationgit clone --depth 1 https://github.com/AtlasOmnia/hermes-custom-packWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/atlasomnia/hermes-custom-pack/hermes-context-optimization)<a href="https://agentmods.dev/skills/atlasomnia/hermes-custom-pack/hermes-context-optimization"><img src="https://agentmods.dev/badge/skills/atlasomnia/hermes-custom-pack/hermes-context-optimization.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.07307 |
| Opus 5 | $0.00017 | $0.03653 |
| Sonnet 5 | $0.00007 | $0.01461 |
| Haiku 4.5 | $0.00003 | $0.00731 |
Grade A, and why
hermes-context-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to hermes-context-optimization — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 438 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hermes Context Optimization
Use this when the user asks about Hermes prompt/context size, “hello” startup cost, compression behavior, memory/profile bloat, tool-schema overhead, skill loading, session-store/search-index storage, or multimodal/visual-context approaches such as Snapcompact.
For large state.db search-index maintenance, resumable optimize-storage --no-vacuum runs, foreground timeout handling, and post-run verification, follow references/session-store-optimization.md.
When bounded workers repeatedly fail with session_persistence_failed because a live profile DB is lock-contended, preserve the worktree handoff and use the non-disruptive isolated-HERMES_HOME workflow in references/isolated-worker-state-store.md. Diagnose the profile-specific DB and lock owners first; never terminate a user's live TUI or optimize its store merely to unblock a coding worker.
Operating style for the user
- Be concise first. If he asks for the savings, give the numbers, not a lecture.
- Separate hard blockers from engineering choices.
- Prefer token/accounting estimates grounded in actual provider/runtime data when available; use ratios only when clearly labeled.
- Do not imply that all startup prompt text is interchangeable. Bucket it by runtime role.
Long standing-goal payloads
When a long /goal prompt is displayed as a compact token such as [[ … [77 lines] … ]], treat that representation as potentially lossy rendered text, not as the authoritative goal body. Hermes' goal state stores the string it receives and does not dereference wiki-style links or recover omitted lines. Before allowing a goal worker to edit anything, require it to read the complete authoritative specification from a file and verify that the first turn contains the expected task scope. Use a short file-backed goal such as: Read and execute the complete goal specification at /absolute/path/goal.md; treat that file as authoritative; do not act on truncated display text. If the worker loads Obsidian or searches for a note matching the compact label, pause/clear the goal: it received the display placeholder, not the task. Do not accept a “goal achieved” result caused only by missing input; require artifact or test evidence.
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/compression-runtime-fallback-notes.md 1.9 KB
- references/context-overflow-recovery.md 3.4 KB
- references/gateway-voice-latency-attribution.md 2.8 KB
- references/goal-long-prompt-preservation.md 2.0 KB
- references/isolated-worker-state-store.md 4.2 KB
- references/jinja-chat-template-audit.md 2.4 KB
- references/native-context-inspection.md 2.4 KB
- references/profile-data-accuracy.md 1.7 KB
- references/prompt-composition-baseline.md 1.3 KB
- references/session-store-optimization.md 2.3 KB
- references/skill-pruning-workflow.md 1.6 KB
- references/snapcompact-hermes-boot-analysis.md 2.7 KB
- references/tool-router-architecture.md 3.6 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 438 lines · 35 tokens per session scan A 19b5531fa0d0
hermes-context-optimization is a skill published in the GitHub repository AtlasOmnia/hermes-custom-pack (56 stars, last pushed 21d ago), licensed MIT. It adds 35 tokens to every session and 7,307 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to hermes-context-optimization, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
hermes-context-optimization
Use this when the user asks about Hermes prompt/context size, “hello” startup cost, compression behavior, memory/profile bloat, tool-schema overhead, skill loading, session-store/search-index storage, or multimodal/visual-context approaches such as Snapcompact.
hermes-mnemosyne
Mnemosyne is Hermes' primary local-first memory engine — SQLite with vector + FTS5 hybrid search, 19+ tools, auto-consolidation, and a standalone CLI. It's a pip-installed plugin (not a built-in toolset) discovered via $HERMESHOME/plugins/mnemosyne/.
hermes-session-maintenance
Use this skill when the user asks about pruning Hermes sessions, session retention, session DB size, hermes sessions prune, sessions.autoprune, sessions.retentiondays, session export/backup, or whether old conversations should be capped.
mnemosyne-maintenance
Use when: upgrading Mnemosyne, diagnosing slow/hung consolidation (mnemosynesleep), fixing missing embeddings, or troubleshooting import/version mismatches.
openclaw-test-heap-leaks
Investigate pnpm test memory growth, Vitest worker OOMs, and suspicious RSS increases in OpenClaw using the scripts/test-parallel.mjs heap snapshot tooling. Use when Codex needs to reproduce test-lane memory growth, collect repeated .heapsnapshot files, compare snapshots from the same worker PID, distinguish…
feishu-wiki
Feishu knowledge base navigation. Activate when user mentions knowledge base, wiki, or wiki links.