Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

clever-compact巧妙紧凑

Agent Skill

clever-compact 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

21,234

周安装

859

GitHub Stars

公开资料未说明

下载量

6,666
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:clever-compact(巧妙紧凑)
来源仓库:https://github.com/jfulmines-star/clever-compact
安装命令:
openclaw skills install clever-compact
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install clever-compact

简介

clever-compact 解决 OpenClaw 代理跨会话遗忘问题,自动注入最后上下文。

  • 适合在 /new 启动、压缩或过夜后恢复关键信息连续性时使用。
  • 通过 clawhub 安装,命令为 openclaw skills install clever-compact。
  • 使用前需确认上下文压缩算法与隐私保护机制,避免敏感信息泄露。
  • 建议结合来源仓库和 README 文档进一步核验具体功能和使用细节。

SKILL.md

name
clever-compact
description
Your OpenClaw agent forgets everything between sessions — after /new, after compaction, after overnight. Clever Compact fixes all three: injects your last state on session start, flushes before every compact, and keeps memory stable across context resets. Native plugin. Zero per-turn overhead. Install in 4 steps, runs automatically.
tags
[memory, compaction, context, continuity, productivity, /new, amnesia, state-management, power-user, plugin, context-engine]

Clever Compact

Publisher: Axiom Stream Group Version: 2.2.3 Tier: Free Requires: OpenClaw ≥ 2026.3.7 · Recommended: 2026.3.12+ (fixes double-compaction loop) ClaWHub: https://clawhub.ai/jfulmines-star/clever-compact Support: kit@axiomstreamgroup.com


What This Skill Does

Clever Compact fixes the three memory failure modes that hit every serious OpenClaw user:

  • /new amnesia — you start a fresh session and your agent acts like it's never met you
  • Compaction loss — context fills up, compact fires, the agent forgets what you were doing mid-task
  • Memory drift — decisions made three sessions ago quietly disappear; the agent makes the same mistake again

v2 is a native OpenClaw plugin with two parts:

Part 1 — Session restore (automatic)

At the start of every session (including after /new and after compaction), Clever Compact checks for a recent state file. If one exists (written within 72 hours), it injects the content as system context on the first turn only. Your agent wakes up oriented — no repeated context injections, no per-turn token overhead.

Part 2 — State write (triggered)

OpenClaw does not currently expose a pre-compaction lifecycle hook, so the write side is triggered explicitly — not automatic. You have three options:

  1. Manual trigger: Tell your agent "Run a Clever Compact flush and save state." It writes memory/compact-state-YYYY-MM-DD-HHmm.md immediately.
  2. Pre-compact cron: Set up a cron job that fires before your scheduled compact with the system event: "Pre-compaction memory flush. Store durable memories now." Your agent writes state, then compact fires.
  3. Heartbeat entry: Add a flush step to your HEARTBEAT.md that periodically writes state — no timing races because it runs on demand.

The plugin also exposes api.fn("clever-compact:write") so any tool in your stack can trigger a state write programmatically.


Security & Privacy

State files are stored as plaintext Markdown in your memory/ directory. They are local to your machine and not transmitted anywhere by this plugin.

Do not include in state files:

  • API keys, tokens, or secrets
  • Passwords or credentials
  • Private personal information you wouldn't put in a text file

The plugin generates a reminder header in every state file. Review memory/compact-state-*.md periodically and remove any sensitive content that may have been captured inadvertently.

The api.fn("clever-compact:write") exposure is intentional — it allows your heartbeat, cron, or other tools to trigger a state flush programmatically. Audit any automation that calls this function to ensure it writes only session context, not credentials.


How the write side works

Your agent is active and responsive right up until compact fires — so a cron job 5 minutes before your scheduled compact, or a heartbeat flush at 75% context, gives you a clean, predictable save point every time.

When OpenClaw ships a pre-compaction lifecycle hook, Clever Compact will use it automatically. Until then, the cron + heartbeat pattern is the right architecture — and it works.


