agent-instruction-slimming
БесплатноЗапускает вложенные скриптыНе проверенReduce an agent instruction file (AGENTS.md, system prompt, rule file) without losing coverage: lever order (remove first, move second, reformat third…
от cengcengcai-creator221 установка в других каталогахОб этом скилле
Agent Instruction Slimming
Instruction files fail by accretion. The failure is not that a file is long; it is that each added rule makes every existing rule less likely to be followed. This skill reduces the rule surface while keeping coverage measurable.
Developed through agent operation and corrected against real failures, not hand-authored as a prompt template.
Applicability
Use for
- A rule file that has grown past the point where anyone tracks its clauses.
- Observed non-compliance that is being answered with “add another rule”.
- A planned restructure, before it happens — so the baseline exists.
Do not use for
- Writing new policy. This reduces and relocates; it does not invent rules.
- Proving that behaviour improved. Marker counts are structural proxies; behaviour needs a separate probe.
- Files with no explicit conditions to count (pure narrative docs).
Boundary
Required: the instruction file, and the ability to run a local script.
Optional: an event log or probe harness for behaviour comparison; a linter for cross-references.
Known limits:
- Marker counts measure conditional density, not compliance. Rewriting can raise the count while lowering clarity.
- Moving a rule out of the always-loaded file changes when it is available. If the rule is needed on every turn, moving it is a regression.
- Character count and line count are not comparable across encodings; measure characters, not bytes.
- No claim is made about model adherence without a before/after probe.
Lever order
Apply in this order. Stop when the file is small enough for its job; do not continue for its own sake.
| Lever | Evidence strength | Action |
|---|---|---|
| 1. Remove | strongest — clause count is the dominant variable | delete dead, duplicated, and superseded clauses |
| 2. Move | medium — reduces always-on load | relocate infrequent procedures to a skill or reference, leave a pointer |
| 3. Reformat | weak — presentation changes do not reliably improve adherence | do not do it for its own sake |
| 4. Rewrite | negative — rewording hides coverage loss | forbidden when producing a subset edition |
Completion criterion: before editing, state which lever you are applying and the clause count before/after.
Verbatim-subset rule
When relocating content, cut whole blocks and leave a pointer line. Do not paraphrase, merge sentences, or add emphasis.
Reason: a rewritten file can show more conditional markers than the original while covering less. The count then proves nothing.
Allowed changes to the kept text: none. Allowed new content: pointer lines and separators only.
Completion criterion: every non-pointer line in the slim file exists verbatim in the original. Verify with scripts/subset_check.py.
Joint accounting
Because a true subset moves markers with the moved blocks, a slim file alone will always look worse. Use two numbers together:
slim markers <= original markers— if it increased, the text was rewritten.slim markers + moved markers >= original markers— coverage was preserved, not deleted.
Report both, plus per-section counts so the difference can be attributed.
Completion criterion: both inequalities shown with numbers; any section that dropped is named and explained.
Tiering
Decide placement by three properties: frequency, reversibility, mechanizability.
| Tier | Test | Placement |
|---|---|---|
| 0 | mechanizable | script, tool policy, exit gate — the file only says “run X” |
| 1 | irreversible + frequent | inline, at the top, never moved |
| 2 | frequent + judgement | one line inline |
| 3 | infrequent procedure | skill file; inline keeps a trigger + pointer |
| 4 | evidence, numbers, history | notes; inline keeps the rule sentence |
Two hard constraints on moving:
- Anything needed on every turn stays inline.
- Capability lists (which channels/models exist) stay inline. Removing them causes silent degradation, not an error.
Completion criterion: every moved section has a trigger phrase and a pointer to a file that exists.
Procedure
- Freeze the baseline. Copy the original; measure lines, characters, markers with the same script you will use later.
- Classify every clause into: keep / merge into section X / move out / delete. One destination each.
- Apply the lever you chose. Cut whole blocks; add only pointer lines.
- Re-measure with the same script and the same pattern set.
- Attribute the difference per section, not just in total.
- Verify subset: every non-pointer line must match the original verbatim.
- Check references: pointer targets exist; section numbers still resolve.
Traps
- Scripted edits corrupt backticks. Template-string escaping can write ``` instead of a backtick, producing dead references. Run your linter after every batch.
- “Same keyword” is not “duplicate”. Most repeats are cross-references. Compare at clause level before deleting.
- **
Установить agent-instruction-slimming в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agent-instruction-slimming?
Reduce an agent instruction file (AGENTS.md, system prompt, rule file) without losing coverage: lever order (remove first, move second, reformat third, rewrite last), verbatim-subset edits with pointer lines, joint marker accounting, and tiering by frequency and reversibility. Use when a rule file has grown too large, when rules are being ignored, or before adding more rules. Tool-agnostic; includes marker counting and subset checking scripts.
Как установить скилл agent-instruction-slimming?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-instruction-slimming запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic