Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

text-optimize

БесплатноЗапускает вложенные скриптыНе проверен

Optimizes text, docs and LLM prompts (AGENTS.md, rules, agent/skill files) for token efficiency in place, snapshot-backed, without losing facts. Use when…

kochetkov-maот kochetkov-ma★ 41 звезда на GitHub

Об этом скилле

Optimize text for tokens

Compress the requested text while preserving every load-bearing constraint, identifier, example, and safety rule. Measure before and after size, explain material removals, and write only to the requested Codex-owned artifact path. Do not create Markdown agent definitions or unsupported agent calls.

Complete native workflow

Follow every phase below. When a phase delegates work, use Codex collaboration with only task_name and message; treat each "Codex delegation brief" block as role and message content, not executable syntax. Required approval: main presents a concrete, reviewable proposal in chat and waits for an actual user reply before dependent action. Existing authorization for the same scope remains valid; do not ask again. Optional clarification: use request_user_input_async only if exposed, or request_user_input only if available in the current runtime/mode, for optional choices and never approval. Otherwise ask in main chat. Delegated agents return unresolved questions to main. Silence, elapsed time and tool errors are not approval. Resolve <skill-directory>, <plugin-root>, <project-root>, and <arguments> before running commands.

Text & File Optimizer

Prompt contract

<arguments> is one free-form RU/EN prompt; depth flags and paths may sit anywhere in it. The depth flags are the Modes below.

  1. Mode: an explicit flag (-l, -s, -d, -x, --light, --standard, --deep, --max) wins without scoring; else the most distinct whole-word hits from Modes/Context Hints, ties use the earliest keyword. No hit -> medium before Smart Auto-Detection; empty -> medium or per-file auto-detection. Max is opt-in: explicit -x/--max or maximum/extreme compress hint only.
  2. Scope: take paths from the remaining prose; never treat sentence-first words as positional paths. Invoked implicitly mid-task, the invocation text is the prompt and names the target path(s): empty there stops with "no target", never the ALL set an empty user-typed prompt selects. --allow-dirty in the prompt is the explicit authorization Phase 0 needs for uncommitted targets.
  3. Ask: ambiguity -> ONE scoping main-chat user gate; unanswered or headless -> medium on the named targets only, nothing blocks.

Print once, after resolving mode/targets and before Phase 1 Analysis (labels literal, INPUT verbatim, authored values follow the active work-artifact language policy, otherwise conversation language). SCOPE MUST name resolved target paths and depth:

PLAN — brewtools:text-optimize
INPUT:  <arguments verbatim, or "(empty)">
MODE:   <resolved depth> — <explicit flag | matched keyword: X | auto-detected | default>
SCOPE:  <resolved target paths, resolved depth>
DO:     <2-5 imperative bullets>
RESULT: <what the user ends up holding>

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

Mode Flag / EN keywords RU keywords Target Compression Human-readable Verification Mutates?
Light -l, --light, light, quick clean лёгкая, лёгкий, почисти текст Any Minimal Yes Phase 3 sub-gate only yes
Medium (default), medium, balanced средняя, сбалансируй Any Moderate Yes Self-check (fact inventory) yes
Standard -s, --standard, compress, slim, tighten, safe compress, human readable стандарт, сожми, для людей Docs, README 30-50% Yes 1 round (>=98%) yes
Deep -d, --deep, compress for AGENTS.md, for context, for prompt, for LLM, deep compress, super compress, maximum глубокая, для контекста, максимально AGENTS.md, system prompts, agent/skill defs, KNOWLEDGE 2-3x No (LLM-only) 1-2 rounds (>=95%) yes
Max -x, --max, max compress, extreme, maximum density, atomic максимум, предельно, атомарно AGENTS.md, system prompts, KNOWLEDGE 3-4x No (LLM-only) 2 mandatory (>=95% + 100% sub-gate) yes

Loss Budget per Mode

Content essence is untouchable at light/medium/standard; small deliberate loss is allowed only at deep/max, explicitly reported. Dedup-merged facts count as preserved, never as loss. Every mode mutates in place: Phase 0 snapshot and Phase 3 sub-gate apply to all.

Mode Semantic match target Allowed loss
Light 100% None — wording cleanup only
Medium 100% None — restructure, zero fact loss (self-check)
Standard >= 98% None intended; verification patches any slip
Deep >= 95% + 100% sub-gate (numbers/names/negations/scope) Word-level drops (A.2, ledgered, gate-neutral) + generic known-facts (A.4, elided-known, consumes gate), listed in report
Max >= 95% + 100% sub-gate (numbers/names/negations/scope) Small, explicit, user-revi
Полный SKILL.md на GitHub

Установить text-optimize в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSEREADME.mdagents/openai.yamlreferences/deep-compression.mdreferences/max-compression.mdreferences/rules-review.mdreferences/standard-compression.mdscripts/test-optimize.shscripts/text-guard.sh

FAQ

Что делает скилл text-optimize?

Optimizes text, docs and LLM prompts (AGENTS.md, rules, agent/skill files) for token efficiency in place, snapshot-backed, without losing facts. Use when asked to optimize, compress or cut tokens of named files. Triggers - optimize, reduce tokens, compress, deep compress, сожми, оптимизируй.

Как установить скилл text-optimize?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл text-optimize запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить text-optimize с