cortex-debug-memory

cortex-debug-memory is a skill for Claude Code from cdeust/Cortex. It costs 87 tokens per session (843 once invoked), scanned A, original, MIT.

A skill for checking and repairing a persistent memory system. It can validate stored memories, assess whether they are useful, protect important ones, remove incorrect ones, and restore earlier checkpoints.

In plain words
What is it for?
Use it to fix wrong memories, rate memory quality, protect critical information, forget outdated entries, or restore the memory system after a mistake.
Why use it?
It helps correct stale or inaccurate stored information so future searches do not rely on bad project knowledge.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hypermnesia-mcp plugin — 13 skills, 4 commands, 5 agents, 2 MCP servers shipped together

Good fit Use it to fix wrong memories, rate memory quality, protect critical information, forget outdated entries, or restore the memory system after a mistake.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cdeust/cortex/cortex-debug-memory
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 cdeust/Cortex --skill cortex-debug-memory
Clone the repo
git clone --depth 1 https://github.com/cdeust/Cortex

Made for: Claude Code.

Or install hypermnesia-mcp, the plugin that ships this one along with the rest of its 13 skills, 4 commands, 5 agents, 2 MCP servers.

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 cortex-debug-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/cdeust/cortex/cortex-debug-memory/github.svg)](https://agentmods.dev/skills/cdeust/cortex/cortex-debug-memory)
Your own site
<a href="https://agentmods.dev/skills/cdeust/cortex/cortex-debug-memory"><img src="https://agentmods.dev/badge/skills/cdeust/cortex/cortex-debug-memory/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 cortex-debug-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/cdeust/cortex/cortex-debug-memory"><img src="https://agentmods.dev/badge/skills/cdeust/cortex/cortex-debug-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 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 pass 7 Sept 2026
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.00087 $0.00843
Opus 5.5 $0.00035 $0.00337
Sonnet 5.5 $0.00017 $0.00169
Haiku 4.5 $0.00009 $0.00084

Measured 3mo ago against content hash 0405a094c969, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cortex-debug-memory 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 3mo 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/cortex-debug-memory/SKILL.md · 130 lines

How it starts

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

Debug Memory — Fix, Rate, Protect, and Restore

Keywords

debug, fix, bad memory, wrong, delete, forget, protect, rate, quality, restore, checkpoint, undo, stale, incorrect, mark useful, mark not useful, anchor, unprotect

Overview

Tools for maintaining memory quality — rate memories as useful or not, protect critical ones from decay, forget incorrect ones, validate against the filesystem, and restore from checkpoints when things go wrong.

Use this skill when: Recall returns wrong results, memories are stale, you need to undo changes, or you want to improve retrieval quality through feedback.

Workflow

Fix Bad Memories

Soft delete (sets heat to 0, memory still exists but won't surface):

cortex:forget({
  "memory_id": <id>,
  "hard": false
})

Hard delete (permanent removal):

cortex:forget({
  "memory_id": <id>,
  "hard": true
})

Protected memories require "force": true to delete.

Rate Memory Quality

Provide feedback to train the metamemory confidence model:

cortex:rate_memory({
  "memory_id": <id>,
  "useful": true
})

Or mark as not useful:

cortex:rate_memory({
  "memory_id": <id>,
  "useful": false,
  "reason": "outdated — we no longer use this approach"
})

Ratings adjust the memory's confidence score, which affects future retrieval ranking. Over time, this trains the system to surface better results.

Protect Critical Memories

Anchor a memory (heat=1.0 permanently, injected at session start):

cortex:anchor({
  "memory_id": <id>,
  "reason": "Core architecture decision — never decay"
})

Validate Against Reality

Check if memories reference things that still exist:

cortex:validate_memory({
  "directory": "<project root>"
})

Returns a list of stale memories (referencing deleted files, moved modules, etc.) that should be forgotten or updated.

Checkpoint and Restore

Save a checkpoint before risky operations:

cortex:checkpoint({
  "action": "save",
  "label": "before-cleanup"
})

Read the full file on GitHub · 130 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. 3mo ago First seen · 130 lines · 87 tokens per session scan A 0405a094c969

Subscribe to this mod's changes

cortex-debug-memory is a skill published in the GitHub repository cdeust/Cortex (78 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 843 once invoked, about $0.0003 per session on Opus 5.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

cortex-debug-memory compared with skills from other repositories

cortex-debug-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cortex-debug-memorycdeust/CortexSkill78todayMITA87Claude Code
xcodebuildmcp-cligetsentry/XcodeBuildMCPSkill6.6k6d agoMITA48Claude Code, Codex
memory-safety-c-cppprovos/ironcurtainSkill6894d agoApache-2.0A113Claude Code, Codex
opik-diagnosecomet-ml/opik-mcpSkill226todayApache-2.0A187Claude Code
opik-explaincomet-ml/opik-mcpSkill226todayApache-2.0A113Claude Code
taskade-fix-flowstaskade/mcpSkill171todayMITA231Claude Code
ssh-incidentbvisible/mcp-ssh-managerSkill561yesterdayMITA46Claude Code, Codex