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 commands/jasonhnd/life_os/compressgit clone --depth 1 https://github.com/jasonhnd/life_OSWrote 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/commands/jasonhnd/life_os/compress)<a href="https://agentmods.dev/commands/jasonhnd/life_os/compress"><img src="https://agentmods.dev/badge/commands/jasonhnd/life_os/compress.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.00021 | $0.00506 |
| Opus 5 | $0.00010 | $0.00253 |
| Sonnet 5 | $0.00004 | $0.00101 |
| Haiku 4.5 | $0.00002 | $0.00051 |
Grade A, and why
compress 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 4d 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.
What it actually says
/compress · 上下文压缩
⚠️ Backup mode (v1.7.3.1). 主要路径是自动触发:context > 70% 或 user 说"太长/压缩"时 ROUTER 会主动建议+执行。这个命令是给"我想精确控制"或"自动 detection 漏了"的备份。详见
hosts/CLAUDE.md→ Auto-Trigger Rules → Compress auto-suggest。
User invoked: /compress $ARGUMENTS
你要做的(按顺序)
-
盘点当前 conversation context 用量:估算总 turn 数 + 大致 token 数。
-
识别可归档内容:
- 早于 last 5 turn 的 debug / 探索性消息
- 与
$ARGUMENTS(focus 关键词) 无关的部分 - 已被后续 turn 取代或修正的内容
-
必须保留:
- last 5 turn(无条件)
- 任何提到 SOUL / DREAM / 决策 / 长期规划的 turn
$ARGUMENTSfocus 直接相关的所有 turn
-
写 compression 档案:
- 创建
meta/compression/<sid>-compress-<timestamp>.md - 内容:被归档的 turns 摘要(每条 1-2 句)+ 完整原文(可恢复)
- 创建
-
报告给用户(必含):
📦 压缩完成 原 turn 数:N 保留:M 归档到:meta/compression/<file> 释放估计:~X tokens 保留的关键决策:[列表]
Anti-pattern
- 不要假装压缩了 — 必须真写归档文件
- 不要丢决策记录 — SOUL / DREAM / 规划相关的 turn 永远保留
- 不要没有 focus 时全压 — 默认保守保留 last 10 turn
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.
- 4d ago First seen · 47 lines · 21 tokens per session scan A c723c2b55653
compress is a command published in the GitHub repository jasonhnd/life_OS (5 stars, last pushed 27d ago), licensed Apache-2.0. It adds 21 tokens to every session and 506 once invoked, about $0.0001 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 commands, from other repositories
memory-commands
Commands for viewing, updating, and managing the entrepreneur's persistent context — identity, company profile, decision history, follow-ups, and session data. These commands read from and write to the five-layer memory system.
vault
Promote a completed thinking session into a versioned personal archive.
learn
Command "learn" from datacore-one/datacore, covering /learn, purpose, when to use, usage and quick capture.
minutes-ideas
Surface recent voice memos and ideas captured from any device. Use when the user asks "what ideas did I have?", "what were my recent memos?", "what did I record while walking?", or wants to recall a captured thought.
learn
Force claude-smart to extract learnings from this session now.
session-end
I'll summarize this coding session and update the memory system with our accomplishments.