mnemos

Maintain a typed MnemoGraph memory store to restore context after compaction.

705|56|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/alinaqi/maggy --skill mnemos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mnemos
Source: https://github.com/alinaqi/maggy/tree/main/skills/mnemos
Command: npx skills add https://github.com/alinaqi/maggy --skill mnemos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents important working knowledge from being lost when Claude Code compacts context by maintaining a structured, type-aware memory graph that can be re-injected on resume.

Core Features & Use Cases

  • Typed MnemoGraph Memory: Preserves different node types with tailored eviction policies (goals and constraints never evicted; results compressed; context evictable; checkpoints persisted).
  • Fatigue-Aware Consolidation: Passively monitors token utilization, scope scatter, re-read ratio, and error density to decide when to compress or checkpoint.
  • Three-Layer Post-Compaction Recovery: Ensures restored context after compaction via PreCompact, a SessionStart "compact" primary restore, and a PreToolUse fallback injection.
  • Session Resume & Auditability: Writes and loads checkpoints from .mnemos/ to continue tasks without losing decisions, handoffs, or progress.
  • iCPG Integration: Bridges iCPG ReasonNodes into Mnemos Goal/Constraint nodes to keep intent and invariants consistent across sessions.

Quick Start

Add a GoalNode for your current task, then let the hooks automatically checkpoint and restore your context after compaction.

Frequently Asked Questions about mnemos

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent context compaction from losing task memory in long-running agent sessions?

To prevent context compaction from losing task memory, you can use a structured memory graph that stores typed nodes for goals, constraints, and results. This ensures critical working knowledge survives compaction and can be re-injected when the session resumes.

What is context compaction and when does it destroy structured task knowledge?

Context compaction is a process that compresses active session context to manage token limits. It can destroy structured task knowledge by evicting critical details like goals and constraints unless a typed memory store actively preserves and restores them post-compaction.

How do I restore agent hooks and task checkpoints after a session transition?

You can restore agent hooks and task checkpoints after a session transition by loading persisted checkpoint files from a designated memory directory. A three-layer recovery system re-injects this context at pre-compaction, session-start, and pre-tool fallback stages.

Can I maintain task goals and constraints across multiple Claude Code sessions?

Yes, you can maintain task goals and constraints across multiple Claude Code sessions by managing a typed MnemoGraph memory store. Goals and constraints are never evicted during compaction, ensuring intent and invariants remain consistent across transitions.

Does this memory graph approach work with iCPG integration for agent reasoning?

Yes, this approach supports iCPG integration by bridging iCPG ReasonNodes directly into the memory graph as Goal and Constraint nodes. This keeps agent reasoning and task invariants aligned and persistent across different working sessions.

What are the limitations of fatigue-scored consolidation for memory checkpointing?

Fatigue-scored consolidation for memory checkpointing relies on monitoring token utilization, scope scatter, re-read ratio, and error density. It is limited by the accuracy of these passive metrics in deciding exactly when to compress evictable context nodes or persist checkpoints.