Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/event4u-app/agent-confignpx agentmods add skills/event4u-app/agent-config/condense-memoryWrote 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/event4u-app/agent-config/condense-memory)<a href="https://agentmods.dev/skills/event4u-app/agent-config/condense-memory"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/condense-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/event4u-app/agent-config/condense-memory"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/condense-memory.svg" alt="Reviewed on agentmods" width="80" 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.00051 | $0.02849 |
| Opus 5.5 | $0.00020 | $0.01140 |
| Sonnet 5.5 | $0.00010 | $0.00570 |
| Haiku 4.5 | $0.00005 | $0.00285 |
Grade C, and why
condense-memory scanned grade C with 1 finding 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 1mo 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- Condense a path matching the sensitive-file denylist (`.env*`, `.netrc`, `credentials*`, `secrets*`, `id_rsa*`, `*.pem|key|p12|pfx|crt|cer|jks`, `.ssh/*`) — the script refuses with `SensitivePathError` and so should yo How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
condense-memory
Experimental. Output-side telegraph dialect did not meet the kill-criterion in
telegraph-v1(vs_tersemedian −9.27 %). Input-side memory condensation is an orthogonal use case: the savings target the always-loaded memory budget, not the reply stream. Treat ship-criterion as per-target measurement, not the v1 verdict.
When to use
Use when:
- An always-loaded memory file (
AGENTS.md,CLAUDE.md,.cursorrules,GEMINI.md,.windsurfrules) is close to or above the host tool's char budget and the maintainer wants to recover input-token headroom. - A consumer-shipped
templates/AGENTS.mdis failing theagents-md-thin-rootcap and the pointer-extraction options are exhausted. - The maintainer asks to "condense this memory file" or "shrink AGENTS.md" or names input-side telegraph.
Do NOT
- Condense a reply, commit message, PR body, ticket summary, or any deliverable written for a human reader — those are carve-outs in
telegraph-speak § Carve-outsand stay verbatim. - Condense a path matching the sensitive-file denylist (
.env*,.netrc,credentials*,secrets*,id_rsa*,*.pem|key|p12|pfx|crt|cer|jks,.ssh/*) — the script refuses withSensitivePathErrorand so should you. - Condense a generated file (
dist/agent-src/,.augment/,.claude/,.cursor/,.clinerules/,.windsurfrules) — edit the source insrc/and regenerate via the package's sync + generate-tools scripts (scripts/condense.sh --sync+scripts/condense.ts --generate-tools). - Hand-edit a condensed memory file in place — run
--decondensefirst; the next condense pass refuses on body-hash drift (CondensationRefused). - Commit the condensed file without committing the matching
.original.mdbackup — round-trip breaks otherwise.
Procedure
- Analyse the target first. Before any write, inspect the target with
vieworwc -lto confirm it is an always-loaded memory file (AGENTS.md,CLAUDE.md,.cursorrules,GEMINI.md,.windsurfrules), is not generated, and has prose paragraphs to condense (a pointer-only Thin-Root file may net near-zero). Skip the rest of the procedure if any check fails. - Check denylist gate. Run
./scripts-run src/scripts/condense_memory <path> --check— exit 0 = safe; exit 2 = denylist hit, stop and surface the refusal. - Record baseline.
wc -c <path>— capture pre-condensation char count for the commit message. - Condense.
./scripts-run src/scripts/condense_memory <path>. The script writes<path>.original.md(verbatim backup) and rewrites<path>withoriginal_sha256:+condensed_at:frontmatter. - Inspect the diff. Eyeball every Iron-Law fence, numbered-options block, code fence, backtick span,
❌/⚠️/✅line, and frontmatter pair — all must be byte-identical. Body prose may have lost articles (the/a/an) and auxiliaries (is/are/was/be/that/which). - Validate idempotency. Re-run
./scripts-run src/scripts/condense_memory <path>— clean re-run is a no-op (body hash matches). Non-zero exit = stop, escalate. - Commit both files together.
<path>and<path>.original.mdship as a pair. The backup is the rollback path; never commit one without the other. - Rollback path. If readability fails review at step 5:
./scripts-run src/scripts/condense_memory <path> --decondenserestores the backup and deletes.original.md.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago Changed ba0add02c439
- 3mo ago First seen · 130 lines · 51 tokens per session scan C 4572c991ed39
condense-memory is a skill published in the GitHub repository event4u-app/agent-config (20 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 2,849 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
condense-memory compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| condense-memoryevent4u-app/agent-config | Skill | 20 | today | MIT | C | 51 | Claude Code, Codex |
| save-progressKimYx0207/Meta_Kim | Skill | 292 | 3d ago | Apache-2.0 | A | 65 | Claude Code |
| memory-intakenhadaututtheky/neural-memory | Skill | 246 | 4d ago | MIT | A | 44 | Claude Code |
| ijfw-handoffFerroxLabs/ijfw | Skill | 215 | 4d ago | MIT | A | 23 | Claude Code |
| marketing-braincognyai/claude-code-marketing-skills | Skill | 120 | yesterday | MIT | A | 72 | Claude Code |
| lov-search-chatlovstudio/skills | Skill | 72 | today | MIT | A | 53 | Claude Code |
| initgrpcer/ownmem | Skill | 428 | 1mo ago | Apache-2.0 | A | 43 | Claude Code |