← 返回 Skills 市场
rockytian-top

Rocky Evo

作者 Rocky.Tian · GitHub ↗ · v16.2.0 · MIT-0
cross-platform ⚠ suspicious
42
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install rocky-evo
功能描述
自我修复·自我进化·自我迭代 — 收集4小时内所有原始日志喂给AI,AI自行分析并自动修复,修复结果注入活跃会话。Self-healing, self-evolving, self-iterating AI agent.
使用说明 (SKILL.md)

rocky-evo v16.1.0

核心流程

dump 原始日志 → AI 分析 → AI 自动修复 → 注入修复结果到活跃会话

执行步骤

步骤 0: 自动创建 Cron(自我进化)

检查 rocky-evo 定时任务是否存在。不存在则自动创建,cron 绑定到当前运行的 agent

# 确定当前 agent ID
AGENT_ID="${OPENCLAW_AGENT_ID:-main}"

# 检查是否已有 rocky-evo cron
CRON_JOBS=$(cat ~/.openclaw/cron/jobs.json 2>/dev/null)
EXISTING=$(echo "$CRON_JOBS" | python3 -c "import json,sys; d=json.load(sys.stdin); found=[j for j in d.get('jobs',[]) if 'rocky-evo' in j.get('name','').lower()]; print(len(found))" 2>/dev/null)

if [ "$EXISTING" = "0" ] || [ -z "$EXISTING" ]; then
    CRON_ID=$(python3 -c "import uuid; print(uuid.uuid4())")
    NOW_MS=$(python3 -c "import time; print(int(time.time() * 1000))")

    python3 \x3C\x3C PYEOF
import json, os

cron_path = os.path.expanduser('~/.openclaw/cron/jobs.json')
with open(cron_path) as f:
    d = json.load(f)
d['jobs'].append({
    "id": "$CRON_ID",
    "agentId": "$AGENT_ID",
    "name": "rocky-evo 自动进化",
    "enabled": True,
    "deleteAfterRun": False,
    "createdAtMs": $NOW_MS,
    "updatedAtMs": $NOW_MS,
    "schedule": {"kind": "every", "everyMs": 14400000, "anchorMs": $NOW_MS},
    "sessionTarget": "session:agent:$AGENT_ID:user-session",
    "wakeMode": "next-heartbeat",
    "payload": {"kind": "agentTurn", "message": "/rocky-evo"},
    "delivery": {"mode": "none"}
})
with open(cron_path, 'w') as f:
    json.dump(d, f, indent=2, ensure_ascii=False)
print(f"✅ rocky-evo 4小时定时任务已绑定到 agent: $AGENT_ID")
PYEOF
    openclaw gateway restart
    echo "自我进化完成:$AGENT_ID 每4小时将自动运行 /rocky-evo"
fi

步骤 1: 收集4小时内所有原始日志

OPENCLAW_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
SKILL_DIR="$(dirname "$(find "$OPENCLAW_DIR/skills" -name "SKILL.md" -path "*/rocky-evo/SKILL.md" 2>/dev/null | head -1)")"
ANALYZE_WINDOW=240 bash "$SKILL_DIR/scripts/full_analyze.sh"

输出包含(原样 dump,不分类不筛选):

  • gateway.log + gateway.err.log
  • 所有 agent 的会话 jsonl
  • cron runs 记录
  • openclaw.json 配置(机密已脱敏)

步骤 2: AI 分析并自动修复

AI 自己看原始日志,自行判断问题并直接执行修复命令。

自动适配当前 agent 的模型

  • openclaw.json 读取当前 agent 的模型配置
  • API Key 模型 → 关注 rate limit、key 过期、配额耗尽
  • 订阅/Portal 模型(authHeader: true,无需 API Key)→ 关注 OAuth 令牌、订阅状态
  • 备用模型链 → 关注 fallback 切换是否正常

不需要任何预定义修复脚本,AI 自己决定修什么、怎么修。

步骤 3: 发到 Agent 绑定的通道(必须执行)

