En

Agent优化专家

A Self-Healing Engine for Automatically Diagnosing and Fixing Agent Execution Issues

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: Agent优化专家.
It is used for: A Self-Healing Engine for Automatically Diagnosing and Fixing Agent Execution Issues
Full Skill content: https://321skill.com/skills/agent-self-healing-engine/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses the frequent execution anomalies encountered by AI Agents in production environments, including Cron task failures, tool invocation errors, unexpected workflow interruptions, and gradual performance degradation. In practice, operations personnel and developers often need to manually investigate logs, identify root causes, and execute fixes—a process that is cumbersome and experience-dependent. The Agent Optimization Expert automates this process, forming a closed loop of "Detection → Diagnosis → Repair → Verification → Learning → Evolution".

Usage is highly intuitive. You simply need to describe the issue in natural language, such as "system diagnosis," "fix cron failure," "check system health," or "self-healing repair." It will then automatically run a diagnostic decision tree to identify anomalies at the Cron, tool invocation, sub-Agent, or system resource levels, and apply minimal changes based on built-in repair templates. After a fix is completed, error logs are recorded to the learnings/ directory, capturing new error patterns for faster response to similar issues in the future.

It is ideal for teams or individuals requiring high availability for their AI Agents, especially developers already using OpenClaw or Hermes Agent as their automation engine. Operations engineers can use it as a daily inspection tool, Agent developers can leverage its self-evolution capability to continuously optimize Agent behavior, and product teams can reduce service disruptions caused by underlying Agent failures.

It is recommended to install this Skill immediately after deploying the Agent environment and configure scheduled heartbeats (e.g., daily self-checks + weekly knowledge updates) to fully utilize its self-healing capabilities. Note that it primarily targets technical issues at the Agent execution level and is not suitable for business logic troubleshooting, Lark content editing, or data query tasks. Certain advanced operations (such as modifying core configurations) will prompt for user confirmation to prevent unintended actions.

Key Features

Unlike generic log monitoring or alerting tools, the Agent Optimization Expert not only diagnoses problems but also incorporates learnable templates such as `fix-templates.md` and `error-taxonomy.md`. It can automatically repair common issues like Cron configuration errors and tool invocation timeouts, and self-evolves after each repair by updating its knowledge base. Furthermore, it natively supports both OpenClaw and Hermes Agent environments, automatically identifying platform-specific commands without requiring manual switching.

Limitations

Requires an OpenClaw or Hermes Agent environment to run. Local deployment of auxiliary services like SearXNG and Firecrawl is necessary for certain diagnostics (e.g., network health checks). It does not support standalone execution purely in the cloud.

FAQ

How do I trigger an automatic diagnosis?

Simply instruct the AI with commands like "system diagnosis," "fix cron," or "check system health" to trigger it. You can also configure scheduled tasks (e.g., daily self-checks) for automatic execution.

Which Agent platforms are supported?

It is compatible with both OpenClaw and Hermes Agent environments. It automatically detects the current platform and switches to the corresponding CLI commands or tools.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/agent-self-healing-engine/raw/index.md to read the original Skill definition (Markdown format) for Agent优化专家, and install it according to the instructions.