SarielWang93

Context Budgeting

AI 智慧體v1.0.0
作者:SarielWang93更新於 2026-05-11context-budgeting@clawhub_sarielwang93/context-budgeting
上下文管理記憶增強

據 AlphaMoat 統計,截至 2026-10,Context Budgeting 累計下載 7,984 次、獲 6 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,485 位,在「AI 智慧體」分類(1,632 個)中排名第 463 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
7984
星標
6
全站下載量排名
#3,485
全站前 32% · 「AI 智慧體」前 29%
平台累計下載星標評論
ClawHub ↗61996-
SkillHub ↗79846—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它將目標、近期對話、決策記錄和相關背景分割槽,在壓縮前記錄任務狀態、關鍵決定和下一步,並給出配套清理指令碼與心跳檢查方式。檢查點會寫入本地記憶檔案;使用自動清理前需瞭解指令碼的實際操作。 隨附的清理/檢查點指令碼可能會實際刪除資料。執行清理前先查看目標範圍並保留檢查點。

資料釋出於 2026-10-27

可以用來做什麼

  • 在長任務中整理上下文並準備交接檢查點

什麼時候用

  • 會話接近上下文上限或壓縮後需要恢復任務狀態時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

整理當前目標、關鍵決定與下一步,先給出檢查點草稿和擬清理內容。

月度資料趨勢

累計下載7984
3209577483382026-03 · 累計下載 35632026-05 · 累計下載 46302026-06 · 累計下載 49172026-07 · 累計下載 54432026-08 · 累計下載 57232026-09 · 累計下載 59662026-10 · 累計下載 798426-0326-0926-10
星標6
5662026-03 · 星標 52026-05 · 星標 62026-06 · 星標 62026-07 · 星標 62026-08 · 星標 62026-09 · 星標 62026-10 · 星標 626-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-107984—6
2026-095966—6
2026-085723+5.1%6
2026-075443+10.7%6
2026-064917+6.2%6
2026-054630—6
2026-033563—5

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

1.7 KB · ClawHub v1.0.0
---
name: context-budgeting
description: Manage and optimize OpenClaw context window usage via partitioning, pre-compression checkpointing, and information lifecycle management. Use when the session context is near its limit (>80%), when the agent experiences "memory loss" after compaction, or when aiming to reduce token costs and latency for long-running tasks.
---

# Context Budgeting Skill

This skill provides a systematic framework for managing the finite context window (RAM) of an OpenClaw agent.

## Core Concepts
展開全部(共 36 行)

### 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.

「AI 智慧體」分類下的熱門技能

SarielWang93 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。