CLAUDE.md@.claude/hooks/PreCompactA
CLAUDE.md@.claude/hooks/PreCompact from rjmurillo/ai-agents is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.
mdr add rjmurillo/ai-agents/.claude/hooks/PreCompact/CLAUDE.md@git:20260529.50f1eefPins git:20260529.50f1eef in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- CLAUDE.md file
- Repository
- rjmurillo/ai-agents
- Path
.claude/hooks/PreCompact/CLAUDE.md- Versions recorded
- 2
- Latest version
- git:20260529.50f1eef, committed May 29, 2026
- First version recorded
- May 25, 2026
- Size
- 1,099 bytes
- Repository stars
- 48
- License
- MIT
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# PreCompact Hooks Hooks in this directory run before Claude Code compacts the conversation context. ## invoke_compact_checkpoint.py Snapshots work-in-progress state before context is lost to compaction. **Captures**: Session log path, open TODO items, current branch, resume context. **Output**: Resume context string printed to stdout (injected into post-compaction context). **Exit Codes**: Always 0 (fail-open, never blocks compaction). **Bypass**: - Skips with exit 0 when `skip_if_consumer_repo()` returns true (the downstream `ai-agents` install bundles this hook but consumer repos that vendor the install do not need to checkpoint our internal state). - On checkpoint write failure (full disk, read-only mount, permission error), logs a `[WARNING]` to stderr and continues. Resume context is still printed to stdout for the post-compaction session. - On any unhandled exception, logs a `[WARNING]` to stderr and exits 0 (fail-open; never blocks compaction). ## References - Issue #1703 (lifecycle hook infrastructure) - ADR-008 (protocol automation via lifecycle hooks)
Read the whole file at its exact version.
How to install
mdr add rjmurillo/ai-agents/.claude/hooks/PreCompact/CLAUDE.md@sha256:d16e789fbb588b29The line at the top of this page pins the label git:20260529.50f1eef, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_zs7vl27svhpjboow)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between May 25, 2026 and May 29, 2026, about one every 4 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260529.50f1eef latest | 2026-05-29 | 50f1eef | 1,099 B | A | view · diff |
| git:20260525.26d917e | 2026-05-25 | 26d917e | 761 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (1099 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
rjmurillo/ai-agents · 48 stars · license MIT · pushed 2026-10-20 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_zs7vl27svhpjboow GET https://markdownregistry.com/api/v1/resolve?ref=rjmurillo/ai-agents/.claude/hooks/PreCompact/CLAUDE.md GET https://markdownregistry.com/api/v1/blob/d16e789fbb588b2965c5ea1956fcbdd050510fce8dac8e6f488a670c02001afe
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.