Token导航 LogoToken导航

Agent Skill · 开发

context-guardian-keeper(上下文守护者)

context-guardian-keeper 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

context-guardian-keeper 是开发类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为只读;许可证为 MIT-0,第三方扫描已通过,按安装量在开发类的 21,744 个 Skill 里排第 4,774。

总安装 7,550周安装 321GitHub Stars 公开资料未说明下载 2,645核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.1.7

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install context-guardian-keeper

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

context-guardian-keeper 是面向自主 AI Agent 的生产就绪上下文连续性解决方案。适用于任务周期超过单次 LLM 上下文寿命的长时程项目。提供持久化检查点机制,防止上下文丢失与进度中断。安装前需评估本地存储与权限设置,确保检查点数据安全。适合高可靠性要求、需断点续作的自动化代理应用场景。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install context-guardian-keeper;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

context-guardian-keeper 怎么安装?

在终端执行 openclaw skills install context-guardian-keeper。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

context-guardian-keeper 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

context-guardian-keeper 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

context-guardian-keeper 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

context-guardian-keeper 用的人多吗?

公开数据是累计安装 7,550 次,近一周安装 321 次,下载 2,645 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

context-guardian-keeper 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
context-guardian-keeper

上下文守护者 · 本页

7,550—只读MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
context-guardian
description
Production-ready context continuity skill for autonomous AI agents. Use when tasks may outlive a single LLM context window, when you need durable checkpoints, structured summaries, restart recovery, pressure-aware trimming, or when the agent must stop safely instead of continuing blindly after context loss.

Context Guardian

Use this skill to keep long-running agent work resumable, loss-aware, and safe. Use it when a task may outlive one model context window or when a host must stop safely before context loss causes bad decisions.

Execution

For the Agent — Mandatory Runtime Contract

Follow this order. Do not skip steps.

Required startup reads

Read these before acting:

  1. references/task-state-schema.md — required task-state fields.
  2. references/summary-template.md — required summary shape.
  3. The host-configured durable task state file.
  4. The host-configured structured summary file, if it exists.

Required host capabilities

The host must provide all of these:

  • a way to read the durable task state file,
  • a way to write the durable task state file,
  • a way to read the structured summary file,
  • a way to write the structured summary file,
  • a numeric context-pressure value in range 0.0 to 1.0 before each major action,
  • a real stop path for emitted status signals.

If the host cannot provide the durable task-state read/write path, emit STATUS:MISSING_STATE and stop.

Defined terms

  • Major action = any LLM call that can materially change the plan, any tool call that writes or deletes data, any code or file edit, or any step that consumes meaningful context.
  • Fresh checkpoint = a durable task-state write that happened after the latest state-changing action.
  • Safe recovery = the durable task state exists, required fields are present, and next_action is non-empty.
  • Relevant artifacts = files listed in durable state, such as touched_files, or files explicitly required by next_action.
  • Field alignment note = phase in this document corresponds to current_phase in references/task-state-schema.md; last_successful_action corresponds to last_action.summary or last_action.outcome; touched_files and relevant_artifacts correspond to the path values inside the artifacts array.

Startup branch

  1. Read the latest durable task state from disk.
  2. If no durable task state exists:

- If the structured summary file also does not exist, initialize from references/task-state-schema.md, set next_action to START, write the initial durable state, write an initial summary from references/summary-template.md, and continue. - If the structured summary file exists but durable task state is missing, emit STATUS:MISSING_STATE and stop.

  1. If the durable task state exists but required fields are missing, emit STATUS:MISSING_STATE and stop.
  2. If next_action is empty, emit STATUS:MISSING_STATE and stop.
  3. If next_action is DONE, COMPLETE, or FINISH, write final durable state + summary, emit STATUS:COMPLETE, and stop.
  4. Read the latest structured summary from disk.
  5. After startup completes, the structured summary file must exist.
  6. If the summary is missing, emit STATUS:MISSING_STATE and stop.
  7. If the summary conflicts with the durable task state, trust the durable task state, rewrite the summary immediately, and continue.

Pressure thresholds

Default thresholds. Override them through host configuration when available:

  • warning_threshold = 0.55
  • compress_threshold = 0.70
  • critical_threshold = 0.85

Quick reference

  • < 0.55 → continue normally
  • 0.55 to < 0.70 → continue, but expect fresher state/summary discipline
  • 0.70 to < 0.85 → continue only with a fresh summary before the next major action
  • >= 0.85 → write checkpoint + summary, emit STATUS:HALT_CONTEXT_LIMIT, stop autonomous execution

Pressure fallback rule

This skill requires a host-provided numeric pressure value. Do not estimate pressure from characters, words, or token guesses in production hosts. Use this fallback only when the host cannot provide a reliable pressure value:

  1. On the first turn only, assume pressure = 0.0.
  2. On any later turn, treat missing pressure as critical and run the Halt Rule.

Reference implementation note: scripts/context_guardian.py includes a character-based pressure estimator for reference/test environments only. Production hosts must prefer explicit host-owned pressure reporting over that estimator, and the reference SafetyGate.evaluate(...) accepts a host pressure override plus explicit integration flags such as action_changed_state, phase_or_goal_changed, and summary_conflict so integrations can follow the contract directly and avoid suppressing required checkpoints or summaries during low-pressure state transitions.

Runtime loop

Repeat this loop before every major action.

  1. Read fresh state

- Re-read the latest durable task state from disk. - Re-read the latest structured summary from disk. - If next_action is DONE, COMPLETE, or FINISH, write final durable state + summary, emit STATUS:COMPLETE, and stop. - If the structured summary is missing, emit STATUS:MISSING_STATE and stop. - Do not rely on stale in-memory state when a newer disk version may exist.

  1. Check pressure

- Read the numeric pressure value from the host. - If pressure is below warning_threshold, continue to Step 3. - If pressure is at or above warning_threshold but below compress_threshold, continue to Step 3. - If pressure is at or above compress_threshold but below critical_threshold, continue to Step 3 and write a fresh summary in Step 5 before the next major action. - If pressure is at or above critical_threshold, go to the Halt Rule.

  1. Build the working bundle

- If the host already has a context-assembly helper, pass it these exact inputs: goal, phase, next_action, last_successful_action, constraints, and relevant_artifacts. - Otherwise include exactly these fields in the working context: goal, phase, next_action, last_successful_action, constraints, and all file paths listed in touched_files or explicitly named in next_action. - Do not include the full durable state file by default. - Include the latest structured summary only when it materially helps the next major action. - Do not guess missing fields.

  1. Execute one major action

- Execute exactly one checkpointable major action. - If the action fails, record the failure in durable state, write the durable task state immediately, and restart the loop from Step 1. - Do not chain multiple risky actions when one checkpointable step is enough.

  1. Persist state

- If the action changed state, write the durable task state immediately. - Write a fresh summary immediately if any of these are true: pressure is at or above warning_threshold, pressure is at or above compress_threshold, the summary conflicted with durable state, or the action changed phase or goal.

  1. Repeat

- Start the loop again from Step 1 before the next major action.

Halt rule

This rule overrides everything else.

If pressure is at or above critical_threshold, or required pressure is missing after the first turn, do this immediately:

  1. write checkpoint + summary,
  2. emit STATUS:HALT_CONTEXT_LIMIT,
  3. stop autonomous execution,
  4. wait for explicit human or system override.

Do not soften this halt with confidence-based exceptions.

Do not continue autonomously after STATUS:HALT_CONTEXT_LIMIT.

Summary rule

When you write a summary, preserve:

  • goal,
  • current phase,
  • completed steps,
  • failed attempts,
  • decisions,
  • files touched,
  • important tool outputs,
  • blockers,
  • next action,
  • invariants,
  • constraints.

Do not depend on raw chat history alone for recovery. Do not guess missing durable state that should be read from storage. Do not invent missing tool outputs.

For the Developer Only — Integration Notes

Ignore this section if you are the runtime agent executing a task. Use this section only when wiring the module into a host agent loop.

Minimum safe integration order

  1. Read references/integration-checklist.md to identify the smallest safe integration point.
  2. Represent task continuity with references/task-state-schema.md.
  3. Keep task state in durable JSON.
  4. Keep summaries in human-readable markdown.
  5. Rebuild the working bundle before each major model call.
  6. Write checkpoints after state mutations, before destructive actions, at or above warning pressure when required by the runtime loop, before run end, and after failures that change the plan. When wiring the reference implementation, pass action_changed_state=True whenever the guarded action mutated durable task state so below-critical turns still produce the required checkpoint. Also pass phase_or_goal_changed=True or summary_conflict=True whenever those conditions are true so the reference implementation emits the fresh summary required by the runtime contract even at normal pressure.
  7. Reuse an existing planner, tool runner, or memory module when one already exists instead of duplicating storage.
  8. Ensure the host treats STATUS:MISSING_STATE, STATUS:HALT_CONTEXT_LIMIT, and STATUS:COMPLETE as real state signals.
  9. Keep pressure reporting numeric and host-owned. Do not push token estimation onto the model.
  10. If the host uses a helper CLI, keep it thin and repetitive: status, ensure, checkpoint, bundle is usually enough.
  11. If weak models will call that CLI directly, prefer a session-level root default (for example an environment variable) instead of repeating a fragile --root ... flag in every command.
  12. Prefer a stable summary alias such as summaries/latest-summary.md for runtime reads, even when timestamped summaries are also stored.
  13. If legacy task-state files may already exist in the host, detect that shape before mutation and require explicit archival/reinitialization instead of silent overwrite.

Reference file purposes

  • references/task-state-schema.md — canonical task-state fields.
  • references/summary-template.md — canonical summary format.
  • references/config-example.yaml — config shape, paths, thresholds.
  • references/persisted-task-state.example.json — persisted state example.
  • references/summary-example.md — concrete markdown summary example.
  • references/integration-checklist.md — host-loop integration checklist, including weak-model-safe wrapper rules.
  • references/implementation-notes.md — practical wrapper and runtime integration notes.

Deterministic implementation reference

Use scripts/context_guardian.py as the source-of-truth reference implementation when the host project uses Python or when behavior is ambiguous. If wording and the reference implementation diverge, scripts/context_guardian.py governs the deterministic integration contract, while SKILL.md governs the mandatory agent execution behavior. Use scripts/test_context_guardian.py to validate checkpoint creation, summary generation, restart recovery, critical-threshold stop behavior, and trimming policy.

Developer guardrails

  • Do not continue blindly after context loss.
  • Do not guess missing state that should be loaded from durable storage.
  • Do not keep stale checkpoints when a fresh one is required.
  • Do not let the host ignore halt statuses.

Completion standard

A valid implementation must:

  • persist durable task state outside the LLM context,
  • recreate a working bundle before each major action,
  • checkpoint and summarize on pressure or on progress,
  • stop when context fidelity is too low,
  • recover from restart using the latest durable state,
  • keep thresholds and paths configurable,
  • include tests and examples.

平台分布

OpenClaw

81.32%
按下载量换算2,151

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills