Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kochetkov-ma/claude-brewcode --skill text-optimizegit clone --depth 1 https://github.com/kochetkov-ma/claude-brewcodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/text-optimize)<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/text-optimize"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/text-optimize/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/text-optimize"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/text-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.05990 |
| Opus 5.5 | $0.00030 | $0.02396 |
| Sonnet 5.5 | $0.00015 | $0.01198 |
| Haiku 4.5 | $0.00007 | $0.00599 |
Grade A, and why
text-optimize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 329 lines — stays where its author put it; the contents beside it link to each section on 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.
- 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 ->mediumbefore Smart Auto-Detection; empty ->mediumor per-file auto-detection. Max is opt-in: explicit-x/--maxor maximum/extreme compress hint only. - 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-dirtyin the prompt is the explicit authorization Phase 0 needs for uncommitted targets. - Ask: ambiguity -> ONE scoping
main-chat user gate; unanswered or headless ->mediumon the named targets only, nothing blocks.
What ships with it
18 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 237 B
- LICENSE 1.1 KB
- README.md 2.3 KB
- references/deep-compression.md 10 KB
- references/max-compression.md 7.1 KB
- references/rules-review.md 21 KB
- references/standard-compression.md 6.4 KB
- scripts/test-optimize.sh 5.6 KB runs code
- scripts/text-guard.sh 11 KB runs code
- tests/fixture-rules-lossless.md 252 B
- tests/fixture-rules-lossy.md 307 B
- tests/fixture-rules.md 396 B
- tests/input-agents-md.md 7.9 KB
- tests/input-prose.md 5.4 KB
- tests/input-readme.md 6.5 KB
- tests/run.sh 3.0 KB runs code
- tests/suite-guard.mjs 19 KB runs code
- tests/suite-policy.mjs 1.6 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +3 lines · +47 tokens per session 989e02018369
- 1mo ago Changed · -92 lines f937836d0edf
- 2mo ago Changed · -64 lines 02aff5643be3
- 2mo ago Changed · +3 lines 3075834bd420
- 3mo ago First seen · 479 lines · 27 tokens per session scan A 4e759df922a1
text-optimize is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (41 stars, last pushed 2d ago), licensed MIT. It adds 74 tokens to every session and 5,990 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
text-optimize compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| text-optimizekochetkov-ma/claude-brewcode | Skill | 41 | 2d ago | MIT | A | 74 | Codex |
| doc-digestegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 75 | Claude Code |
| token-checkegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 66 | Claude Code |
| sharpen-promptegorfedorov/claude-context-optimizer | Skill | 139 | yesterday | MIT | A | 47 | Claude Code |
| skill-creator-plusyaniv-golan/skill-creator-plus | Skill | 8 | 20d ago | MIT | A | 147 | Claude Code |
| cpp-reinforcement-learningAznatkoiny/zAI-Skills | Skill | 10 | 24d ago | MIT | A | 131 | Claude Code |
| deep-researchyachi/claude-skills | Skill | 3 | 1mo ago | MIT | A | 164 | Claude Code |