Installation

Requires OpenClaw ≥ 2026.3.7

Step 1 — Install the plugin:

openclaw plugins install ./skills/clever-compact

Or copy the folder to ~/.openclaw/extensions/clever-compact/.

Step 2 — Add to plugins.allow in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "allow": ["clever-compact"]
  }
}

Step 3 — Restart the gateway:

openclaw gateway restart

Step 4 — Set up a flush trigger (pick one):

*Option A — Cron (recommended):*

Schedule: 5 minutes before your nightly compact
Payload: "Pre-compaction memory flush. Store durable memories now (memory/YYYY-MM-DD.md). If nothing to store, reply NO_REPLY."

*Option B — Heartbeat:* Add to HEARTBEAT.md:

## Context Flush (every heartbeat at >75% context)
- If context > 75%: run a Clever Compact flush — write state to memory/compact-state-YYYY-MM-DD-HHmm.md

*Option C — Manual:* Tell your agent: "Run a Clever Compact flush and save state."


State file format

# Compact State — [ISO TIMESTAMP]
_Generated by Clever Compact v2.2.0 | Axiom Stream Group_

## Active Workstreams
| Name | Status | Blocker | Notes |
|---|---|---|---|
| [name] | in-progress | [blocker or —] | [key context] |

## Key Decisions
- [Decision]: [rationale / constraint]

## Open Tasks
- [ ] [Task] — Owner: [person or agent]

## Remember Flags
- [Anything explicitly flagged]

---
_Next session: read this file before responding to anything._

State files live in memory/ and are ignored after 72 hours.


Reduce compaction frequency (recommended)

Push compaction later in the context window by lowering reserveTokens:

{
  "agents": {
    "defaults": {
      "compaction": {
        "mode": "safeguard",
        "reserveTokens": 15000
      }
    }
  }
}

Default is 50,000 (fires at ~150k/200k). Setting to 15,000 fires at ~185k — roughly 3–4× fewer compactions per heavy session.


Migration from v2.0 / v2.1

The injection behavior is unchanged. One fix to apply:

v2.0/v2.1 injected the state file on every prompt turn — this added token overhead mid-session and contributed to faster compactions. v2.2.0 injects only once per session (first turn). No other changes needed; your existing state files and cron setup carry over.

Migration from v1

  1. Remove the Clever Compact blocks from your AGENTS.md
  2. Remove heartbeat entries that referenced the pre-compact scan
  3. Follow the v2 installation steps above
  4. Existing state files in memory/ are picked up automatically

Changelog

  • 2.2.3 (2026-03-16): Version sync across all files (package.json, openclaw.plugin.json, index.ts were mismatched). Fixed install step count in description. Updated recommended OpenClaw version to 2026.3.12+. Rewrote defensive "explicit write" section. No functional changes.
  • 2.2.0 (2026-03-11): Fixed per-turn injection (now injects once at session start only — eliminates mid-session token overhead). Accurately documents write side as explicit/triggered, not automatic. Exposes clever-compact:write fn for programmatic state writes. No breaking changes.
  • 2.1.0 (2026-03-10): Added writeState() export. Clarified hooks.
  • 2.0.0 (2026-03-08): Full rewrite as native OpenClaw plugin. Requires OpenClaw ≥ 2026.3.7. Breaking change from v1.
  • 1.3.1 (2026-03-06): Clarified config/reference language. No functional changes.
  • 1.3.0 (2026-03-05): Fully free. All features available at no cost.
  • 1.2.0 (2026-03-04): Reframed around the three failure modes.
  • 1.1.0 (2026-03-03): Added reserveTokens tuning guide.
  • 1.0.0 (2026-03-01): Initial release.

*Built by Axiom Stream Group — axiomstreamgroup.com* *We built this because we needed it. We run it on our own agents every day.*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.22%
按下载量换算6,547

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills