memory-archivist

memory-archivist is a skill for Claude Code, Codex from mage0535/hermes-memory-installer. It costs 22 tokens per session (441 once invoked), scanned A, original, MIT.

A set of scripts for archiving conversations, syncing them to a knowledge graph, updating summaries, and managing stored memories over time. A knowledge graph is a linked collection of information and relationships.

In plain words
What is it for?
Use it to archive sessions, create summaries, sync knowledge, detect conflicts, compress duplicate memories, remove expired entries, and review memory trends.
Why use it?
It helps preserve useful conversation history while detecting stale, conflicting, duplicate, or oversized memory entries. Scheduled jobs can automate archiving and cleanup.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/mage0535/hermes-memory-installer/memory-archivist
Any agent
npx skills add mage0535/hermes-memory-installer --skill memory-archivist
Clone the repo
git clone --depth 1 https://github.com/mage0535/hermes-memory-installer

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for memory-archivist

README.md
[![agentmods](https://agentmods.dev/badge/skills/mage0535/hermes-memory-installer/memory-archivist.svg)](https://agentmods.dev/skills/mage0535/hermes-memory-installer/memory-archivist)
Your own site
<a href="https://agentmods.dev/skills/mage0535/hermes-memory-installer/memory-archivist"><img src="https://agentmods.dev/badge/skills/mage0535/hermes-memory-installer/memory-archivist.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.00441
Opus 5 $0.00011 $0.00220
Sonnet 5 $0.00004 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 5d ago against content hash 80cc400f7b64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-archivist 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 5d 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.

skills/memory-archivist/SKILL.md · 55 lines

What it actually says

Memory Archivist

进阶记忆层。实现自动化: 会话归档 → gbrain 知识图谱同步 → 记忆清理。

核心脚本

1. 会话归档 (archive_sessions.py)

从 state.db 提取完整对话 → 生成结构化摘要 → 写入 gbrain

python3 scripts/archive_sessions.py --session-id <id>

2. 自动摘要 (auto_session_summary.py)

分析对话关键决策/学习/变更 → 生成 session_summary.md

3. 知识图谱同步 (session_to_gbrain.py)

增量同步: Hermes state.db → gbrain pages, 含 timeline + tags + wikilinks

python3 scripts/session_to_gbrain.py --resume  # 断点续传

4. 记忆生命周期 (memory_lifecycle.py)

  • 检测 stale 记忆 (>30天未访问)
  • 标记 expired 记忆 (>90天)
  • 自动清理, 保护已标注 keep 的记忆

5. 记忆守护 (memory_guardian.py)

11.7KB, 最全面的记忆管理:

  • 容量检测 (memory tool 5KB cap)
  • 冲突检测 (新旧信息矛盾)
  • 智能压缩 (合并重复条目)
  • 过期清理

6. 记忆反思 (memory_reflect.py)

周期性运行, 分析近期记忆趋势, 生成用户画像更新建议

Cron 配置

# 每日归档
schedule: "30 3 * * *"
script: $AGENT_HOME/scripts/archive_sessions.py

# 每周生命周期
schedule: "0 4 * * 0"
script: $AGENT_HOME/scripts/memory_lifecycle.py
Files

What ships with it

1 file 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.

Changes

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.

  1. 5d ago First seen · 55 lines · 22 tokens per session scan A 80cc400f7b64

Subscribe to this mod's changes

memory-archivist is a skill published in the GitHub repository mage0535/hermes-memory-installer (204 stars, last pushed 13d ago), licensed MIT. It adds 22 tokens to every session and 441 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

engraphis-memory

Give the agent durable, scoped, explainable memory across sessions and repositories through the Engraphis MCP tools. Use when you learn a convention, decision, bug cause/fix, or user preference worth keeping; when prior context would help before you answer or act (to avoid re-asking or re-deriving); when asked "why is…

Coding-Dev-Tools/engraphis · 134 tokens

lemmalog

Externalize working memory and logical state into the lemmalog Datalog engine (MCP). Use for ANY multi-step task where state should outlive one context window or span agents: long investigations, debugging sessions, audits, multi-agent searches, systematic explorations, planning with many interdependent constraints…

JordyZomer/lemmalog · 105 tokens

ori-memory

Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.

aayoawoyemi/Ori-Mnemos · 54 tokens

agent-recall

Persistent compounding memory for AI agents. 5 default MCP tools: sessionstart, sessionend, remember, recall, check. Full surface (18 tools) available with --full flag. Two-verb model: inhale (sessionstart) and exhale (sessionend). Correction-first memory with decision trail tracking, watchfor warnings, palace rooms…

Goldentrii/AgentRecall-X · 157 tokens

mind

Local project memory with recall, provenance, policy, and dreams.

Da7-Tech/mind · 15 tokens

start

One-word self-unfolding onboarding. Sets up a fresh, unpersonalized vault end-to-end — installs the memory engine, runs the profile interview, scaffolds the vault, and teaches the user as it goes. The single front door.

xcota/pos · 51 tokens