搜索

PythonReactSEOPDF
OpenClaw

context-guardian

Proactive context monitoring with smart 3-level alerts. Know when to restart before quality degrades.

brucey0017-cloud0 来源安装数☆ 0 仓库 Starsv1.0.1

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install brucey0017-cloud/context-guardian

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Context Guardian 🛡️

Your context guardian. Alerts before errors happen.

Proactive context monitoring that warns you at 60%, 70%, and 85% usage — before context pollution causes errors and hallucinations.


Why You Need This

The Problem:

  • Long conversations lead to context pollution
  • Quality degrades silently as context fills up
  • You don't know when to restart until it's too late
  • Errors and hallucinations increase after ~70% usage

The Solution:

  • Continuous monitoring of context usage
  • Smart 3-level alerts (⚠️ 60%, 🟠 70%, 🔴 85%)
  • Actionable suggestions at each level
  • Prevents duplicate alerts

Quick Start

For Agents: Heartbeat Integration

When you receive a heartbeat poll, include this check:

  1. Call session_status tool to get current context usage
  2. Parse the context percentage from the output
  3. Compare against thresholds: 60% (warning), 70% (danger), 85% (critical)
  4. If threshold exceeded and not a duplicate alert, display the appropriate alert message
  5. Update state file to track alert history

Implementation:

During heartbeat:
1. Get context usage from session_status
2. Check if usage >= 60%, 70%, or 85%
3. Load state from memory/context-guardian-state.json
4. Determine if alert should be sent (prevent duplicates)
5. If yes, display alert and update state
For Users: Enable in HEARTBEAT.md

Add to your HEARTBEAT.md:

## Context Monitoring
- Check context usage
- Alert if thresholds exceeded (60%, 70%, 85%)

The agent will automatically handle the rest.


How It Works

Monitoring

The skill calls session_status to check your current context usage percentage.

Alert Levels

⚠️ Warning (60%)

⚠️ Context: 60%
Getting full. Consider wrapping up or starting fresh soon.

🟠 Danger (70%)

🟠 Context: 70%
Pollution risk rising. Recommend:
• Finish current task
• Start new session for next task
• Or compress with context-optimizer

**🔴 Critical...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/brucey0017-cloud/context-guardian
Version
1.0.1
Commit
3186bb371d2e50a84c778e572c1332b312f11768
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Context Guardian 🛡️

Your context guardian. Alerts before errors happen.

Proactive context monitoring with smart 3-level alerts (60%, 70%, 85%). Know when to restart before quality degrades.

Features

  • 🛡️ Proactive protection against context pollution
  • 📊 Real-time monitoring with zero overhead
  • 🚨 Smart 3-level alerts (60%, 70%, 85%)
  • 🔧 Highly configurable thresholds and alert styles
  • 🤝 Integrates with context-optimizer and context-recovery

Quick Start

  1. Install:

    clawhub install context-guardian
    
  2. Add to HEARTBEAT.md:

    ## Context Monitoring
    - Check context usage via context-guardian
    
  3. Done! You'll get alerts when context usage reaches thresholds.

Why You Need This

Long conversations lead to context pollution. Quality degrades silently as context fills up. You don't know when to restart until it's too late.

Context Guardian monitors your context usage and alerts you before errors happen:

  • ⚠️ 60% - Warning: Consider wrapping up
  • 🟠 70% - Danger: Finish current task, start fresh
  • 🔴 85% - Critical: High error risk, restart NOW

Documentation

See SKILL.md for full documentation.

License

MIT

来源内容

SKILL.md
# Context Guardian 🛡️

**Your context guardian. Alerts before errors happen.**

Proactive context monitoring that warns you at 60%, 70%, and 85% usage — before context pollution causes errors and hallucinations.

---

## Why You Need This

**The Problem:**
- Long conversations lead to context pollution
- Quality degrades silently as context fills up
- You don't know when to restart until it's too late
- Errors and hallucinations increase after ~70% usage

**The Solution:**
- Continuous monitoring of context usage
- Smart 3-level alerts (⚠️ 60%, 🟠 70%, 🔴 85%)
- Actionable suggestions at each level
- Prevents duplicate alerts

---

## Quick Start

### For Agents: Heartbeat Integration

When you receive a heartbeat poll, include this check:

1. Call `session_status` tool to get current context usage
2. Parse the context percentage from the output
3. Compare against thresholds: 60% (warning), 70% (danger), 85% (critical)
4. If threshold exceeded and not a duplicate alert, display the appropriate alert message
5. Update state file to track alert history

**Implementation:**

```
During heartbeat:
1. Get context usage from session_status
2. Check if usage >= 60%, 70%, or 85%
3. Load state from memory/context-guardian-state.json
4. Determine if alert should be sent (prevent duplicates)
5. If yes, display alert and update state
```

### For Users: Enable in HEARTBEAT.md

Add to your `HEARTBEAT.md`:

```markdown
## Context Monitoring
- Check context usage
- Alert if thresholds exceeded (60%, 70%, 85%)
```

The agent will automatically handle the rest.

---

## How It Works

### Monitoring

The skill calls `session_status` to check your current context usage percentage.

### Alert Levels

**⚠️ Warning (60%)**
```
⚠️ Context: 60%
Getting full. Consider wrapping up or starting fresh soon.
```

**🟠 Danger (70%)**
```
🟠 Context: 70%
Pollution risk rising. Recommend:
• Finish current task
• Start new session for next task
• Or compress with context-optimizer
```

**🔴 Critical...
README
# Context Guardian 🛡️

**Your context guardian. Alerts before errors happen.**

Proactive context monitoring with smart 3-level alerts (60%, 70%, 85%). Know when to restart before quality degrades.

## Features

- 🛡️ **Proactive protection** against context pollution
- 📊 **Real-time monitoring** with zero overhead
- 🚨 **Smart 3-level alerts** (60%, 70%, 85%)
- 🔧 **Highly configurable** thresholds and alert styles
- 🤝 **Integrates** with context-optimizer and context-recovery

## Quick Start

1. Install:
   ```bash
   clawhub install context-guardian
   ```

2. Add to `HEARTBEAT.md`:
   ```markdown
   ## Context Monitoring
   - Check context usage via context-guardian
   ```

3. Done! You'll get alerts when context usage reaches thresholds.

## Why You Need This

Long conversations lead to context pollution. Quality degrades silently as context fills up. You don't know when to restart until it's too late.

Context Guardian monitors your context usage and alerts you **before** errors happen:

- ⚠️ **60%** - Warning: Consider wrapping up
- 🟠 **70%** - Danger: Finish current task, start fresh
- 🔴 **85%** - Critical: High error risk, restart NOW

## Documentation

See [SKILL.md](SKILL.md) for full documentation.

## License

MIT

相关技能

OpenClaw

xint

0xnyk

X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

flightclaw

jackculpan

Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.

OpenClaw

openclaw-trading-assistant

openclaw-trade

openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime...