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 3d 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.
- 3d ago Changed · +3 lines · +47 tokens per session 989e02018369
- 5d ago Changed · -92 lines f937836d0edf
- 17d ago Changed · -64 lines 02aff5643be3
- 1mo ago Changed · +3 lines 3075834bd420
- 1mo 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 (37 stars, last pushed yesterday), 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.
Other skills, from other repositories
fresh-start
Continue in a new chat without losing anything — writes a compact handoff to paste into a fresh conversation. Use whenever the user wants to move to a new chat or conversation, hits usage limits, says replies got slow or Claude forgets earlier details, or the conversation has grown long.
token-check
Estimate how many tokens a pasted text, an attached file or the conversation so far takes, what it means for the context window and usage limits, and how to cut it. Use when the user asks how big something is in tokens, why they keep hitting limits, or whether a file is too large to send.
doc-digest
Turn a long document, PDF, transcript, spreadsheet or log into a compact working digest the conversation can continue from. Use when the user shares or pastes something long (several pages or more) and wants to discuss, analyze, compare or use it over more than one message, or asks to summarize a document so they can…
sharpen-prompt
Rewrite a vague request into a precise prompt — goal, context, scope, constraints, what done looks like, output format. Use when the user asks to improve, rewrite, sharpen or check a prompt.
skill-creator-plus
Create, test, evaluate, and improve Claude skills — and answer questions about how skills work. Use for "create a skill", "make a skill for", "write a SKILL.md", "turn this into a skill", "run evals", "test/benchmark my skill", "optimize my skill description", "improve triggering", "A/B test my skill", "blind…
deep-research
Deep Research (/deep-research or /dr) — exhaustive, evidence-based investigation of any topic. Use when the user invokes /deep-research, /dr, asks for deep research, says 'research this thoroughly', wants expert-level analysis on any subject (technical, business, scientific, regulatory, financial, medical, legal…