Install
$ agentstack add skill-cdeust-cortex-cortex-debug-memory ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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": ,
"hard": false
})
Hard delete (permanent removal):
cortex:forget({
"memory_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": ,
"useful": true
})
Or mark as not useful:
cortex:rate_memory({
"memory_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": ,
"reason": "Core architecture decision — never decay"
})
Validate Against Reality
Check if memories reference things that still exist:
cortex:validate_memory({
"directory": ""
})
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"
})
Restore if something went wrong:
cortex:checkpoint({
"action": "restore",
"label": "before-cleanup"
})
List available checkpoints:
cortex:checkpoint({
"action": "list"
})
Checkpoints are also created automatically before context compaction (via the compaction hook).
Common Issues
Recall returns irrelevant results:
- Rate the bad results as
useful: false - Rate the good results as
useful: true - Check if there are duplicate/conflicting memories on the same topic
- Run
validate_memoryto find stale content
Too many memories on the same topic:
- Run
cortex:consolidate— CLS will merge similar episodic memories into semantic ones - Manually
forgetduplicates
Memory seems wrong/outdated:
- Forget the old memory
- Remember the corrected version
- The knowledge graph will update automatically
Lost important context after compaction:
- Check
cortex:checkpoint({ "action": "list" })for auto-checkpoints - Restore the most recent pre-compaction checkpoint
- Anchored memories survive compaction automatically
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: cdeust
- Source: cdeust/Cortex
- License: MIT
- Homepage: https://ai-architect.tools
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.