← Back to Skills Marketplace
Agent Ops
by
_silhouette
· GitHub ↗
· v1.1.0
· MIT-0
105
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install agent-ops
Description
Agent session 运维工具。当需要检测和恢复 API 限速、回收死 session 的知识、在破坏性操作前自动快照、或监控 context 使用率时使用。不用于安装 hook 脚本(用 agent-hooks)或架构设计(用 harness-design-patterns)。
README (SKILL.md)
Agent Ops
Agent session 运维工具集。监控、恢复、保护运行中的 agent session。
When to Use
- tmux 中的 agent 遇到 API 限速后挂死 → Rate Limit 恢复
- Session 静默死亡,需要回收其知识 → Stale Session Daemon
- Bash 命令可能造成不可逆破坏 → Checkpoint + Rollback
- Context 快用完,需要预算管理 → Token Budget / Context 估算
- 模型反复失败需要切换 → Auto Model Fallback
When NOT to Use
- 安装 Stop/PreToolUse hook → 用
agent-hooks - 设计 agent 架构 → 用
harness-design-patterns
工具概览
| 工具 | 类型 | 功能 | 详情 |
|---|---|---|---|
| Rate Limit 恢复 | bash 脚本 / cron | 扫描 tmux pane 检测限速,自动发 Enter 恢复 | 详情 |
| Context 估算 | bash 脚本 | 读 transcript 尾部 4KB 提取 token 使用率 | 详情 |
| Stale Session Daemon | daemon / cron | Heartbeat 检测 + 死 session 知识回收 | 详情 |
| Checkpoint + Rollback | hook 脚本 | PreToolUse git stash + PostToolUseFailure 自动回滚 | 详情 |
| Token Budget | hook 脚本 | UserPromptSubmit 注入预算感知指令 | 详情 |
| Auto Model Fallback | hook 脚本 | 3 次连续失败后升级 Haiku→Sonnet→Opus | 详情 |
Scripts
| 脚本 | 用途 |
|---|---|
scripts/context-usage.sh \x3Ctranscript> |
从 transcript JSONL 尾部估算 context 使用率 |
Session State
所有状态统一在 sessions/\x3Csession-id>/ 下。详见 session-state-layout.md。
条件判断规则
- 如果只有 1-2 个 session 在跑 → Rate Limit 恢复手动即可,不需要 daemon
- 如果 session 预计 \x3C 30 分钟 → 不需要 Stale Session Daemon
- 如果没有破坏性 Bash 命令 → 不需要 Checkpoint
- 如果不确定 context 够不够 → 先跑
context-usage.sh检查再决定
Usage Guidance
This skill is coherent with its stated goal of managing agent sessions, but it assumes and performs actions you should review before installing. Before you proceed:
- Inspect the scripts (context-usage.sh and the reference patterns) yourself. They are small and readable.
- Ensure the environment where you run this has tmux, git, and jq installed; the package metadata should declare these but currently does not. Don't run it on a system lacking those tools or on production hosts without testing.
- Understand side effects: the skill will read transcripts, write files to sessions/<session-id>/, create git checkpoints with `git add -A` (temporarily changing the index), and may apply stashes on rollback. Back up repositories or test in an isolated workspace.
- Pay attention to the tmux recovery logic: although it checks pane contents before sending Enter, regex checks can miss prompts. Prefer manual recovery when sessions run destructive shells; consider limiting which sessions the daemon scans.
- If you plan to enable a daemon/cron, control its user account and file permissions (sessions/ should be accessible only to the intended user) to avoid leaking transcripts or scavenged data.
- Ask the publisher to update metadata: list required binaries (tmux, jq, git) and explicitly document the directories it writes to and the daemon behavior. If you are not comfortable with automatic keystrokes or automatic git operations, do not install or run these components.
Capability Analysis
Type: OpenClaw Skill
Name: agent-ops
Version: 1.1.0
The skill bundle provides tools for monitoring and recovering AI agent sessions, including a script for token usage estimation (scripts/context-usage.sh) and several design patterns. While the intent is operational maintenance, the bundle is classified as suspicious due to high-risk capabilities described in the documentation (references/04-rate-limit.md and references/19-checkpoint-rollback.md). Specifically, it instructs the agent to use 'tmux send-keys' to inject Enter commands into active terminal panes and 'git add -A' followed by 'git stash' to automate state snapshots. These behaviors, particularly automated keystroke injection into other terminal sessions, represent a significant risk of unintended command execution or state corruption if the safety filters (regex-based checks for confirmation prompts) are bypassed or fail.
Capability Tags
Capability Assessment
Purpose & Capability
The declared purpose (rate-limit recovery, stale-session scavenging, checkpoint/rollback, token budgeting, model fallback) aligns with the scripts and reference docs: they operate on tmux panes, transcripts, and session files. However the skill metadata lists no required binaries or environment variables while the instructions and scripts clearly rely on external tools (tmux, git, jq, cron/systemd for daemons). The missing declaration is a coherence/packaging omission.
Instruction Scope
Runtime instructions include scanning tmux panes and sending Enter keys into panes, creating git checkpoints via `git add -A` and `git stash create`, running a stale-session daemon that reads transcripts and writes scavenged artifacts. These actions are within the stated domain but have nontrivial risk: blind or mistaken keystrokes can confirm destructive prompts, `git add -A` temporarily changes index state, and daemon transcript analysis may read and persist sensitive session data. The skill does include some safety checks (e.g., grep for confirmation prompts before sending Enter), but those checks are regex-based and can miss edge cases.
Install Mechanism
No install spec (instruction-only plus two small files). This is lower risk from a code-install perspective because nothing is downloaded or executed outside the repository. Files are small and human-readable. There is no packaged installer that would fetch arbitrary remote code.
Credentials
The skill requests no credentials or env vars, which is appropriate. That said, it expects access to local session state under sessions/<session-id>/ and to system tools (tmux, git, jq). Those local filesystem and binary accesses are consistent with its purpose but should be explicitly declared so users can evaluate permissions and side effects.
Persistence & Privilege
The skill recommends running daemons or cron jobs and writes state to sessions/* (heartbeat, checkpoint, failure-tracker.json, scavenged files, PID/state files). It does not set always:true or require platform-level privileges, but it does request persistent local presence and will create/modify files under session directories; users should consider where those directories live and who can read them.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-ops - After installation, invoke the skill by name or use
/agent-ops - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Version bump, consistency fixes
v1.0.0
Initial release: context estimation, rate limit recovery, checkpoint rollback, token budget
Metadata
Frequently Asked Questions
What is Agent Ops?
Agent session 运维工具。当需要检测和恢复 API 限速、回收死 session 的知识、在破坏性操作前自动快照、或监控 context 使用率时使用。不用于安装 hook 脚本(用 agent-hooks)或架构设计(用 harness-design-patterns)。 It is an AI Agent Skill for Claude Code / OpenClaw, with 105 downloads so far.
How do I install Agent Ops?
Run "/install agent-ops" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Ops free?
Yes, Agent Ops is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agent Ops support?
Agent Ops is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Ops?
It is built and maintained by _silhouette (@lanyasheng); the current version is v1.1.0.
More Skills