crux-utils
Skill8 starsChanged 2 months agoMITView on GitHub
Multi-purpose utility for CRUX compression workflows. Provides token estimation and checksum calculation. Use when estimating tokens for compression, comparing file sizes, or getting checksums for sourceChecksum tracking.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/crux-memories-integration.crux.mdcCursor rule
- .cursor/rules/crux-memories-integration.mdCursor rule
- .cursor/rules/_CRUX-RULE.mdcCursor rule
- .cursor/rules/docs-sync.crux.mdCursor rule
- .cursor/rules/docs-sync.crux.mdcCursor rule
- .cursor/rules/docs-sync.mdCursor rule
- .cursor/rules/example/coding-standards-demo.crux.mdcCursor rule
- .cursor/rules/example/coding-standards-demo.mdCursor rule
- .cursor/rules/ignore-example-rules.crux.mdCursor rule
- .cursor/rules/ignore-example-rules.crux.mdcCursor rule
- .cursor/rules/ignore-example-rules.mdCursor rule
- .cursor/rules/skill-and-agent-references.mdcCursor rule
- .cursor/rules/spec-agent-allocation.crux.mdCursor rule
- .cursor/rules/spec-agent-allocation.crux.mdcCursor rule
- .cursor/rules/spec-agent-allocation.mdCursor rule
- .cursor/rules/spec-implementation-hygiene.mdcCursor rule
- .cursor/rules/version-bump.crux.mdCursor rule
- .cursor/rules/version-bump.crux.mdcCursor rule
- .cursor/rules/version-bump.mdCursor rule
- .cursor/rules/zip-contents-protection.crux.mdCursor rule
- .cursor/rules/zip-contents-protection.crux.mdcCursor rule
- .cursor/rules/zip-contents-protection.mdCursor rule
- crux-skill-memory-compressSkill
- crux-skill-memory-crudSkill
- crux-skill-memory-extractSkill
- crux-skill-memory-indexSkill
- crux-skill-memory-meditation-coordinationSkill
- crux-skill-memory-meditation-ensembleSkill
- crux-skill-memory-meditation-quickSkill
- crux-skill-memory-meditation-reportSkill
- crux-skill-memory-meditation-researchSkill
- crux-skill-memory-meditation-reviewSkill
- crux-skill-memory-rebalanceSkill
- crux-skill-memory-reference-trackerSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 109
After compression: --token-count <crux> → use for afterTokens
- Very specific: line 110
Verify ratio: --token-count --ratio <source> <crux> → check Target (≤25%)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CRUX Utils
Multi-purpose utility for CRUX compression workflows. Provides deterministic tools for token estimation and checksum calculation.
Quick Start
# Token count estimation
python3 .cursor/skills/crux/crux-utils/scripts/crux-utils.py --token-count <file>
# Compare source vs CRUX (ratio mode, default target 25%)
python3 .cursor/skills/crux/crux-utils/scripts/crux-utils.py --token-count --ratio <source> <crux>
# Compare with custom target (e.g. 40%)
python3 .cursor/skills/crux/crux-utils/scripts/crux-utils.py --token-count --ratio <source> <crux> --target 40
# Get checksum for sourceChecksum frontmatter
python3 .cursor/skills/crux/crux-utils/scripts/crux-utils.py --cksum <file>Modes
--token-count <file>
Estimate token count for a single file.
Output:
=== Token Estimate: example.md ===
Prose tokens: 397
Code tokens: 0
Special tokens: 0
---
TOTAL TOKENS: 397--token-count --ratio <source> <crux> [--target <n>]
Compare source file vs CRUX file and calculate compression ratio.
The --target option sets the compression target percentage (1-100). Defaults to 25 if omitted, matching the CRUX spec's recommended target for text/code content.
Output:
=== Compression Ratio Analysis ===
=== Token Estimate: source.md ===
...
=== Token Estimate: source.crux.md ===
...
=== Compression Summary ===
Source tokens: 397
CRUX tokens: 140
Ratio: 35.2% of original
Reduction: 64.8%
Target (≤25%): NO--cksum <file>
Get checksum of a file, formatted for CRUX frontmatter sourceChecksum field.
Output:
=== Checksum: example.md ===
Checksum: 1234567890
---
FRONTMATTER: "1234567890"Token Estimation Method
| Content Type | Chars/Token | Notes |
| Prose (markdown) | 4.0 | English text, headers, lists |
| Code blocks | 3.5 | More symbols, shorter identifiers |
| Special chars | 1.0 | CRUX Unicode symbols |
Special Characters (1 token each)
CRUX delimiters and symbols that count as 1 token each:
- Delimiters:
« » ⟨ ⟩ - Arrows/flow:
→ ← ≻ ≺ - Logic:
⊤ ⊥ ∀ ∃ ¬ ∋ - Relations:
⊳ ⊲ - Comparison:
≥ ≤ ≠ - Blocks:
Δ Ρ Λ Π Κ Γ Φ Ω - Other:
⊛ ◊ θ
Determinism Guarantee
Both modes produce identical output for identical input:
- No random elements
- No timestamp dependencies
- Pure character/pattern counting
- Consistent across runs
Usage in CRUX Workflow
For compression tasks:
- Get source checksum:
--cksum <source>→ use FRONTMATTER value forsourceChecksum - Estimate source tokens:
--token-count <source>→ use forbeforeTokens - After compression:
--token-count <crux>→ use forafterTokens - Verify ratio:
--token-count --ratio <source> <crux>→ check Target (≤25%)- For custom targets:
--token-count --ratio <source> <crux> --target 40
- For custom targets:
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

