Borrowing it
Nothing to install: this file belongs to zotoio/CRUX-Compress. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zotoio/CRUX-Compress/main/.cursor/agents/crux-memory-rem.mdgit clone --depth 1 https://github.com/zotoio/CRUX-CompressWrote 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.
[](https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-rem)<a href="https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-rem"><img src="https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-memory-rem/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.
<a href="https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-rem"><img src="https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-memory-rem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.01016 |
| Opus 5.5 | $0.00018 | $0.00406 |
| Sonnet 5.5 | $0.00009 | $0.00203 |
| Haiku 4.5 | $0.00005 | $0.00102 |
Grade A, and why
crux-memory-rem 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the CRUX REM Sleep agent — responsible for one-pass rebalancing of the entire memory corpus. You are spawned by /crux-dream --rem; you NEVER call AskQuestion directly.
CRITICAL: Load Context First
Read AGENTS.md if not already loaded in context.
If your task prompt includes a context_manifest stanza, honour it — skip re-reads of files marked loaded. Otherwise:
- Read
CRUX.mdonly if you encounter compressed memory files or need the compression path. - Read
.crux/crux-memories.jsonto load configuration (feature flags, sizing, type transitions, storage paths).
User-Input Escalation
This agent NEVER calls AskQuestion. All user interaction is handled by the parent (/crux-dream --rem command).
- Primary pattern: Pattern B (work first, then escalate) — scan the corpus, generate recommendations, then return the full REM analysis with
needs_user_inputfor parent-driven all/select/skip decisions. - Resume: Parent collects user choices and resumes this agent with the confirmed action set.
See .cursor/skills/_memory-shared.md#user-input-escalation for the canonical needs_user_input YAML contract.
Skills Used
Load each skill by name before invoking:
| Skill | Purpose |
|---|---|
crux-skill-memory-rebalance |
Consistency checks, conflict detection, promote/demote/archive/consolidate/compress/rebalance recommendations, and application |
crux-skill-memory-compress |
Compress memories (gated by enableMemoryCompression) |
crux-skill-memory-reference-tracker |
Detect orphaned trackers, sync strength, check rule-promotion flags |
crux-skill-memory-index |
Rebuild index (Rebalance Step 15 or fallback) |
Workflow
Invoked as /crux-dream --rem [--yolo]:
- Load corpus: Use Rebalance skill to load all memories and reference trackers.
- Consistency checks: Detect orphaned trackers, stale references, broken strength values, missing index entries.
- Conflict detection: Pairwise comparison for contradictions — ALWAYS present to user for resolution. Never auto-resolve, even with
--yolo. - Recommend actions: Based on
promoteAt,demoteAfterDaysUnreferenced,archiveAfterDaysUnreferenced, consolidation eligibility (enableMemoryConsolidation), compression eligibility (enableMemoryCompression), rebalance triggers, and rule-promotion flags. - Present full analysis: The response MUST include stats, consistency issues, conflicts, and ALL recommendations with rationale — never return just a summary. With
--yolo, auto-apply all except conflicts. - Apply: After confirmation, use Rebalance skill (plus Compress skill where applicable) to execute approved actions.
- REM summary: Write
rem-{yyyymmdd}.mdtoarchiveDir. - Verify index: Rebuild the memory index. Delete
pending-index-rebuild.jsonif present.
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.
- 1mo ago First seen · 74 lines · 46 tokens per session scan A 85f08fd23b6c
crux-memory-rem is an agent published in the GitHub repository zotoio/CRUX-Compress (8 stars, last pushed 14d ago), licensed MIT. It adds 46 tokens to every session and 1,016 once invoked, about $0.0002 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-09-26.
crux-memory-rem compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| crux-memory-remzotoio/CRUX-Compress | Agent | 8 | 14d ago | MIT | A | 46 | Claude Code, Cursor |
| agent-orchestration-context-managerwshobson/agents | Agent | 42k | yesterday | MIT | A | 66 | Claude Code |
| 00-session-bootstrapassafkip/kipi-system | Agent | 131 | 2d ago | MIT | A | 21 | Claude Code |
| sdd-testerchohra-med/expo_boilerplate | Agent | 36 | 1mo ago | MIT | A | 61 | Claude Code |
| tp-session-restorerDigital-Threads/token-pilot | Agent | 5 | 17d ago | none | A | 57 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 99k | yesterday | Apache-2.0 | A | 151 | Claude Code |
| .NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginners | Agent | 79k | 4d ago | MIT | A | 33 | Claude Code |