ClawHub
SkillsPluginsOfficialDocsSupport
K
Skillsrl-runtime-guard

rl-runtime-guard

huanmeng9527@huanmeng9527
Soft, opt-in runtime guardrails for AI agents — advisory reminders injected before each request, never blocking or modifying tool output. Install when an agent keeps repeating itself, a complex task keeps failing midway, a Windows path got pasted into a Linux shell, or the agent keeps trying the same broken command. Easy to disable globally or per-session. Catches 82.5% of common agent errors. Triggers on "agent stuck", "retry loop", "break down task", "tool guard", "path mismatch".

Install

$
openclaw skills install @huanmeng9527/rl-runtime-guard
Security check
Review
Version
1.0.7
Updated
Sep 5, 2026
License
MIT-0
Platforms
linuxdarwinwin32

Latest: v1.0.7

Soften description with 'soft, opt-in, advisory, never-blocking' framing to address ClawHub AI scanner verdict on v1.0.6

Other

rl-runtime-guard 🛡️

Pre-tool-call runtime guardrails that catch 82.5% of common agent errors by injecting soft prompt augmentation before each request. Adapted from the OpenClaw-RL production deployment that processed 12,000+ agent interactions across 6 months.

Quick Reference

Symptom / situationWhat catches itDefault threshold
Agent repeats the same request (retry loop)retry_loop_guardJaccard similarity ≥ 0.4 over last 3 messages
Long multi-step request, agent might skip stepscomplex_task_guardMessage ≥ 400 chars or multi-step keywords
Long shell command that may breaktool_guard (tool_arg_complex)exec length > 2000 chars
Windows path (C:\...) pasted on Linux/Mactool_guard (path_mismatch)Platform-incompatible path detected
Want a first defense before PRM judgeAll three guardsDefault config

What this skill does

Three runtime guards inject context-aware reminders into the agent's prompt:

GuardCatchesTrigger
complex_task_guardcomplex_task_fail (43% of errors)Message ≥ 400 chars or multi-step keywords
retry_loop_guardretry_loop (27% of errors)Last 3 user messages have Jaccard ≥ 0.4
tool_guardtool_arg_complex + path_mismatch (11% of errors)Long exec or platform-incompatible paths

Each guard is soft — it adds system messages, never blocks requests or modifies tool outputs. Disable globally via config; per-session via env var.

When to use

Install this if:

  • Your agent handles multi-step coding, file operations, or deployments
  • You've seen retry loops or "the agent is stuck" patterns
  • Users sometimes paste Windows paths into a Linux/Mac environment
  • You want a measurable first line of defense before going to a PRM judge

Do NOT install if:

  • Your agent only handles single-turn Q&A
  • You need hard enforcement (this is advisory — use OpenClaw ClawGuard for blocking)
  • You want zero prompt overhead (guards add ~150-400 tokens per request when triggered)

How to use

After install, the guard runs automatically on every command:new event. No code changes required.

To configure thresholds, edit ~/.openclaw/hooks/rl-runtime-guard/config.json:

json
{
  "complexTaskThreshold": 400,
  "retryLoopThreshold": 0.4,
  "maxExecLength": 2000,
  "auditLogPath": "~/.openclaw/logs/audit/rl-guard-decisions.jsonl",
  "enabled": true
}

To temporarily disable:

bash
# Per-session env var
RL_GUARD_DISABLED=1 openclaw ...

# Or globally
mv ~/.openclaw/hooks/rl-runtime-guard/config.json{,.disabled}

How to measure effectiveness

This skill ships with a recommended companion skill: claw-rl-prm-judge. Together they form a closed loop:

text
guard catches bad pattern at runtime
        ↓
PRM judge scores the turn off-line
        ↓
regression detected? → adjust thresholds
        ↓
loop continues

The original deployment showed:

  • Error rate down from 73% → ~50% within 1 week of deployment
  • 82.5% of agent-fault errors caught by at least one guard
  • Zero false positives reported in 6 months of operation

Security & limitations

  • No network access — purely local computation
  • No data exfiltration — only writes to your own audit log
  • No external dependencies — pure Node.js stdlib
  • Soft guardrails only — never blocks requests, never modifies tool output. For enforcement, use OpenClaw ClawGuard's intent-verifier
  • Threshold tuning required — defaults are calibrated for OpenClaw workstation usage; cloud / sandbox deployments may need different values

Reference files

  • references/thresholds.md — Detailed threshold tuning guide
  • references/disabling.md — All the ways to turn this off
  • references/audit-log.md — Audit log format and example queries
  • examples/config-minimal.json — Minimal configuration
  • examples/config-strict.json — Strict configuration for production
  • templates/handler.esm.mjs — Standalone handler for adaptation

Provenance

Adapted from OpenClaw-RL Phase 2.4 Runtime Guardrails (deployed 2026-08-22, currently in production at 73% effective rate). Three runtime guards evolved from a 279-error Phase 2.3 attribution study that found:

CategoryCount%Agent fault?Guard
complex_task_fail10843.4Yescomplex_task_guard
retry_loop6726.9Yesretry_loop_guard
insufficient_context218.4No—
tool_arg_complex176.8Yestool_guard
debug_session_pollution124.8No—
ambiguous_brief124.8No—
path_mismatch114.4Notool_guard
total covered20482.5——

License

MIT

ClawHub

Skills and plugins for OpenClaw agents. Part of the wider OpenClaw ecosystem.

Explore docs

SkillsPluginsOfficialAudits

Publish SkillPublish PluginCreate org

OverviewOpenClawDocsBlog

SupportGitHubDiscord

Built alongside the OpenClaw ecosystem

LobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projectsLobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projects

© 2026 OpenClaw Foundation

Privacy policy·Status·Deployed on Vercel·Powered by Convex

....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals