From compress
Compress agent/skill definitions using math/logic notation. Triggers: "compress" | "compress skill" | "compress agent" | "compress context" | "shorten this" | "make it formal" | "use formal notation" | "make this more compact" | "compress this".
npx claudepluginhub roxabi/roxabi-plugins --plugin compressThis skill is limited to using the following tools:
Formal notation rewrite — reduce tokens, preserve semantics.
Compresses agent instructions, specs, plans, prompts, and skill files by removing redundancy while preserving behavior, constraints, and clarity. Use before delegating to agents.
Compresses prompts and skills into minimal goal-focused instructions by dropping redundant details, trusting model capabilities, and maximizing action space. Use to condense or minimize prompts.
Optimizes AI-facing instructions for subagents, CLAUDE.md, rules, skills, agents by removing discoverable data, explained knowledge, invented constraints, stale facts. Use for authoring or auditing bloat.
Share bugs, ideas, or general feedback.
Formal notation rewrite — reduce tokens, preserve semantics.
/compress code-review → .claude/skills/code-review/SKILL.md
/compress fixer → .claude/agents/fixer.md
/compress file.md → direct path
∀ all | ∃/∄ exists | ∈/∉ member | ∧/∨ and/or | ¬ not | → then | ⟺ iff | ∅ empty | ∩/∪ intersect/union | ⊂ subset | ∥ parallel | |X| count | :=/← assign | { } scoped block | ; sequence | () params | ↦ maps to
1 — Resolve: Parse $ARGUMENTS: *.md → direct | agent name → .claude/agents/<name>.md | skill name → .claude/skills/<name>/SKILL.md | ∅ → → DP(B) file ∃ → read. ∄ → halt.
2 — Analyze: Read target. Identify: repeated nouns (≥3×) | verbose conditionals | iteration prose | magic numbers | redundant examples | filler. L_before := line count (excl. frontmatter).
3 — Transform (R1–R10):
Let: block (after title). Lowercase, mnemonic. Template:
Let:
φ := set of all findings
γ(f) ∈ [0,100] ∩ ℤ — confidence
τ := 80 — threshold
pred(x) ⟺ A ∧ B ∧ C∀ x ∈ Y: | "if any" → ∃ x: | "exists" → X ∃ →X → YO_name { step₁; step₂; … } → outputF(x, y)¬compress: frontmatter | code blocks | $ARGUMENTS | file paths | tool names | safety rules | table structure
4 — Present: Show L_before → L_after (N%) + substitutions. → DP(A) Yes | Preview | Adjust. Preview → show, re-ask. Adjust → apply, re-present.
5 — Write: Write file. Verify: frontmatter ∧ $ARGUMENTS ∧ safety rules ∧ ¬semantic loss. Report L + %.
| Scenario | Behavior |
|---|---|
| Already formal | "already compressed", tweaks only |
| L < 30 | Warn, proceed if confirmed |
| Agent (¬skill) | Preserve agent frontmatter |
| No repeated concepts | Skip R1, apply R2–R10 |
| User rejects | Halt |
| Mixed prose + code | Prose only |
$ARGUMENTS for skills$ARGUMENTS