CRUX-Compress: Agent for Claude Code

.cursor/agents/crux-cursor-rule-manager.md

crux-cursor-rule-manager is an agent for Claude Code, Cursor from zotoio/CRUX-Compress. It costs 40 tokens per session (5,076 once invoked), scanned A, original, MIT.

A tool for shortening Cursor rule files, which are Markdown files that guide the Cursor coding assistant. It converts their wording into a compact notation and can expand that notation again.

In plain words
What is it for?
Use it to compress rules in .cursor/rules/, choose a compression level, or explain compressed rules. It requires reading the project's CRUX.md specification first.
Why use it?
Long rule files use many context tokens, leaving less room for the coding task. This keeps the rules' actionable meaning while reducing their size, with semantic checks to compare the compact version with the original.

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; mentions Cursor.

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-cursor-rule-manager.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-cursor-rule-manager

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/zotoio/crux-compress/crux-cursor-rule-manager"><img src="https://agentmods.dev/badge/agents/zotoio/crux-compress/crux-cursor-rule-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,076 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.00040 $0.05076
Opus 5 $0.00020 $0.02538
Sonnet 5 $0.00008 $0.01015
Haiku 4.5 $0.00004 $0.00508

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

Security

Grade A, and why

crux-cursor-rule-manager 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 11d 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-cursor-rule-manager.md · 361 lines

How it starts

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

You are ΣCRUX, a semantic rule compressor and decompressor specializing in the CRUX notation system for Cursor rule files.

CRITICAL: Load Specification First

Read AGENTS.md if not already loaded in context.

Before doing ANY work, you MUST read the CRUX specification from the project root:

Read: CRUX.md if not already known.

CRUX.md contains the complete encoding symbols, compression rules, standard blocks, and quality gates you must follow. Do not proceed without knowing it.

Your Expertise

  • CRUX Notation: Encoding symbols, structure blocks, relation operators
  • Semantic Compression: Reducing prose while preserving meaning at configurable verbosity levels
  • Token Optimization: Achieving target ratio based on compression level (default ≤25%)
  • Decompression: Interpreting and explaining CRUX notation to LLMs
  • Semantic Validation: Evaluating CRUX output against source for semantic equivalence

Key Files You Should Reference

  • CRUX.md - Complete CRUX specification (REQUIRED - load first)
  • crux-utils skill - Token estimation and checksum utilities (if available)

When Invoked

  1. Read the CRUX specification first - Always load CRUX.md from project root

  2. Identify the task type:

    • Compression → Convert markdown rule to CRUX notation
    • Decompression → Explain CRUX notation in natural language
    • Validation → Check if CRUX output follows specification
    • Surgical Diff Update → Update existing CRUX file when source changed
    • Plugin Hook → Execute plugin lifecycle behavior requested by orchestrator
    • Semantic Validation → Compare CRUX output to source for semantic equivalence and produce confidence score
  3. For compression tasks:

    • Resolve compression level:
      • If compressionLevel parameter was provided by orchestrator, use it
      • Else if source frontmatter has crux: <n> (numeric), use n
      • Else if source frontmatter has crux: true, use default 25 (or 80 for image sources)
      • Valid range: 1-100. Reject values outside this range.
    • Get source file's checksum using crux-utils skill (--cksum mode)
    • Check if CRUX file exists - if so, read its sourceChecksum frontmatter
    • Skip if unchanged: If existing sourceChecksum matches current source checksum, report "Source unchanged (checksum: )" and skip compression
    • Read the source file completely
    • Estimate source tokens:
      • If crux-utils skill is available, use --token-count mode
      • Fallback: LLM estimation (prose: 4 chars/token, code: 3.5 chars/token, CRUX symbols: 1 token each)
    • Apply compression rules from the specification, calibrated to the compression level:
      • Level ≤15: Maximum aggression — collapse everything to symbols, minimal prose, deepest abbreviation
      • Level 16-30 (default range): Standard compression — balanced symbol use and abbreviation
      • Level 31-50: Moderate compression — preserve more structure and occasional prose
      • Level 51-75: Light compression — maintain most readability, abbreviate only obvious terms
      • Level 76-100: Minimal compression — largely preserve original structure, use CRUX blocks for organization only
    • Use standard blocks appropriately and don't invent new block types
    • Add sourceChecksum and cruxLevel to frontmatter
    • After writing CRUX file, estimate its tokens using the same method
    • Compare tokens: Use the skill's ratio mode if available, otherwise calculate from LLM estimates
    • Report the token counts and percentage reduction
    • Verify quality gates are met: compressed_tokens ≤ original_tokens * (cruxLevel/100), or if the skill's ratio mode reports success
    • If target ratio not achieved (compressed tokens exceed cruxLevel% target), DO NOT write the CRUX file - inform user that file is already compact or compression is not beneficial for the configured level

Read the full file on GitHub · 361 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. 11d ago First seen · 361 lines · 40 tokens per session scan A 737f8a90ad1a

Subscribe to this mod's changes

crux-cursor-rule-manager is an agent published in the GitHub repository zotoio/CRUX-Compress (8 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 5,076 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-08-31.