agentsclimarketplace

Strategic compact

Skill the-hugin/RSIm/skills/strategic-compact

Recursively Self-Improving Module — persistent memory + structured improvement loop for Claude Code

Install
npx -y skills add the-hugin/RSIm --skill strategic-compact

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Manages context in long sessions by suggesting /compact at logical task boundaries — after research phases, debugging, or phase transitions. Prevents losing critical context mid-implementation.

SKILL.md

3.2 KB, 706 tokens by cl100k_base, as published. Nobody here has run it

Strategic Compact

Guide for strategic /compact at logical boundaries — not arbitrary auto-compaction.

Проблема

Авто-компакт срабатывает непредсказуемо, часто посреди реализации — теряются имена переменных, пути к файлам, промежуточный контекст, критичный для продолжения работы.

Когда компактить (YES)

МоментПричина
После фазы исследования, перед написанием кодаЧерновики анализа не нужны
После решения сложного багаОтладочный контекст исчерпал себя
После завершения фазы плана (research→planning, planning→implementation)Чистый старт новой фазы
Перед началом нового независимого подзаданияСвежий контекст важнее старого

Когда НЕ компактить (NO)

  • Посреди реализации (потеряются имена переменных, содержимое файлов)
  • В процессе отладки связанных компонентов
  • При работе с несколькими взаимосвязанными файлами одновременно

Перед компактом — сохрани контекст

НЕ переживёт компакт (сохрани явно):

  • Пути к файлам и ключевые символы → запиши в CLAUDE.md или plan.md
  • Состояние задачи → отметь прогресс - [x] в plan.md
  • Принятые решения → добавь в LOG раздел CLAUDE.md

Переживает автоматически:

  • Инструкции CLAUDE.md
  • Список задач plan.md
  • Файлы памяти ~/.claude/memory/
  • Состояние git

Компакт с контекстом

Используй кастомное сообщение вместо пустого /compact:

/compact Следующий шаг: реализовать [конкретный шаг]. Ключевые файлы: [пути]. Переменные: [имена].

Пороговая эвристика

Предлагай компакт после:

  • ~50 Edit/Write операций в сессии
  • Заметного замедления ответов
  • Завершения каждой фазы в plan.md
  • Переключения на принципиально другую задачу

Gives 1 of the 12 instructions most roadmap strategy skills give in 706 tokens

Counted across 591 of the 672 authors here whose files we hold, read 2026-08-06

  • read product marketing context before asking questionsin 21 of 591, across 10 files
  • base price on perceived value, not costin 15 of 591, across 4 files
  • compact after finalizing a planhere, and in 14 of 591, across 9 files
  • differentiate tiers using features, limits, or supportin 14 of 591, across 3 files
  • use Van Westendorp to find acceptable price rangein 13 of 591, across 2 files
  • use MaxDiff to identify highly valued featuresin 13 of 591, across 2 files
  • map topics to buyer journey stagesin 12 of 591, across 6 files
  • Extract domain capabilities and classify subdomainsin 11 of 591, across 1 file
  • Define bounded contexts around consistency and ownershipin 11 of 591, across 1 file
  • Establish a ubiquitous language glossary and anti-termsin 11 of 591, across 1 file
  • Capture context boundaries in ADRs before implementationin 11 of 591, across 1 file
  • Open the strategic design template if neededin 11 of 591, across 1 file

Said here and by no other author read

  • compact after research phases before writing code
  • compact after solving a complex bug
  • compact before starting an independent subtask
  • save file paths and key symbols to markdown before compaction
  • mark task progress in plan before compaction
  • add accepted decisions to memory before compaction

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.