Agent skill

Hermes Session Maintenance

by AtlasOmnia in AtlasOmnia/donna-starter

hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention.

MITAuto-check passedDevOps & Cloud

Install Hermes Session Maintenance

skills CLI
$ npx skills add AtlasOmnia/donna-starter --skill hermes-session-maintenance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AtlasOmnia/donna-starter hermes-session-maintenance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AtlasOmnia/donna-starter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/autonomous-ai-agents/hermes-session-maintenance .claude/skills/hermes-session-maintenance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hermes-session-maintenance
GitHub stars
126
Token cost
~2.5k tokens
SKILL.md length
1,090 words
Files
4 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention.

  • Works in 8 steps: Inspect current volume → Inspect prune command behavior when needed → Check current config values → …
  • Tasks that involve Backup and disaster recovery
  • SKILL.md covers Operating principles, Standard workflow, Source-specific cleanup and One-time CLI clears, plus 4 more sections
  • Calls sqlite3

What it does

Hermes Session Maintenance is an agent skill from AtlasOmnia/donna-starter. hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/session-forensics-token-burn.md`, `references/session-pruning-retention.md` and `references/source-specific-retention-and-cli-clear.md`).

It sits in DevOps & Cloud, covering Backup and disaster recovery. The repository describes itself as: Donna — a starter Hermes Agent profile: opinionated persona, 73 curated skills, guided first-run orientation, optional Token Router. MIT. The licence is MIT.

When your agent uses it

  • Tasks that involve Backup and disaster recovery

Example prompts

  • “/hermes-session-maintenance”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Inspect current volume
  2. Inspect prune command behavior when needed
  3. Check current config values
  4. Recommend retention based on actual size and user needs.
  5. Before first major prune, export a backup
  6. Enable auto-prune if approved
  7. Reclaim space immediately with a manual prune
  8. Verify after pruning

What it can do on your machine

Read from SKILL.md and the folder at commit a3710bd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sqlite3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hermes Session Maintenance loads about 2.5k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 1,090 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AtlasOmnia/donna-starter at commit a3710bd, republished under its MIT licence (© AtlasOmnia). 1,090 words, ~2,521 tokens.

Download SKILL.mdSave it as .claude/skills/hermes-session-maintenance/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
hermes-session-maintenance
description
hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention.
version
1.0.0
license
MIT
platforms
linux, macos, windows
metadata.tags
hermes, sessions, pruning, maintenance, sqlite, retention
metadata.related_skills
hermes-agent

Hermes Session Maintenance

Use this skill when the user asks about pruning Hermes sessions, session retention, session DB size, hermes sessions prune, sessions.auto_prune, sessions.retention_days, session export/backup, or whether old conversations should be capped.

Operating principles

  • Treat this as Hermes configuration/maintenance work. If broader Hermes setup or CLI behavior is involved, also load hermes-agent for authoritative command references.
  • Do not assume retention policy from memory. Check live state before recommending destructive cleanup.
  • Pruning is deletion. Prefer exporting a safety snapshot before the first aggressive prune or before reducing retention substantially.
  • Distinguish default behavior from active behavior:
  • hermes sessions prune defaults to --older-than 90.
  • sessions.retention_days may also default to 90.
  • sessions.auto_prune: false means nothing is being deleted automatically.
  • Only ended sessions are prune candidates; active sessions are not pruned.

Standard workflow

  1. Inspect current volume:
bash
hermes sessions stats

Use total sessions, messages, per-source counts, and DB size to shape the recommendation.

  1. Inspect prune command behavior when needed:
bash
hermes sessions prune --help
  1. Check current config values:
bash
hermes config show

If the summary output does not include the session settings, inspect the config file's sessions: block directly. Do not use hermes config get; this CLI supports show, edit, set, path, env-path, check, and migrate, not get.

  1. Recommend retention based on actual size and user needs.
  • 90 days is conservative/default.
  • 30 days is reasonable when the DB is multi-GB and session search is mostly used for recent operational continuity.
  • Shorter than 30 days should usually be explicit user preference or a storage emergency.
  1. Before first major prune, export a backup:
bash
hermes sessions export ~/hermes-sessions-backup-$(date +%Y%m%d).jsonl
  1. Enable auto-prune if approved:
bash
hermes config set sessions.auto_prune true
hermes config set sessions.retention_days 30
  1. Reclaim space immediately with a manual prune:
bash
hermes sessions prune --older-than 30

Add --yes only if the user has authorized non-interactive deletion.

  1. Verify after pruning:
bash
hermes sessions stats

Source-specific cleanup

When one channel is the bloat source, prune only that source:

bash
hermes sessions prune --older-than 30 --source cli
hermes sessions prune --older-than 90 --source telegram

Use this when the user wants to preserve messaging history longer than CLI scratch sessions.

For ongoing split retention, do not rely on global sessions.auto_prune because it has one retention window and can prematurely prune the longer-lived source. Use a quiet script under ~/.hermes/scripts/ and a local no-agent cron job instead:

bash
hermes config set sessions.auto_prune false
hermes config set sessions.retention_days 45 # documentation/default only when auto_prune is off
# ~/.hermes/scripts/prune-sessions-by-source.sh:
# hermes sessions prune --older-than 15 --source cli --yes
# hermes sessions prune --older-than 45 --source telegram --yes

Schedule it daily with deliver='local' and no_agent=true so it does not message the user unless it fails. Cron script paths must be relative to ~/.hermes/scripts/, not absolute.

For the detailed split-retention pattern and one-time CLI purge procedure, see references/source-specific-retention-and-cli-clear.md.

One-time CLI clears

When the user explicitly asks to clear all CLI sessions, first try the CLI pruner:

bash
hermes sessions prune --older-than 0 --source cli --yes

Then verify. If many CLI sessions remain, check whether they are unended/active (ended_at IS NULL). The built-in pruner only removes prune candidates, so historical CLI sessions that were never marked ended may remain.

For an explicit destructive CLI-only clear, keep the newest/current CLI session, delete messages and sessions rows for other source='cli' sessions directly in ~/.hermes/state.db, then checkpoint/VACUUM after stopping processes that hold the DB. Preserve Telegram/Discord/cron/subagent sessions unless separately requested. See the reference file above for the SQL and verification queries.

Pitfalls

  • Do not present the 90-day default as a hard cap. It is a default cutoff for pruning/retention, not an immutable limit.
  • Do not say auto-prune is active just because retention_days is set. sessions.auto_prune must be true.
  • Do not skip hermes sessions stats; the right recommendation depends on live DB size and source mix.
  • The live session store is typically ~/.hermes/state.db, not ~/.hermes/sessions.db. If reclaiming disk space manually, inspect state.db and its -wal/-shm companions.
  • SQLite may not physically shrink after pruning while Hermes CLI/gateway/dashboard processes hold state.db open. A WAL checkpoint may need gateway/dashboard temporarily stopped; a full VACUUM may still require all Hermes CLI sessions to exit. Do not leave a large state.db-wal behind after attempting VACUUM — run PRAGMA wal_checkpoint(TRUNCATE); once locks are clear.
  • Do not imply memory, skills, cron jobs, notes, or project files are affected by session pruning. Session pruning affects session transcripts/state only.
  • Do not over-explain when the user asks for a go/no-go recommendation. Give the recommendation, the tradeoff, and the exact commands.
  • For the user, session-retention questions usually want a direct recommendation first, not a long policy discussion. If live stats show a multi-GB DB and mostly recent operational use, recommend 30 days with auto-prune; mention 45 days as the conservative alternative and 90 days only for deliberate archive-style use.
Show full SKILL.md (396 more words)Show less

Session forensics: token burn, suspected loops, and runaway turns

Use this skill not only for pruning/retention, but also when the user says a session "looped," burned too many tokens, felt unusually slow, or may have resent content repeatedly.

Fast diagnostic workflow
  1. Read the session from the DB and identify whether the waste came from:
  • repeated assistant/tool turns inside one user request,
  • duplicate gateway delivery,
  • oversized skill/tool payloads,
  • or a genuinely long final answer.
  1. Check session totals in state.db:
bash
sqlite3 ~/.hermes/state.db <<'SQL'
.headers on
.mode column
SELECT id, source, title, model, input_tokens, output_tokens,
cache_read_tokens, reasoning_tokens, api_call_count, message_count,
datetime(started_at,'unixepoch','localtime') AS started,
datetime(ended_at,'unixepoch','localtime') AS ended
FROM sessions
WHERE id='SESSION_ID';
SQL
  1. Inspect per-message shape to see the turn pattern and tool payload sizes:
bash
sqlite3 ~/.hermes/state.db <<'SQL'
.headers on
.mode column
SELECT id, role, tool_name, tool_call_id, length(COALESCE(content,'')) AS content_len,
datetime(timestamp,'unixepoch','localtime') AS ts
FROM messages
WHERE session_id='SESSION_ID'
ORDER BY id;
SQL
  1. Check gateway timing/delivery behavior:
  • look for inbound message, response ready,
  • and especially Suppressing normal final send ... content_delivered=True. That pattern usually means streaming already delivered the final answer once, so the problem was not duplicate send.
  1. Attribute blame precisely:
  • large skill_view payloads,
  • multiple overlapping web_search / web_extract calls,
  • repeated assistant-empty/tool turns,
  • or unnecessary env dumps for simple lookup questions.
What to conclude
  • If gateway logs show one inbound and one response ready, with content_delivered=True, call it an internal tool-call cascade or context-growth problem — not a transport resend loop.
  • If a single loaded skill or search result dominates payload size, call that out explicitly. Quantify it.
  • Distinguish input-token burn from output-token size. Often the answer is short; the cost came from replaying tool results back into the model.
Pitfalls
  • Do not call every high-token session a "loop." Many are just over-eager research/tool fan-out.
  • Do not blame Telegram delivery when gateway logs show suppression of duplicate final send.
  • Do not stop at session_search() if the user is asking about token burn. Use state.db and gateway.log so the diagnosis is grounded.
  • Do not save transient missing-binary issues as durable skill knowledge. The durable lesson is to avoid loading bulky skills or fanning out searches unnecessarily when a cheap-first path would answer the question.
Cheap-first guidance to recommend after diagnosis

For lightweight link-analysis or one-question sessions:

  • prefer one direct extract/read path first,
  • avoid loading a full skill unless the tool is truly needed for writes or auth-specific operations,
  • cap redundant searches,
  • and use minimal env queries for session-ID lookups instead of broad dumps.

See also: references/session-forensics-token-burn.md.

References

  • references/session-pruning-retention.md — condensed notes from the session where 30-day auto-prune was evaluated against a 6.7GB session DB.
  • references/session-forensics-token-burn.md — diagnosing whether a session burned tokens because of duplicate delivery, internal tool cascades, or oversized tool payloads.

Public support files

  • references/session-forensics-token-burn.md
  • references/session-pruning-retention.md
  • references/source-specific-retention-and-cli-clear.md

© AtlasOmnia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/autonomous-ai-agents/hermes-session-maintenance of AtlasOmnia/donna-starter.

  • SKILL.md
  • references/session-forensics-token-burn.md
  • references/session-pruning-retention.md
  • references/source-specific-retention-and-cli-clear.md

Open the folder on GitHubat commit a3710bd

Compare with similar skills

Hermes Session Maintenance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hermes Session Maintenance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hermes Session Maintenance this skillAtlasOmnia/donna-starter126—~2.5kAutomated safety check: PassMIT
OmniRoute Backup and Sync CLIdiegosouzapw/OmniRoute74k—~948Automated safety check: PassMIT
Pymobiledevice3 Device Operatordoronz88/pymobiledevice32.9k—~1.8kAutomated safety check: NotesGPL-3.0
Myclaw BackupLeoYeAI/openclaw-backup659—~1.8kAutomated safety check: PassMIT
OmniRoute Database Backupsdiegosouzapw/OmniRoute74k—~395Automated safety check: PassMIT
Tempsgotempsh/temps828—~2kAutomated safety check: PassApache-2.0

Similar skills

  • OmniRoute Backup and Sync CLI

    diegosouzapw/OmniRoute

    Backup and restore OmniRoute data from the CLI. Trigger incremental snapshots, sync to cloud storage, manage backup schedules, and restore from archive files.

    74k GitHub stars~948 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Pymobiledevice3 Device Operator

    doronz88/pymobiledevice3

    Operate iOS and iPadOS devices with pymobiledevice3, from a local checkout or straight from PyPI via uvx on a fresh workstation.

    2.9k GitHub stars~1.8k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Myclaw Backup

    LeoYeAI/openclaw-backup

    Backup and restore all OpenClaw configuration, agent memory, skills, and workspace data.

    659 GitHub stars~1.8k tokensUpdated 7 mo ago
    DevOps & CloudAuto-check passed
  • OmniRoute Database Backups

    diegosouzapw/OmniRoute

    Trigger system backups, restore from backup files, and manage the SQLite database lifecycle. Supports export, import, and incremental snapshot strategies.

    74k GitHub stars~395 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Temps

    gotempsh/temps

    Manage, deploy, operate, and instrument applications with Temps.

    828 GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Hermes Offsite Backup

    OnlyTerp/hermes-optimization-guide

    Set up encrypted off-machine Hermes backups. An agent skill from OnlyTerp/hermes-optimization-guide.

    687 GitHub stars~772 tokensUpdated 16 days ago
    DevOps & CloudAuto-check passed

More from AtlasOmnia/donna-starter

All 11 skills in this repo
  • macOS Storage Management

    AtlasOmnia/donna-starter

    macos-storage-management — Use when freeing Mac storage or moving files to SSDs.

    126 GitHub stars~4.2k tokensUpdated 21 days ago
    Auto-check passed
  • Marketing Collateral Design

    AtlasOmnia/donna-starter

    marketing-collateral-design — Use when designing, recreating, critiquing, or exporting static marketing collateral such as flyers, social graphics, postcards, brochures, business cards, print ads…

    126 GitHub stars~4.2k tokensUpdated 21 days ago
    Auto-check passed
  • Hermes Self Evaluation

    AtlasOmnia/donna-starter

    hermes-self-evaluation — Use when the user asks to evaluate, audit, or optimize Hermes itself — analyzing session history, skill library, costs, and architecture to identify improvements, automation…

    126 GitHub stars~3k tokensUpdated 21 days ago
    Auto-check: notes
  • Skill Auditor

    AtlasOmnia/donna-starter

    skill-auditor — Use when auditing, reviewing, or grading Hermes skills for quality.

    126 GitHub stars~3.8k tokensUpdated 21 days ago
    Auto-check passed
  • Local Discovery

    AtlasOmnia/donna-starter

    local-discovery — Find local events, venues, and activities — ad-hoc web discovery when the user asks 'what's happening' or 'what should I do this weekend'.

    126 GitHub stars~3.1k tokensUpdated 21 days ago
    Auto-check passed
  • Cross Browser Typography QA

    AtlasOmnia/donna-starter

    cross-browser-typography-qa — Diagnose and verify web typography rendering defects across Chromium, WebKit, and native Safari, including clipped glyphs, broken descenders, wrapping, font metrics…

    126 GitHub stars~2.3k tokensUpdated 21 days ago
    Auto-check passed

Categories

Questions about Hermes Session Maintenance

What does Hermes Session Maintenance do?

hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention. Hermes Session Maintenance is an agent skill from AtlasOmnia/donna-starter. hermes-session-maintenance — Maintain Hermes Agent session history: inspect size, export backups, prune old ended sessions, and configure safe auto-prune retention.

When should I use Hermes Session Maintenance?

Hermes Session Maintenance fits situations like: tasks that involve Backup and disaster recovery.

How do I install Hermes Session Maintenance in Claude Code?

Run `npx skills add AtlasOmnia/donna-starter --skill hermes-session-maintenance -a claude-code`. Or copy the skill folder (skills/autonomous-ai-agents/hermes-session-maintenance in AtlasOmnia/donna-starter) into .claude/skills/hermes-session-maintenance in your project. Claude Code loads it when a task matches its description.

How do I install Hermes Session Maintenance in Codex?

Run `npx skills add AtlasOmnia/donna-starter --skill hermes-session-maintenance -a codex`. Or copy the skill folder (skills/autonomous-ai-agents/hermes-session-maintenance in AtlasOmnia/donna-starter) into .agents/skills/hermes-session-maintenance in your project. Codex loads it when a task matches its description.

Can I use Hermes Session Maintenance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AtlasOmnia/donna-starter --skill hermes-session-maintenance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hermes-session-maintenance, .gemini/skills/hermes-session-maintenance, .github/skills/hermes-session-maintenance and .opencode/skills/hermes-session-maintenance in your project.

What does Hermes Session Maintenance need to run?

Going by SKILL.md and its folder, Hermes Session Maintenance needs the command-line tools its instructions call (sqlite3).

Does Hermes Session Maintenance access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hermes Session Maintenance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hermes Session Maintenance use?

Hermes Session Maintenance is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hermes Session Maintenance use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Hermes Session Maintenance?

Skills that share tags, products or a category with Hermes Session Maintenance: OmniRoute Backup and Sync CLI (diegosouzapw/OmniRoute, 74k stars), Pymobiledevice3 Device Operator (doronz88/pymobiledevice3, 2.9k stars), Myclaw Backup (LeoYeAI/openclaw-backup, 659 stars) and OmniRoute Database Backups (diegosouzapw/OmniRoute, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hermes Session Maintenance?

AtlasOmnia (a GitHub user) maintains it in AtlasOmnia/donna-starter, which has 126 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 19, 2026.

Source: AtlasOmnia/donna-starter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.