context-hygiene
Archive and trim ACTIVE_PRIORITIES and dated SESSION_LOG entries. Use when cleaning active priorities, trimming session logs, or running context hygiene.
от wrg32786★ 26 звёзд на GitHub
Установить context-hygiene в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/context-hygiene
This is the sole bounded compaction exception to the Session Log chronicle. It runs only when invoked, never while the framework is being installed or tested against a real vault.
Precondition
- Read
vault/memory/SESSION_LOG.mdandvault/memory/ACTIVE_PRIORITIES.md. - Hash both exact byte streams with SHA-256.
- Run:
node daemons/nightly-context-hygiene.mjs --root <aigent-root>
Green means no edit is needed. Red permits only the bounded archive below. Unreadable or unfamiliar content is a failure, not permission to rewrite.
Session Log archive
Live entries appear newest first by date. A capsule entry is one line in the
form - YYYY-MM-DD capsule-id: summary. The date must be a real calendar
date. The capsule id and its optional preceding short name are each one token
without whitespace. The summary must have text on the same line.
Capsule lines go above the dated blocks, and a dated line inside a block is part of that block.
The checker treats frontmatter as ordinary text, so keep lines starting with a dash and a date or with ## and a date out of it, and keep fence markers balanced.
A dated H2 block starts with ## YYYY-MM-DD - title and contains one
nonempty occurrence of each bold field listed below.
ObjectiveCompletedDecisionsOpen threadsNext action
Archival rules:
- Keep the newest five entries across both formats.
- Move older entries as whole lines or whole blocks to
vault/memory/SESSION_LOG_ARCHIVE_<YYYY-MM-DD>.md. - Preserve source text and order.
- Preserve frontmatter, title, schema guidance, and archive links.
- Dedupe one-line entries by exact line and blocks by exact dated heading plus block hash.
- Refuse a block whose boundary cannot be determined without judgment.
Active Priorities archive
The mechanically checkable live shape contains:
- exactly one
## Operating Mode: <mode>heading; - one to five live bullet priorities under
## Tier 1,## Tier 2, or## Tier 3headings; - no placeholder priority;
- one valid
Last reviewed: YYYY-MM-DDline; and - no embedded
## Archivedsection.
Move only content explicitly marked stale, superseded, or archived to
vault/memory/ACTIVE_PRIORITIES_ARCHIVE_<YYYY-MM-DD>.md. If removal requires a
human decision, preserve it and report the gate.
Compare-and-swap
Immediately before each write, hash the live source again. If either hash
differs from the precondition hash, abort with CONTEXT_HYGIENE_RACE. Archive
must be durable before the source is trimmed.
After writing, re-run the checker. Only its literal
CONTEXT_HYGIENE PASS receipt may record the checkpoint green. Return archive
paths and before/after hashes in bounded detail. Never touch another memory
file.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Write - 03
Bash
FAQ
Что делает скилл context-hygiene?
Archive and trim ACTIVE_PRIORITIES and dated SESSION_LOG entries. Use when cleaning active priorities, trimming session logs, or running context hygiene.
Как установить скилл context-hygiene?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл context-hygiene запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet 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…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…