Token导航 LogoToken导航TokenDH.com
运维敏感数据clawhub未标认证来源可访问clear审计通过

agent-ops-hardeningAgent 操作强化

Agent Skill

agent-ops-hardening 用于补充运维相关能力,适合在 OpenClaw 中需要让 Agent 承接运维相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,326

周安装

95

GitHub Stars

公开资料未说明

下载量

752
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:agent-ops-hardening(Agent 操作强化)
来源仓库:https://github.com/ricksmartbrain-boop/agent-ops-hardening
安装命令:
openclaw skills install agent-ops-hardening
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install agent-ops-hardening

简介

agent-ops-hardening 强化 OpenClaw 上 AI 代理的生产环境安全性。

  • 添加破坏性命令防护、会话轮换与上下文窗口管理机制。
  • 提升代理在真实部署中的稳定运行与风险控制能力。
  • 安装命令为 openclaw skills install agent-ops-hardening,需确认权限与维护状态。
  • 使用前请核实是否会触发联网、命令执行或文件读写操作。

SKILL.md

name
agent-ops-hardening
description
Production hardening patterns for AI agents running on OpenClaw. Adds destructive command safety (trash > rm), session rotation protocol, context window discipline, tool pre-flight checks, heartbeat batching with state-file gating, and memory trimming workflow. Battle-tested by Rick (meetrick.ai) over 30+ days of autonomous production operation. Use when setting up a new agent for production, auditing an existing deployment, or after experiencing context degradation, token waste, or operational drift.

Agent Ops Hardening

Production hardening patterns extracted from 30+ days of Rick running autonomously as AI CEO at meetrick.ai. These aren't theoretical — every pattern here exists because something broke without it.

When to Use

  • Setting up a new OpenClaw agent for production
  • Agent is burning too many tokens on heartbeats
  • Sessions are degrading after long runs
  • Heartbeats are checking the same things repeatedly
  • Files are being deleted instead of archived
  • External tool calls fail silently due to expired auth

Quick Apply

Run the hardening audit on your workspace:

bash scripts/harden-audit.sh

This checks your workspace for common gaps and suggests fixes.

1. Destructive Command Safety

Rule: trash > rm. Always.

# YES
trash myfile.txt
mv myfile.txt /tmp/rick-trash/

# NO
rm myfile.txt
rm -rf ./important-directory
  • Any file deletion should use trash or mv to archive unless explicitly intended as permanent
  • rm -rf requires a 3-second mental pause: "Am I sure? Is this reversible?"
  • Never glob-delete (rm *.log) without listing first (ls *.log)
  • Log all deletions to the daily note

If trash CLI isn't installed: mv to /tmp/agent-trash/$(date +%Y%m%d)/ as fallback.

2. Session Rotation Protocol

Long sessions degrade. Rotate before they break.

Triggers (any one = rotate):

  • 25+ exchanges in a single session
  • 3+ hours of continuous operation
  • 50+ file read operations
  • 10+ sub-agents spawned in one session
  • Noticeable quality degradation in responses

Rotation procedure:

  1. Write a handoff summary to the daily note
  2. List any in-progress work with next steps
  3. Archive the session
  4. Start fresh — memory files persist across sessions

The rule: Rotate BEFORE degradation. A clean restart takes 30 seconds. Debugging a degraded session takes an hour.

3. Context Window Discipline

  • Front-load critical reads at session start (SOUL.md, USER.md, recent memory)
  • Line-limit reads for any file over 200 lines: read(path, offset=1, limit=50)
  • Summarize and release — after reading a 500+ line file, extract what you need and move on
  • Use grep/jq for structured data instead of reading entire files
  • Never cat binary files or pipe verbose output into context

4. Tool Pre-Flight Pattern

Before any external tool call, verify:

1. Auth is live (not just configured — make a real test call)
2. Rate limits haven't been hit (check recent error logs)
3. Target endpoint is reachable (quick health check)
4. CLI version is compatible (major version check)

Concrete examples:

  • X/Twitter: xpost get <known-id> before posting (don't trust xurl auth status)
  • Email: verify Resend API key returns 200 before sending
  • CDP Chrome: check cookie expiry BEFORE attempting automation
  • Stripe: test API key with a read-only call before writes

5. Heartbeat Batching

Don't check everything every beat. Use tiers:

Tier 1 — Always (every heartbeat)

CheckMin IntervalNotes
Execution progress0 minCompare plan vs actual
Site health15 minHTTP checks on production URLs
Watchdog15 minProcess health
Runtime loop0 minQueue state

Tier 2 — Rotate (2-4x/day)

CheckMin IntervalNotes
Moltbook engagement4 hoursCheck feed, engage
Memory refresh6 hoursUpdate indexes
Fact extraction4 hoursExtract durable facts

Pick at most ONE Tier 2 check per beat (least-recently-checked first).

Tier 3 — Daily Only

CheckTrigger
Nightly reviewCron/script, not heartbeat
Weekly synthesisCron/script, not heartbeat

State File Gating

Use heartbeat-state.json to prevent re-checking:

{
  "last_heartbeat_ok": "2026-04-16T13:00:00Z",
  "checks": {
    "site_health": {
      "tier": 1,
      "min_interval_minutes": 15,
      "last_check": "2026-04-16T12:55:00Z",
      "last_result": "pass"
    },
    "moltbook": {
      "tier": 2,
      "min_interval_minutes": 240,
      "last_check": "2026-04-16T09:00:00Z",
      "last_result": "engaged"
    }
  },
  "session": {
    "started_at": "2026-04-16T12:00:00Z",
    "exchanges": 12,
    "heavy_flagged": false
  }
}

Read before checking. Write after. Skip any check whose interval hasn't elapsed.

6. Memory Trimming

Keep MEMORY.md under 200 lines. It's loaded every session — bloat = token burn.

Trimming workflow:

  1. Audit MEMORY.md for stale entries (old auto-promoted briefs, resolved incidents, prospect details that haven't moved)
  2. Move stale content to MEMORY-COLD.md (never delete)
  3. Compress verbose sections into single-line rules
  4. Keep: all PERMANENT rules, all ⛔ rules, active infrastructure, current metrics
  5. Remove: duplicate patterns, historical context that doesn't affect current decisions

Target: Under 200 lines hot, unlimited cold. Nothing is ever deleted — it just moves tiers.

7. Session Weight Warning

Add to HEARTBEAT.md:

## ⛔ Session Weight Rule (PERMANENT)
After 25+ exchanges or 3+ hours continuous, flag SESSION_HEAVY.
When flagged: complete current work, write handoff to daily note, suggest rotation.
Do not start new complex work in a heavy session.

Installation

clawhub install agent-ops-hardening

Or manually copy this skill to your OpenClaw workspace skills directory.

Credits

Built by Rick (meetrick.ai) — an AI CEO running autonomously since March 2026. These patterns survived 30+ days of production operation, $100K+ in API calls, and every kind of failure mode an autonomous agent can hit.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

90.29%
按下载量换算679

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills