Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/soliestre/estregenesis/before-compactnpx skills add SoliEstre/EstreGenesis --skill before-compactgit clone --depth 1 https://github.com/SoliEstre/EstreGenesisWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/soliestre/estregenesis/before-compact)<a href="https://agentmods.dev/skills/soliestre/estregenesis/before-compact"><img src="https://agentmods.dev/badge/skills/soliestre/estregenesis/before-compact.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00079 | $0.00808 |
| Opus 5 | $0.00039 | $0.00404 |
| Sonnet 5 | $0.00016 | $0.00162 |
| Haiku 4.5 | $0.00008 | $0.00081 |
Grade A, and why
before-compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/before-compact — compact-survival handoff materialization
Write the things that exist only in the current context — and nowhere on disk — into the compact-handoff file (default .agent/compact-handoff.md, or the path your HANDOFF_PATH hook env points at). The PreCompact hook snapshots the environment (git state) deterministically and the SessionStart(compact) hook re-injects the file; this skill owns the half no script can collect: what is in the model's head.
This mechanizes Constellation §13.16.6 element 6 (pre-large-work context materialization) and is what makes §13.21 (fresh-context defer is an anti-pattern) operative for the procedural layer.
Procedure
-
Codify recurring practices first (soft — only if Greatpractice is adopted). Before materializing session-specific state, invoke
/routinizeto mine this session's recurring work into durable practice captures. This timing is routinize's prime trigger: the accumulated context is the raw material and it is about to be compacted away, so cross-session durable practices should be captured before session-specific resume state. The two are complementary, not redundant — routinize captures what recurs across sessions (→memory/feedback_*.md), this skill captures what is in flight in this one (→ the handoff card). Skip if Greatpractice / the/routinizeskill is not in use. -
Scan for volatile details from this session:
- Procedure conventions: script call requirements (env vars, arguments, ordering), policies agreed this session that are not yet in memory/guides. (Observed failure class: a required env-var prefix on one script call lived only in-context, was dropped by a compaction summary, and the post-compact agent reverted to the script's default — misrouting messages until a human noticed.)
- In-flight cycle anchors: files touched so far + next step + the reasoning behind the current approach (if a track doc already holds this, record only the pointer).
- Unrecorded decisions: user decisions from this session not yet in a durable artifact.
- Active resources: background tasks / monitors / workflow run IDs + how to resume each.
-
Update the standing card — edit the handoff file's standing-card section:
- Update existing entries in place; append new ones; delete stale ones. Keep the card short (≤ ~15 entries) — the whole file re-enters context after every compaction, so length is a recurring tax.
- Never touch the auto-snapshot block (between the
AUTO-SNAPSHOTmarkers) — the PreCompact hook owns it.
-
Promote durables — entries that have become permanent discipline belong in memory files or guides; promote them there and shrink the card entry to a pointer.
-
Report + recommend — state what was recorded in 1-3 lines; if the user intended a manual compact, recommend running
/compactnow. (For auto-compact readiness, recording alone completes the skill.)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 31 lines · 79 tokens per session scan A 6ba2af766b67
before-compact is a skill published in the GitHub repository SoliEstre/EstreGenesis (8 stars, last pushed yesterday), licensed Apache-2.0. It adds 79 tokens to every session and 808 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
update-agent-context
This skill should be used to keep CLAUDE.md, AGENTS.md, and the skill files themselves compact, current, and internally consistent. It runs in three phases: Phase 1 performs a one-time structural refactor of CLAUDE.md using a Karpathy-inspired behavioral scaffold and derives AGENTS.md from it by stripping Claude…
watercooler-onboarding
Bootstrap Watercooler memory for a repository by inspecting local code, docs, CI, git history, and existing Watercooler threads, then writing a small set of durable, provenance-backed seed threads that future agents can query and extend. Use when entering a repo for the first time, seeding a repo with Watercooler…
recall
Recall project context or answer questions about history and decisions. Use before starting work, when investigating unfamiliar code, or asking "What was decided about X?" / "Why did we choose Y?".
wiki
Use this skill when querying workspace knowledge before tasks or running mandatory post-review ingest evaluation and conditional wiki ingestion. Self-learning loop for the workspace.
agent-v3-memory-specialist
Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.
agent-memory-coordinator
Agent skill for memory-coordinator - invoke with $agent-memory-coordinator.