context-hygiene
Skill19 starsChanged 4 months agoMITView on GitHub
Nightly context trim for ACTIVE_PRIORITIES and the dated SESSION_LOG schema. Archives before removal, uses content-hash compare-and-swap, and refuses unknown shapes.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- getcargohq/cargo-manifesttheir own version, first seen Sep 1, 2026
- Leostruka/devin-bundletheir own version, first seen Aug 15, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- getcargohq/cargo-manifest★ 10same name
- Leostruka/devin-bundle★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository72 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-fitnessSkill
- body-checkSkill
- briefSkill
- Caddy AuditSkill
- caddy-enrollSkill
- Caddy ExplainSkill
- caddy-muteSkill
- capsule-compactSkill
- closeSkill
- codex-adapterSkill
- cognitive-updateSkill
- comms-summarizeSkill
- compact-noteSkill
- context-capsuleSkill
- critique-planSkill
- decideSkill
- deep-reconSkill
- DiagnoseSkill
- digestSkill
- dreamSkill
- EnvelopeSkill
- find-weaknessSkill
- First 10 MovesSkill
- first-winSkill
- frontend-slidesSkill
- Honesty CheckSkill
- humanize-docsSkill
- impeccableSkill
- learn-from-failureSkill
- LearnSkill
- meta-improveSkill
- meta-improve-vaultSkill
- nightly-close-paritySkill
- nightly-ledger-captureSkill
- nightlySkill
- openSkill
- operator-setupSkill
- orientSkill
- pauseSkill
- ponytailSkill
- port-specSkill
- PromoteSkill
- reconcileSkill
- research-deepSkill
- resumeSkill
- Sandbox RoutingSkill
- scout-vaultSkill
- Self-ReviewSkill
- semantic-searchSkill
- setupSkill
- ship-adapterSkill
- Skill AuditSkill
- skill-huntSkill
- skill-recallSkill
- solution-huntSkill
- sprite-specSkill
- startSkill
- statusSkill
- StuckSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Keep the newest five live dated blocks.
- Very specific: line 66
no embedded ## Archived section.
- Very specific: line 78
After writing, re-run the checker.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/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
The executable target schema uses newest-first dated H2 blocks. A canonical
block starts with ## YYYY-MM-DD - title and contains one nonempty occurrence
of each field:
ObjectiveCompletedDecisionsOpen threadsNext action
Archival rules:
- Keep the newest five live dated blocks.
- Move older 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 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

