CRUX-Compress: Agent for Claude Code

.cursor/agents/crux-memory-dream.md

crux-memory-dream is an agent for Claude Code, Cursor from zotoio/CRUX-Compress. It costs 45 tokens per session (1,190 once invoked), scanned A, original, MIT.

A memory-extraction agent for CRUX that examines completed work and proposes useful memories, including conflicts and fixed bugs. CRUX is a project memory system, and the parent command decides which proposals to keep.

In plain words
What is it for?
Use it after completed tasks to find reusable decisions, bug resolutions, and possible conflicts in stored project memories.
Why use it?
It reduces the need to manually record important lessons after each unit of work while keeping acceptance decisions under user control.

Agent for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions AGENTS.md.

This is zotoio/CRUX-Compress's own configuration. It tells Claude Code and Cursor how to work on CRUX-Compress itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CRUX-Compress configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/zotoio/CRUX-Compress/main/.cursor/agents/crux-memory-dream.md
Clone the repo
git clone --depth 1 https://github.com/zotoio/CRUX-Compress

Made for: Claude Code, Cursor.

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 crux-memory-dream

README.md
[![agentmods](https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-memory-dream/github.svg)](https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-dream)
Your own site
<a href="https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-dream"><img src="https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-memory-dream/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 crux-memory-dream

Your own site · 80×15
<a href="https://agentmods.dev/agents/zotoio/crux-compress/crux-memory-dream"><img src="https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-memory-dream.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,190 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.
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.00045 $0.01190
Opus 5.5 $0.00018 $0.00476
Sonnet 5.5 $0.00009 $0.00238
Haiku 4.5 $0.00005 $0.00119

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

Security

Grade A, and why

crux-memory-dream 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.

.cursor/agents/crux-memory-dream.md · 82 lines

How it starts

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

You are the CRUX Dream agent — responsible for extracting memories from completed units of work. You are spawned by the /crux-dream command; 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.md only if you encounter .memory.crux.md files that need decompression.
  • Read .crux/crux-memories.json to load configuration (feature flags, sizing, dream settings, storage paths).

User-Input Escalation

This agent NEVER calls AskQuestion. All user interaction is handled by the parent (/crux-dream command).

  • Primary pattern: Pattern B (work first, then escalate) — analyse artefacts, rank candidates, detect conflicts, then return the full proposal with needs_user_input for parent-driven accept/skip decisions.
  • Resume: Parent collects user choices and resumes this agent with confirmed candidates.

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-extract Analyse artefacts, rank candidates, detect resolved bugs
crux-skill-memory-crud Create accepted memories, delete resolved red-flags
crux-skill-memory-index Rebuild .crux/memory-index.yml after changes

Workflow

Invoked as /crux-dream <spec-name>:

  1. Work directory: Read from cfg.dream.workDir (default: specs). Verify specs/{name}/ exists; if not, abort and list available directories. Do not search elsewhere.
  2. Verify completed: Use Extract skill to check the state file (cfg.dream.stateFile). If the unit of work is incomplete, abort.
  3. Diff scope: Analyse changes in the unit of work. If changed files exceed maxUnrelatedChanges (default: 50), warn that extraction may be noisy.
  4. Extract candidates: Use Extract skill to produce ranked candidate facts across types: core, redflag, goal, learning, idea.
  5. Compare existing: Load the memory corpus (memoriesDir + agentMemoriesDir) and filter candidates for novelty — skip anything already captured.
  6. Conflicts: If conflicts with existing memories are detected, ALWAYS present to user for resolution. Never auto-resolve conflicts, even with --yolo.
  7. Type assignment: Assign type from typePriority. Only scope to agent-specific directory if the memory is clearly agent-specific.
  8. Rank and present: Return top maxCandidateFacts (default: 5) candidates. With --yolo, auto-accept all except conflicts.
  9. Full response required: The response MUST include the full analysis (execution summary, diff scope, findings, comparison results, ranked fields, resolved bugs) — never return just a summary.
  10. Create accepted: Use CRUD skill to create each accepted memory.
  11. Resolved-bug review: Use Extract skill to identify resolved bugs. With --yolo, auto-forget likely resolved ones; prompt for ambiguous cases.
  12. Dream summary: Write dream-{slug}-{yyyymmdd}.md to the archive directory.
  13. Rebuild index: Use Index skill to rebuild the memory index. Delete pending-index-rebuild.json if present.
  14. Offer archive: Offer to move the completed unit of work to archiveDir.

Read the full file on GitHub · 82 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. 1mo ago First seen · 82 lines · 45 tokens per session scan A 0dcab43f0055

Subscribe to this mod's changes

crux-memory-dream is an agent published in the GitHub repository zotoio/CRUX-Compress (8 stars, last pushed 14d ago), licensed MIT. It adds 45 tokens to every session and 1,190 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.

Related

crux-memory-dream compared with agents from other repositories

crux-memory-dream next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
crux-memory-dreamzotoio/CRUX-CompressAgent814d agoMITA45Claude Code, Cursor
agent-orchestration-context-managerwshobson/agentsAgent42kyesterdayMITA66Claude Code
00-session-bootstrapassafkip/kipi-systemAgent1312d agoMITA21Claude Code
sdd-testerchohra-med/expo_boilerplateAgent361mo agoMITA61Claude Code
tp-session-restorerDigital-Threads/token-pilotAgent517d agononeA57Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code