asclaude-compact

v1.0.0

Manage AI conversation memory with layered compression, archiving chats as JSONL, summarizing key info in markdown, and cleaning long outputs locally without...

0· 92·0 current·0 all-time
bySherman Schulist@miaoxingjun

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for miaoxingjun/asclaude-compact.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "asclaude-compact" (miaoxingjun/asclaude-compact) from ClawHub.
Skill page: https://clawhub.ai/miaoxingjun/asclaude-compact
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install asclaude-compact

ClawHub CLI

Package manager switcher

npx clawhub@latest install asclaude-compact
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description describe layered compression, JSONL archiving, and markdown summaries; the two main scripts implement exactly those behaviors (archive session .jsonl, create session-memory.md, and replace old tool results). No unrelated binaries, env vars, or network calls are requested.
Instruction Scope
SKILL.md tells the user to run the provided Python scripts; the scripts only read/write files under the user's home (~/.openclaw/agents/... and ~/.openclaw/workspace). There are no network endpoints or credential access. Notes: micro-compact.py collects 'tool_use' IDs from assistant messages but clears 'tool_result' blocks inside user messages — this may reflect a mismatch with some session schemas and could mean some tool results are not compacted as intended. Also, summary files include message previews (may contain sensitive content) and the scripts overwrite session files (though micro-compact creates a single .jsonl.backup in the same directory).
Install Mechanism
There is no install spec (instruction-only), and the repo contains plain Python scripts. No remote downloads, package installs, or archive extraction are performed by the skill itself.
Credentials
The skill requests no environment variables or credentials. It does access the user's home directory to read/write OpenClaw session and workspace files — this is proportional to the described function (local memory management).
Persistence & Privilege
always is false and the scripts do not modify other skills or global agent config. They persist artifacts in ~/.openclaw (archived-sessions, memory summaries) and create/overwrite a .jsonl.backup when saving — normal for local data-management tools.
Assessment
This skill appears to do what it says: local compression and archiving of OpenClaw session files. Before installing/running it, consider: 1) Back up your ~/.openclaw/sessions directory elsewhere — micro-compact overwrites session files (it does create a single .jsonl.backup but that may be overwritten on repeated runs). 2) Summaries (session-memory.md, daily -compact.md) include message previews and may contain sensitive data — store them securely or review the code to redact as needed. 3) The micro-compact logic has a probable schema mismatch (collects tool_use IDs from assistant messages but clears tool_result blocks inside user messages); test on non-critical sessions to confirm it behaves as you expect. 4) The tool runs entirely locally (no network/credentials), so install risk is low, but review the scripts or run them in a controlled environment if you have sensitive data.

Like a lobster shell, security has layers — review code before you run it.

latestvk97ftrvvacrqwydjk572bs0tws848x3w
92downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

asclaude-compact: 智能会话记忆管理器 🧠✨

让 AI 像人类一样拥有“短期记忆”与“长期档案”,告别上下文幻觉。

🌟 核心亮点

asclaude-compact 是一套专为 OpenClaw 打造的高级会话优化方案。它不仅仅是简单的“删除旧消息”,而是通过分层压缩策略,在保留核心逻辑的同时,将庞大的对话历史精简为维护成本极低的“精华摘要”。

🚀 功能详解

  1. 全量归档 (Full Archival):
    • 自动将当前冗长的对话打包成 .jsonl 存档。
    • 释放会话内存,让 AI 重新获得“轻装上阵”的响应速度。
  2. 智能摘要 (Smart Summarization):
    • 生成高度结构化的 session-memory.md
    • 精准记录已完成的决策、待办事项(TODO)以及关键的项目上下文。
  3. 微压缩 (Micro-Compact):
    • 针对超长工具输出(如大段代码块、日志)进行定向清理。
    • 保留最近的 2 个关键步骤,删除冗余的执行细节。
  4. 零 API 成本:
    • 纯本地运行,不消耗任何 Token 配额,响应速度快至毫秒级。

🛠️ 使用指南

  • 触发全量压缩: python scripts/compact-trigger.py
  • 执行快速清理: python scripts/micro-compact.py

由 黑米 (HeiMi) 精心封装,为您打造永不遗忘且极度专注的私人 AI 助手。 🌾

Comments

Loading comments...