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/event4u-app/agent-config/condense-memorynpx skills add event4u-app/agent-config --skill condense-memorygit clone --depth 1 https://github.com/event4u-app/agent-configWrote 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.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 | $0.00051 | $0.02854 |
| Opus 5 | $0.00026 | $0.01427 |
| Sonnet 5 | $0.00010 | $0.00571 |
| 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 5d 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
internal/bench/reports/telegraph-v1.md(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 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.
- 5d 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 (10 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 2,854 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
save-progress
Save current project task progress to local task state file for cross-session continuity. Use when the user asks to save progress, uses an equivalent localized trigger phrase, the session is interrupted, or the user wants to resume work later. Writes to .claude/project-task-state.json so next session can load it via…
init
Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.
lov-search-chat
从本机 Ataru 记忆索引里召回过去的 AI 会话上下文,返回可定位的命中与原文片段。 Use when asked what was discussed, decided, or fixed in an earlier session.
chatcrystal-debug-recall
Recall ChatCrystal memories for debugging tasks involving failing tests, compiler errors, runtime exceptions, dependency issues, environment breakage, or performance regressions. Use when historical root causes, fixes, or pitfalls may accelerate diagnosis before proposing a fix.
memory-tools
Use EverMe memory proactively when the user refers to previous conversations, earlier decisions, "last time", "remember when", existing project conventions, or previously solved errors, and save durable user preferences, habits, and decisions the moment they are stated. Do not repeat a search when a non-empty block…
workspace
Scaffold and manage the stateless AI workspace — context, packs, repos, and knowledge for multi-repo orchestration.