Agent skill · kochetkov-ma
context-slim
Compresses everything that permanently enters the LLM context - project and global CLAUDE.md, rules, agent descriptions, hook text, memory - by cross-layer dedup, default-knowledge removal and deep per-file compression. Triggers - slim context, compress context, dedupe rules, сожми контекст, ужми правила.
What it needs
About 13k tokens when loaded.
What this skill does
Context Slim Cuts the token weight of the permanent context surface with three levers — cross-layer dedup, default-knowledge removal, deep per-file compression. Every exact value, key, path, pin and non-default instruction survives byte-exact or the whole run is rolled back and reported FAILED. Orchestration ONLY: every decision rule lives in references/, read at the phase that needs it. Prompt contract Position 1 of $ARGUMENTS is a free-form prompt (RU/EN) — modes and flags are optional and may follow in any order. Nobody types keys: resolve mode + scope FROM the prompt. 1. Strip flags (--target=N%, --global, --memory, --noask). An explicit mode token anywhere wins outright, no scoring. 2. Else score modes by distinct whole-word keyword hits (table below). Highest unique score wins. Tie with a destructive mode -> AskUserQuestion; tie with measure -> measure; tie of two mutating modes -> the keyword appearing first; all zero -> measure. 3. Empty arguments -> measure. A read-only run asks nothing. 4. Outcome-changing ambiguity -> ONE AskUserQuestion (max 4 questions) BEFORE any work, and only when the answer changes what gets written. 5. Prose that is not a mode/path is still input: extract the target, the ratio and the layer from it (сожми контекст на 40%, глобальный тоже -> mode slim, --target=40%, --global). Then print this block ONCE, before the first action: Labels are literal; values follow the conversation language. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills kochetkov-ma/context-slim