condense-memory

condense-memory is a skill for Claude Code, Codex from event4u-app/agent-config. It costs 51 tokens per session (2,849 once invoked), scanned C, original, MIT.

A method for shortening always-loaded agent instruction files such as AGENTS.md, CLAUDE.md, or .cursorrules.

In plain words
What is it for?
Use it when these memory files are too long or approach the host tool's character limit.
Why use it?
It helps reduce the amount of project guidance loaded into every task while preserving the original file for recovery.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Gemini CLI.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Experimental.** Output-side telegraph dialect did not meet the kill-criterion in [`telegraph-v1`](../../../internal/bench/reports/telegraph-v1.md) (`vs_terse`.

Good fit Use it when these memory files are too long or approach the host tool's character limit.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config
agentmods
npx agentmods add skills/event4u-app/agent-config/condense-memory

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for condense-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/event4u-app/agent-config/condense-memory/github.svg)](https://agentmods.dev/skills/event4u-app/agent-config/condense-memory)
Your own site
<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.

agentmods 80×15 button for condense-memory

Your own site · 80×15
<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>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,849 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash ba0add02c439, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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
src/skills/condense-memory/SKILL.md · 130 lines

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_terse median −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.md is failing the agents-md-thin-root cap 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-outs and 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 with SensitivePathError and so should you.
  • Condense a generated file (dist/agent-src/, .augment/, .claude/, .cursor/, .clinerules/, .windsurfrules) — edit the source in src/ 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 --decondense first; the next condense pass refuses on body-hash drift (CondensationRefused).
  • Commit the condensed file without committing the matching .original.md backup — round-trip breaks otherwise.

Procedure

  1. Analyse the target first. Before any write, inspect the target with view or wc -l to 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.
  2. Check denylist gate. Run ./scripts-run src/scripts/condense_memory <path> --check — exit 0 = safe; exit 2 = denylist hit, stop and surface the refusal.
  3. Record baseline. wc -c <path> — capture pre-condensation char count for the commit message.
  4. Condense. ./scripts-run src/scripts/condense_memory <path>. The script writes <path>.original.md (verbatim backup) and rewrites <path> with original_sha256: + condensed_at: frontmatter.
  5. 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).
  6. 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.
  7. Commit both files together. <path> and <path>.original.md ship as a pair. The backup is the rollback path; never commit one without the other.
  8. Rollback path. If readability fails review at step 5: ./scripts-run src/scripts/condense_memory <path> --decondense restores the backup and deletes .original.md.

Read the full file on GitHub · 130 lines

Files

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.

Changes

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.

  1. 1mo ago Changed ba0add02c439
  2. 3mo ago First seen · 130 lines · 51 tokens per session scan C 4572c991ed39

Subscribe to this mod's changes

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.

Related

condense-memory compared with skills from other repositories

condense-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
condense-memoryevent4u-app/agent-configSkill20todayMITC51Claude Code, Codex
save-progressKimYx0207/Meta_KimSkill2923d agoApache-2.0A65Claude Code
memory-intakenhadaututtheky/neural-memorySkill2464d agoMITA44Claude Code
ijfw-handoffFerroxLabs/ijfwSkill2154d agoMITA23Claude Code
marketing-braincognyai/claude-code-marketing-skillsSkill120yesterdayMITA72Claude Code
lov-search-chatlovstudio/skillsSkill72todayMITA53Claude Code
initgrpcer/ownmemSkill4281mo agoApache-2.0A43Claude Code