← ClaudeAtlas

compress-contextlisted

Compress a given file (CLAUDE.md, skill file, prompt file) into token-efficient symbolic notation. Rewrites the file in-place and maintains a symbols.md legend. Use when asked to compress, reduce tokens, shorten prompts, or make context more efficient.
rs2pydev/claude-skills · ★ 0 · AI & Automation · score 75
Install: claude install-skill rs2pydev/claude-skills
# compress-context Compress a natural language file into token-efficient symbolic notation. Rewrites the file in-place and generates/updates a `symbols.md` legend alongside it. ## Instructions You are compressing the file at `$ARGUMENTS` using the symbolic notation system below. The goal is to reduce input token count by 30-50% while maintaining full semantic clarity for LLMs. ### Step 1: Read the Target File Read the file provided as the argument. Identify which sections are: - Natural language prose (COMPRESS THESE) - Code blocks (NEVER COMPRESS) - File paths, function names, identifiers (KEEP LITERAL) - Headings and structural markers (KEEP AS-IS) ### Step 2: Apply Compression Rules Transform natural language using these rules, in order: #### Phase A: Remove Filler Delete words that carry zero semantic weight: - please, just, simply, basically, actually - "go ahead and", "be sure to", "I would like you to" - "in order to" -> "to" - "due to the fact that" -> "because" - "it is important to note that" -> "note:" #### Phase B: Structural Transformations | NLP Pattern | Symbolic Form | |-------------|--------------| | "make sure that X" / "ensure that X" | `ensure: X` | | "do not X" / "never X" / "must not X" | `x X` | | "if X then Y" / "when X, do Y" | `X? -> Y` | | "for each X in Y, check Z" | `* X @ Y: Z` | | "X should be at least N" | `X >= N` | | "X should be at most N" | `X <= N` | | "set X to Y" / "configure X as Y" | `X = Y` | | "X reads from Y" / "X gets va