跳到正文
cccskills
免费在 GitHub 公开

context-compressor

Use for session compression and full-text search.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Context Compressor

Intelligente Session-Komprimierung aus der OpenAmer state.db:

  • Komprimiert Session-Transkripte um 60-80% durch Redundanz-Entfernung
  • Extrahiert Entscheidungen, Action-Items, Learnings und offene Punkte
  • Volltextsuche über alle komprimierten Sessions
  • Batch-Archivierung aller Sessions in JSON-Archiven

Standort

  • Script: $OPENAMER_HOME\scripts\context-compressor.py
  • Archiv: $OPENAMER_HOME\context-compressor\archives\
  • Index: $OPENAMER_HOME\context-compressor\index.json

CLI-Übersicht

FlagBeschreibung
--session <id>Einzelne Session komprimieren → JSON on stdout
--batch [Tage]Alle Sessions älter als N Tage archivieren (default: 7)
--statsKompressionsrate + Extraktions-Statistiken anzeigen
--search <query>Volltextsuche in allen komprimierten Sessions

Beispiel

# Einzelne Session komprimieren
python scripts/context-compressor.py --session 20260821_233243_387822

# Batch-Verarbeitung (alle Sessions >7 Tage)
python scripts/context-compressor.py --batch

# Alle Sessions verarbeiten (auch aktuelle)
python scripts/context-compressor.py --batch 0

# Statistiken anzeigen
python scripts/context-compressor.py --stats

# Volltextsuche
python scripts/context-compressor.py --search "API-Key"
python scripts/context-compressor.py --search "entscheidung"

Ausgabe-Struktur (pro Session)

{
  "session_id": "20260821_233243_387822",
  "title": "...",
  "raw_chars": 59414,
  "compressed_chars": 4756,
  "compression_percent": "92.0%",
  "decisions": ["..."],
  "action_items": ["..."],
  "learnings": ["..."],
  "open_points": ["..."],
  "messages": [
    {"id": 24014, "role": "user", "compressed": "...", "original_len": 89, "compressed_len": 89},
    {"id": 24016, "role": "tool", "compressed": "[JSON] keys=[...]", "original_len": 8125, "compressed_len": 221}
  ]
}

Kompressions-Strategie

  1. Boilerplate entfernen: <antthinking>, <tool_call>, lange Code-Blöcke
  2. Duplikat-Sätze entfernen: Wiederholungen innerhalb derselben Nachricht
  3. Tool-Outputs massiv kürzen:
    • JSON-Outputs → [JSON] keys=[...] (auf Schlüssel reduziert)
    • Lange Tool-Outputs → auf max 200 Zeichen gekürzt
  4. Entscheidungen extrahieren: Pattern-basiert (DE + EN)
  5. Deduplizieren: Gleiche Entscheidungen/Actions nur einmal

Datenquelle

  • state.db aus OPENAMER_HOME (default: $OPENAMER_HOME\state.db)
  • Tabellen: sessions, messages
  • Komprimierte Sessions: context-compressor/archives/batch_<timestamp>.json

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build integrated IS/BS/CF financial workbooks in Excel.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

a2a-swarm

免费

Run and grow the OpenAmer Agent-to-Agent swarm: identity, trust, node-to-node ask, signed skill/insight sharing, and the autonomous self-learning loop.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

Use for A/B experiments on OpenAmer configs and skills.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

Roleplay a hostile user to find and triage UX pain points.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

Agent mesh: master/worker nodes, HTTP delegation, heartbeat.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

Use for agentic commerce payments tasks. Candidate synthesized from trend radar; awaiting trial promotion.

中文简介正在准备中。当前显示原文说明。

openamer/openamer82026年10月20日 更新

查看 openamer 的全部技能

报告此技能的问题