← 返回 Skills 市场
dorianyoung7702

Claw Mission Killer

作者 maomao · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
201
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install claw-mission-killer
功能描述
Interrupt a running agent task and rollback its session to the state before the last triggering user message. Use when an agent is stuck, running the wrong t...
使用说明 (SKILL.md)

agent-interrupt

One command. Agent stops. Memory rolled back. Like it never happened.

When an agent goes off-track — running the wrong task, stuck in a loop, or executing something you didn't intend — agent-interrupt kills it cleanly and rewinds its memory to before it received that task.


Quick Start

After installing, run once to set up all your agents:

python -X utf8 scripts/install.py

Then just tell your assistant:

kill dev1
kill all

What It Does

  1. Kills the process — Finds and terminates the agent's running subprocess (precise PID or workspace path fallback)
  2. Verifies it's dead — Aborts if any process survives; transcript stays untouched
  3. Backs up memory — Saves the removed messages to interrupt-logs/ for recovery
  4. Rolls back transcript — Deletes the last user message (the task trigger) and everything after it
  5. Agent wakes up clean — It enters standby with no memory of the interrupted task

Fuzzy Agent Matching

No need to remember exact agent IDs. It understands names:

kill dev1        → matches zero_dev1
kill pm          → matches zero_pm
kill 开发工程师   ��� matches by Chinese name
kill all         → interrupts every agent except main

Precise Kill (Recommended)

For agents running long scripts, use run.py wrapper so they can be killed precisely:

# Instead of: python your_script.py
python -X utf8 scripts/run.py --agent \x3Cyour_agent_id> -- python your_script.py

install.py automatically adds this protocol to all your agents' AGENTS.md files. New agents added later are picked up automatically via a background watcher.


Recovery

Every rollback is backed up:

~/.openclaw/agents/\x3Cid>/interrupt-logs/rollback-YYYYMMDD-HHMMSS.jsonl

Append the backup lines back to the transcript to restore.


Scripts

Script Purpose
interrupt.py Kill + rollback (main script)
install.py One-time setup for all agents
run.py Wrapper for precise kill support
watch.py Auto-injects new agents (runs via cron)
mark.py Manual PID registration (advanced)

Platform

Works on Windows, Linux, macOS. No external dependencies beyond Python stdlib.

安全使用建议
This skill appears to implement exactly what it claims: local utilities to register long-running agent processes, kill them, and roll back the last user message. Before installing: 1) Backup ~/.openclaw and your agents' AGENTS.md and session transcripts so you can recover if something goes wrong. 2) Review openclaw.json to confirm agent workspaces are correct — the tool locates processes by workspace path and will append to AGENTS.md. 3) Prefer running install.py and watch.py in dry-run mode first, and test interrupt.py with --dry-run on a non-critical agent. 4) Beware collateral damage: process matching falls back to substring-matching the workspace in ps output and kill is aggressive (kill -9 / Stop-Process). If a workspace path is a common substring, unrelated processes could be matched. 5) mark.py lets any process register a PID for an agent; ensure only trusted agent code runs the marker to avoid accidental/unauthorized kills. 6) The tool is local-only (no network exfiltration seen), but it modifies files and can terminate OS processes — use in a controlled environment and verify backups and permissions first.
功能分析
Type: OpenClaw Skill Name: claw-mission-killer Version: 0.1.0 The 'claw-mission-killer' skill is a management utility designed to terminate runaway agent processes and rollback their session history. It functions by identifying agent-related PIDs using system tools (wmic, ps, or PowerShell) and modifying the session .jsonl files to remove the last task trigger. While the skill performs high-risk actions such as process termination and file deletion, these behaviors are strictly aligned with its stated purpose, include safety features like dry-run modes and backups (saved to 'interrupt-logs/'), and show no signs of data exfiltration, obfuscation, or malicious intent.
能力评估
Purpose & Capability
Name/description (interrupt + rollback) match the included scripts. The bundle contains an installer, a wrapper to register PIDs (run.py), a marker utility (mark.py), the main interrupt/rollback logic (interrupt.py) and a watcher (watch.py) to auto-inject integration — all relevant to implementing an agent-kill-and-rollback feature.
Instruction Scope
The runtime instructions and scripts intentionally read and modify OpenClaw config and agent workspace files (openclaw.json, AGENTS.md), create marker files under ~/.openclaw/agents/<id>/running.json, scan system processes, kill PIDs, backup and edit session transcript files, and write interrupt-logs. Those actions are expected for this purpose, but they are broad: they modify other agents' AGENTS.md, touch transcripts and markers, and terminate OS processes — which can cause data loss or collateral kills if used incorrectly.
Install Mechanism
There is no external installer or network download; this is instruction + local Python scripts only (stdlib usage). No package pulls or remote fetches are present in the provided files.
Credentials
The skill requires no cloud credentials or external secrets and reads only local OpenClaw files and agent workspaces. That access is appropriate for a tool that needs to modify agent transcripts and markers. It does rely on the presence of an OpenClaw home (defaults to ~/.openclaw) and read/write access there.
Persistence & Privilege
always is false (not forced). The skill writes persistent artifacts: it injects blocks into AGENTS.md, writes running.json markers and interrupt-logs, and watch.py is intended to be run periodically (cron). That file-modifying behavior is consistent with the described functionality but may be surprising to users who don't expect automatic edits to AGENTS.md.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claw-mission-killer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claw-mission-killer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release — provides agent interrupt and rollback functionality with Python scripts. - Add scripts to install, interrupt, mark, run, and watch agent processes, enabling kill and rollback of agent sessions. - Supports interruption of individual agents by ID/name or all agents at once. - Rolls back agent memory to the state before the last user-triggering message; backs up removed transcript for recovery. - Includes setup and background watcher for automatic protocol injection into new agents. - Multi-platform support (Windows, Linux, macOS); no dependencies beyond Python stdlib.
v1.0.0
Initial release: kill agents, rollback memory, precise PID support, fuzzy agent matching, auto-install
元数据
Slug claw-mission-killer
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Claw Mission Killer 是什么?

Interrupt a running agent task and rollback its session to the state before the last triggering user message. Use when an agent is stuck, running the wrong t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 201 次。

如何安装 Claw Mission Killer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claw-mission-killer」即可一键安装,无需额外配置。

Claw Mission Killer 是免费的吗?

是的,Claw Mission Killer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claw Mission Killer 支持哪些平台?

Claw Mission Killer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claw Mission Killer?

由 maomao(@dorianyoung7702)开发并维护,当前版本 v0.1.0。

💬 留言讨论