mnemos

mnemos is a skill for Claude Code from alinaqi/maggy. It costs 40 tokens per session (1,718 once invoked), scanned A, original, MIT.

A task-scoped memory system that stores goals, constraints, results, context, and checkpoints as different kinds of knowledge. It keeps important facts through context compaction and saves checkpoints for resuming work.

In plain words
What is it for?
Use it to preserve goals and constraints, compress results, remove less useful context, monitor signs of agent fatigue, and resume sessions from saved checkpoints.
Why use it?
It reduces the risk that an agent forgets requirements, decisions, or useful code references when a long task runs out of working context.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to preserve goals and constraints, compress results, remove less useful context, monitor signs of agent fatigue, and resume sessions from saved checkpoints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/mnemos
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.

Any agent
npx skills add alinaqi/maggy --skill mnemos
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

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 mnemos

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/mnemos/github.svg)](https://agentmods.dev/skills/alinaqi/maggy/mnemos)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/mnemos"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/mnemos/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mnemos

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/mnemos"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/mnemos.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 65
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • low Excessive Agency · line 43
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
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.1 $0.00040 $0.01718
Opus 5 $0.00020 $0.00859
Sonnet 5 $0.00008 $0.00344
Haiku 4.5 $0.00004 $0.00172

Measured 8d ago against content hash ff9f8080b6d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

mnemos 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 8d 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/mnemos/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mnemos — Task-Scoped Memory Lifecycle

What It Does

Mnemos prevents lossy context compaction from destroying the structured knowledge you need most. It treats your working memory as a typed graph (MnemoGraph) where different types of knowledge have different eviction policies:

  • GoalNodes and ConstraintNodes are NEVER evicted — they survive all compaction
  • ResultNodes are compressed (summary kept) before eviction
  • ContextNodes are evictable when their activation weight drops
  • CheckpointNodes persist to disk for session resume

Fatigue Model

Mnemos monitors 4 dimensions of "agent fatigue" — all passively observed from hook data, no manual input needed:

Dimension Weight Signal Source What It Measures
Token utilization 0.40 Statusline JSON How full the context window is
Scope scatter 0.25 PreToolUse file paths How many directories the agent is bouncing between
Re-read ratio 0.20 PreToolUse Read calls How often the agent re-reads files it already read (context loss)
Error density 0.15 PostToolUse outcomes What fraction of tool calls are failing (agent struggling)

Fatigue states and actions:

State Score Action
FLOW 0.0–0.4 Normal operation
COMPRESS 0.4–0.6 Micro-consolidation runs (compress 3 ResultNodes, evict 1 cold ContextNode)
PRE-SLEEP 0.6–0.75 Checkpoint written, consolidation runs
REM 0.75–0.9 Emergency checkpoint, consider wrapping up
EMERGENCY 0.9+ Checkpoint written, hand off immediately

How To Use

Automatic (hooks handle everything):

  1. Statusline writes fatigue.json on every API call
  2. PreToolUse hook reads fatigue before every edit, auto-checkpoints at 0.60+
  3. PreCompact hook writes emergency checkpoint, compaction marker, and tells summarizer what to preserve
  4. SessionStart "compact" fires immediately after compaction, re-injects full checkpoint (primary restore)
  5. SessionStart "startup|resume" loads last checkpoint on new/resumed sessions
  6. PreToolUse fallback (no matcher) detects compaction marker if SessionStart didn't fire
  7. Stop hook writes final checkpoint for next session

Read the full file on GitHub · 135 lines

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. 8d ago First seen · 135 lines · 40 tokens per session scan A ff9f8080b6d8

Subscribe to this mod's changes

mnemos is a skill published in the GitHub repository alinaqi/maggy (707 stars, last pushed 3d ago), licensed MIT. It adds 40 tokens to every session and 1,718 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

report

Writes the session final report to a file, then prints only the path and a one-line summary. Fires when the prompt contains "Report per memstack:report", and also when the prompt begins with a standing trigger configured through MEMSTACKREPORTONTASKPROMPTS or MEMSTACKREPORTTRIGGERS. Dormant otherwise.

cwinvestments/memstack · 67 tokens

token-optimization

Use when the user says 'token optimization', 'save tokens', 'context window', 'reduce tokens', 'token stack', or 'TokenStack', or asks about extending context window capacity. Covers TokenStack, the built-in compression proxy that shrinks Claude Code tool output before it reaches the Anthropic API. Do NOT use for…

cwinvestments/memstack · 79 tokens

compress

Use when the user says 'tokenstack', 'compression', 'token savings', 'proxy status', or asks about context window usage.

cwinvestments/memstack · 29 tokens

state

Use when the user says 'update state', 'project state', 'where was I', or at session start to load current context.

cwinvestments/memstack · 29 tokens

grimoire

Use when the user says 'update context', 'update claude', 'save library', or after significant project changes.

cwinvestments/memstack · 28 tokens

init

Turn on Rekal memory in the current repository by running rekal init. Use when the user asks to initialize or set up Rekal here, or when a rekal command reported the repository is not initialized. Once per repository. Do not offer this merely because a repo lacks a .rekal/ store — most repos do not want one.

rekal-dev/rekal-cli · 75 tokens