Muguozi1 Openclaw Context Budgeting
v1.0.0Manage and optimize OpenClaw context window usage via partitioning, pre-compression checkpointing, and information lifecycle management. Use when the session...
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The skill's stated purpose (manage/compact OpenClaw agent context) aligns with its files and instructions. However, the provided script invokes an 'openclaw' CLI command even though the skill declares no required binaries — the runtime dependency on an 'openclaw' executable is not documented in the metadata.
Instruction Scope
SKILL.md instructs the agent to write/update workspace files (memory/hot/HOT_MEMORY.md) and to run scripts/gc_and_checkpoint.sh to trigger compaction. That behavior is in-scope for a context-management skill, but the doc is vague about how '/status' is checked, what exact data is removed during 'cleanup', and what permissions are required to modify workspace files.
Install Mechanism
There is no install spec (instruction-only) and the shipped scripts are small and readable. This keeps risk low compared to remote download/install flows, but the local script executes a CLI command (openclaw sessions ...) which implies an external dependency that should be declared.
Credentials
The skill requests no secrets or config paths; it optionally uses OPENCLAW_WORKSPACE (falling back to $HOME/.openclaw/workspace). That is proportional to a memory-management skill. Still, it assumes write access to the workspace directory which should be confirmed.
Persistence & Privilege
The skill is not forced-always and does not request elevated platform privileges. It does instruct modifying files under the agent workspace (its own domain) but does not attempt to modify other skills or global configuration.
What to consider before installing
This skill appears to implement what it claims, but before installing: 1) verify that the 'openclaw' CLI exists and behaves as expected (the script runs 'openclaw sessions --active 1'); 2) review and back up your workspace/memory folder because the skill writes/cleans files under $HOME/.openclaw/workspace (or OPENCLAW_WORKSPACE); 3) clarify how '/status' is checked and what exact files will be deleted during compaction; 4) run the scripts in a controlled environment (or inspect them line-by-line) to ensure they don't remove files you need; and 5) ask the skill publisher to add the 'openclaw' binary to required-binaries and to document required permissions and exact cleanup behavior. These steps will reduce the risk of accidental data loss or surprises.Like a lobster shell, security has layers — review code before you run it.
latest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Context Budgeting Skill
This skill provides a systematic framework for managing the finite context window (RAM) of an OpenClaw agent.
Core Concepts
1. Information Partitioning
- Objective/Goal (10%): Core task instructions and active constraints.
- Short-term History (40%): Recent 5-10 turns of raw dialogue.
- Decision Logs (20%): Summarized outcomes of past steps ("Tried X, failed because Y").
- Background/Knowledge (20%): High-relevance snippets from MEMORY.md.
2. Pre-compression Checkpointing (Mandatory)
Before any compaction (manual or automatic), the agent MUST:
- Generate Checkpoint: Update
memory/hot/HOT_MEMORY.mdwith:- Status: Current task progress.
- Key Decision: Significant choices made.
- Next Step: Immediate action required.
- Run Automation: Execute
scripts/gc_and_checkpoint.shto trigger the physical cleanup.
Automation Tool: gc_and_checkpoint.sh
Located at: skills/context-budgeting/scripts/gc_and_checkpoint.sh
Usage:
- Run this script after updating
HOT_MEMORY.mdto finalize the compaction process without restarting the session.
Integration with Heartbeat
Heartbeat (every 30m) acts as the Garbage Collector (GC):
- Check
/status. If Context > 80%, trigger the Checkpointing procedure. - Clear raw data (e.g., multi-megabyte JSON outputs) once the summary is extracted.
🚀 30 秒快速开始
# 基础用法
# TODO: 添加具体命令示例
📋 何时使用
当以下情况时使用此技能:
- 场景 1
- 场景 2
- 场景 3
🔧 配置
必需配置
# 环境变量或配置文件
可选配置
# 可选参数
💡 实际应用场景
场景 1: 基础用法
# 命令示例
场景 2: 进阶用法
# 命令示例
🧪 测试
# 运行测试
python3 scripts/test.py
⚠️ 故障排查
常见问题
问题: 描述问题
解决方案:
# 解决步骤
📚 设计原则
本技能遵循 Karpathy 的极简主义设计哲学:
- 单一职责 - 只做一件事,做好
- 清晰可读 - 代码即文档
- 快速上手 - 30 秒理解用法
- 最小依赖 - 只依赖必要的库
- 教育优先 - 详细的注释和示例
最后更新:2026-03-16 | 遵循 Karpathy 设计原则
🏷️ 质量标识
| 标识 | 说明 |
|---|---|
| 质量评分 | 90+/100 ⭐⭐⭐⭐⭐ |
| 优化状态 | ✅ 已优化 (2026-03-16) |
| 设计原则 | Karpathy 极简主义 |
| 测试覆盖 | ✅ 自动化测试 |
| 示例代码 | ✅ 完整示例 |
| 文档完整 | ✅ SKILL.md + README.md |
备注: 本技能已在 2026-03-16 批量优化中完成优化,遵循 Karpathy 设计原则。
Files
8 totalSelect a file
Select a file to preview.
Comments
Loading comments…
