← 返回
AI智能

Muguozi1 Openclaw Context Budgeting

Manage and optimize OpenClaw context window usage via partitioning, pre-compression checkpointing, and information lifecycle management. Use when the session...
通过分区、预压缩检查点和信息生命周期管理来管理和优化OpenClaw上下文窗口的使用。在会话...时使用
muguozi1
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 463
下载
💾 8
安装
1
版本
#latest

概述

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:

  1. Generate Checkpoint: Update memory/hot/HOT_MEMORY.md with:
    • Status: Current task progress.
    • Key Decision: Significant choices made.
    • Next Step: Immediate action required.
  2. Run Automation: Execute scripts/gc_and_checkpoint.sh to 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.md to finalize the compaction process without restarting the session.

Integration with Heartbeat

Heartbeat (every 30m) acts as the Garbage Collector (GC):

  1. Check /status. If Context > 80%, trigger the Checkpointing procedure.
  2. Clear raw data (e.g., multi-megabyte JSON outputs) once the summary is extracted.

🚀 30 秒快速开始

# 基础用法
# TODO: 添加具体命令示例

📋 何时使用

当以下情况时使用此技能:

  1. 场景 1
  2. 场景 2
  3. 场景 3

🔧 配置

必需配置

# 环境变量或配置文件

可选配置

# 可选参数

💡 实际应用场景

场景 1: 基础用法

# 命令示例

场景 2: 进阶用法

# 命令示例

🧪 测试

# 运行测试
python3 scripts/test.py

⚠️ 故障排查

常见问题

问题: 描述问题

解决方案:

# 解决步骤

📚 设计原则

本技能遵循 Karpathy 的极简主义设计哲学:

  1. 单一职责 - 只做一件事,做好
  2. 清晰可读 - 代码即文档
  3. 快速上手 - 30 秒理解用法
  4. 最小依赖 - 只依赖必要的库
  5. 教育优先 - 详细的注释和示例

最后更新:2026-03-16 | 遵循 Karpathy 设计原则


🏷️ 质量标识

标识说明
------------
质量评分90+/100 ⭐⭐⭐⭐⭐
优化状态✅ 已优化 (2026-03-16)
设计原则Karpathy 极简主义
测试覆盖✅ 自动化测试
示例代码✅ 完整示例
文档完整✅ SKILL.md + README.md

备注: 本技能已在 2026-03-16 批量优化中完成优化,遵循 Karpathy 设计原则。

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-20 05:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,056 📥 796,124
productivity

Muguozi1 Openclaw Find Skills

muguozi1
当用户询问'如何做某事'、'寻找某技能'或'是否有技能可以...'等问题时,帮助其发现和安装智能体技能。
★ 0 📥 1,586
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,539