text-optimizerlisted
Install: claude install-skill kochetkov-ma/claude-brewcode
> Plugin: [kochetkov-ma/claude-brewcode](https://github.com/kochetkov-ma/claude-brewcode)
## Text Optimizer
Reduces token count in prompts, docs, and agent instructions by **20–40%** without losing meaning.
Applies **41 research-backed rules** across 6 categories: Claude behavior, token efficiency, structure, reference integrity, perception, LLM comprehension.
**Benefits:** cheaper API calls · faster model responses · clearer LLM instructions · fewer hallucinations
**Examples:**
```bash
/text-optimize prompt.md # single file, medium mode (default)
/text-optimize -d agents/ # deep mode — all .md files in directory
```
> _Skill text is written for LLM consumption and optimized for token efficiency._
---
# Text & File Optimizer
## Step 0: Load Rules
> **REQUIRED:** Read `references/rules-review.md` before ANY optimization.
> If file not found -> ERROR + STOP. Do not proceed without rules reference.
## Modes
Parse `$ARGUMENTS`: `-l`/`--light` | `-d`/`--deep` | no flag -> medium (default).
| Mode | Flag | Scope |
|------|------|-------|
| Light | `-l`, `--light` | Text cleanup only — structure, lists, flow untouched |
| Medium | _(default)_ | Balanced restructuring — all standard transformations |
| Deep | `-d`, `--deep` | Max density — rephrase, merge, compress aggressively |
## Rule ID Quick Reference
| Category | Rule IDs | Scope |
|----------|----------|-------|
| Claude behavior | C.1-C.6 | Literal following, avoid "think", positive framing, mat