← ClaudeAtlas

brewtoolstext-optimizelisted

Optimizes text/docs for LLM token efficiency. Triggers - optimize, reduce tokens, compress, deep compress.
kochetkov-ma/claude-brewcode · ★ 27 · AI & Automation · score 77
Install: claude install-skill kochetkov-ma/claude-brewcode
# 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` | `-s`/`--standard` | `-d`/`--deep` | `-x`/`--max` | no flag -> medium (default) or auto-detect. | Mode | Flag | Target | Compression | Human-readable | Verification | |------|------|--------|-------------|----------------|--------------| | Light | `-l`, `--light` | Any | Minimal | Yes | None | | Medium | _(default)_ | Any | Moderate | Yes | None | | Standard | `-s`, `--standard` | Docs, README | 30-50% | Yes | 1 round | | Deep | `-d`, `--deep` | CLAUDE.md, system prompts, agent/skill defs, KNOWLEDGE | 2-3x | No (LLM-only) | 1-2 rounds | | Max | `-x`, `--max` | CLAUDE.md, system prompts, KNOWLEDGE | 3-4x | No (LLM-only) | 2 (mandatory) | ## Smart Auto-Detection When no flag provided AND input suggests compression (not just optimization): 1. Parse file path + content header 2. Classify: - LLM-only files (`CLAUDE.md`, `.claude/rules/*.md`, `.claude/agents/*.md`, `.claude/skills/**/SKILL.md`, `KNOWLEDGE.*`, system prompts) → deep candidate - `README.md`, `docs/`, API references, user-facing docs → standard candidate - Unknown / mixed → ask user via AskUserQuestion 3. If confident → tell user: "Selected mode: {mode} for {file} because {reason}" 4. If ambiguous → AskUserQuestion with mode options 5. User can override via flags