← Back to Skills Marketplace
rockytian-top

Rocky Evo

by Rocky.Tian · GitHub ↗ · v16.2.0 · MIT-0
cross-platform ⚠ suspicious
42
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install rocky-evo
Description
自我修复·自我进化·自我迭代 — 收集4小时内所有原始日志喂给AI,AI自行分析并自动修复,修复结果注入活跃会话。Self-healing, self-evolving, self-iterating AI agent.
README (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小时自动触发
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install rocky-evo
  3. After installation, invoke the skill by name or use /rocky-evo
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug rocky-evo
Version 16.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Rocky Evo?

自我修复·自我进化·自我迭代 — 收集4小时内所有原始日志喂给AI,AI自行分析并自动修复,修复结果注入活跃会话。Self-healing, self-evolving, self-iterating AI agent. It is an AI Agent Skill for Claude Code / OpenClaw, with 42 downloads so far.

How do I install Rocky Evo?

Run "/install rocky-evo" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Rocky Evo free?

Yes, Rocky Evo is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Rocky Evo support?

Rocky Evo is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Rocky Evo?

It is built and maintained by Rocky.Tian (@rockytian-top); the current version is v16.2.0.

💬 Comments