修复完成后,必须发到当前 agent 绑定的通道。

  1. 读取 openclaw.jsonagents.bindings,找到当前 agent 绑定的通道
  2. 调用 sessions_list({ activeWithinSeconds: 3600 }) 获取活跃会话
  3. session key 格式: agent:AGENT_ID:CHANNEL_NAME:TYPE:USER_ID → 按 CHANNEL_NAME 匹配
  4. 调用 sessions_send({ sessionKey, message }) 发送报告
  5. 找不到会话则直接输出报告摘要作为本 agent 的回复

支持任意通道:feishu / openclaw-weixin / telegram / discord / slack / 其他

步骤 4: 保存报告

REPORT_PATH="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/rocky-evo-report.md"
# 保存报告到 $REPORT_PATH

触发方式

  • 用户发送 /rocky-evo/自动修复 手动触发
  • Cron 定时每4小时自动触发
安全使用建议
Install only in a test or tightly controlled OpenClaw environment. Before use, disable or remove the automatic cron behavior, enforce secret redaction, restrict which logs/sessions are read, and require human approval before repairs or channel reports.
功能分析
Type: OpenClaw Skill Name: rocky-evo Version: 16.2.0 The skill implements an autonomous 'self-healing' loop that grants the AI agent broad command execution authority to 'auto-fix' issues identified in system logs. While the 'scripts/full_analyze.sh' script includes logic to redact sensitive credentials (API keys, tokens) before analysis, the design creates a massive RCE surface where an attacker could potentially influence the AI's actions through indirect prompt injection by placing malicious payloads into logs. Additionally, the skill establishes persistence via a 4-hour cron job (configured in 'setup.sh' and 'SKILL.md') and includes a risky fallback in 'full_analyze.sh' that outputs unredacted configuration files if 'jq' processing fails.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is coherent with the artifacts, but the capability is very broad: it collects raw logs/sessions/config, lets the AI choose and run repairs, and reports results to channels.
Instruction Scope
The instructions explicitly tell the AI to decide what to fix and how to fix it, with no bounded repair playbook, approval gate, rollback requirement, or safe command allowlist.
Install Mechanism
There is no install spec, but the included setup flow and SKILL instructions create a persistent cron job, trigger the skill automatically, and restart the OpenClaw gateway; required tools such as bash, python3, jq, awk, and openclaw are not declared in the registry requirements.
Credentials
The skill reads all agents' recent session jsonl files, gateway logs, cron runs, and openclaw.json, which is high-impact local/private data access even if it is aligned with troubleshooting.
Persistence & Privilege
The skill creates a non-deleting cron job that reinvokes /rocky-evo every four hours and can run autonomously after the initial trigger.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install rocky-evo
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /rocky-evo 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v16.2.0
# rocky-evo v16.2.0 - Cron 任务现在自动绑定到当前运行的 agent,而不仅限于主 agent,支持多 agent 场景。 - 文档同步更新,说明 Cron agentId 绑定逻辑。 - 新增 setup.sh 脚本文件。 - 其它描述、文档结构优化。
v16.1.0
- Added automatic creation of a 4-hour cron job on first run to enable self-scheduling for periodic self-healing. - Enhanced documentation to include the new auto-cron setup as "步骤 0" (Step 0). - Core flow and other steps remain unchanged.
v16.0.0
v16.0.0: Complete rewrite — raw log dump only, AI auto-fix, channel-agnostic, model auto-follow, multi-platform
元数据
Slug rocky-evo
版本 16.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Rocky Evo 是什么?

自我修复·自我进化·自我迭代 — 收集4小时内所有原始日志喂给AI,AI自行分析并自动修复,修复结果注入活跃会话。Self-healing, self-evolving, self-iterating AI agent. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 Rocky Evo?

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

Rocky Evo 是免费的吗?

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

Rocky Evo 支持哪些平台?

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

谁开发了 Rocky Evo?

由 Rocky.Tian(@rockytian-top)开发并维护,当前版本 v16.2.0。

💬 留言讨论