slm-compress
仓库创建 2026年2月5日最近提交 1 天前SkillHot 收录 8 小时前
▸ 精选理由
在大上下文场景下既能保留关键信息又显著减小占用,实用性高。
这个 Skill 做什么
对长文本或工具输出进行可逆或有损压缩以节省上下文窗口空间。
把长文本或工具输出压缩,节省对话上下文窗口空间,可以做可逆或有损压缩以保留更多工作区。用在会话、日志或转录太长、影响后续理解或快要超限时调用。若有损压缩会返回 ccr_id,可用 slm_retrieve(ccr_id) 恢复原文;出错时要保证降级继续(不会中断流程)。
▸ 展开 SKILL.md 英文原文
Compress large text, tool output, or transcripts to reduce context-window usage while keeping the full 1M window intact — call slm_compress(content, mode, reversible, ttl_seconds) to shrink content; if the result is lossy a ccr_id is returned so you can call slm_retrieve(ccr_id) later to recover the exact original; always fail-open (ok:false → continue with the original).
199
Stars
34
Forks
37
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/qualixar/superlocalmemory/main/codex-plugin/skills/slm-compress/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/qualixar/superlocalmemory/main/codex-plugin/skills/slm-compress/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# slm-compress — Reversible Context Compression (Surface B)
## Purpose
When a tool output, transcript, or accumulated context grows large enough to crowd out working space, `slm_compress` reduces it in-place. The compressed form is used for the remainder of the session; the exact original is recoverable on demand via `slm_retrieve`. This works without a proxy and without touching `ANTHROPIC_BASE_URL`, so the full 1M context window is never sacrificed.
## Primary MCP Tool: slm_compress
```
slm_compress(
content: str, # required — text to compress (max 1 MB)
mode: str = "auto", # "normalize" | "auto" | "aggressive"
reversible: bool = True, # store origvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有