Agent Health Optimizer
by @zihaofeng2001
Audit and improve your OpenClaw setup with one skill. Scores agent health, audits memory hygiene, checks cron reliability, and compares installed skills agai...
clawhub install agent-health-optimizerπ About This Skill
name: agent-health-optimizer description: "Audit and improve your OpenClaw setup with one skill. Scores agent health, audits memory hygiene, checks cron reliability, and compares installed skills against ClawHub β with conservative fixes instead of reckless auto-repair." metadata: openclaw: requires: bins: ["openclaw", "python3"]
Agent Health Optimizer
Diagnose, score, and steadily improve your OpenClaw setup.
This skill is an audit toolkit, not a magic self-healing system. It is good at surfacing likely problems, weak spots, and opportunities. Its --fix mode is intentionally conservative.
Requirements
Quick Start
# Full diagnostic suite β one command
python3 scripts/self_optimize.pyIndividual tools
python3 scripts/health_score.py # Health grade (A+ to F)
python3 scripts/memory_auditor.py # Memory hygiene check
python3 scripts/cron_optimizer.py # Cron analysis
python3 scripts/cron_optimizer.py --fix # Conservative auto-repair (backs up first)
python3 scripts/skill_comparator.py # Adjacent/overlapping ClawHub skills
What It Does
π₯ health_score.py β Agent Health Grade (0-100)
Scores 5 dimensions:
π memory_auditor.py β Memory Hygiene
Detects:
β° cron_optimizer.py β Cron Job Doctor
Detects:
to)--fix mode:
memory/cron-backup.json before changesdelivery=noneπ¦ skill_comparator.py β Skill Landscape Checker
Via ClawHub API (https://clawhub.ai/api/v1/):
Important: these are comparison hints, not authoritative replacements.
π self_optimize.py β Unified Runner
Runs all 4 tools and produces:
memory/ for historical reviewWhat It Reads & Writes
Reads (non-destructive):
memory/*.mdskills/*/SKILL.mdopenclaw cron list --jsonhttps://clawhub.ai/api/v1/skills/...Writes (reports only):
memory/health-score.jsonmemory/memory-audit.jsonmemory/cron-optimizer.jsonmemory/skill-comparator.jsonmemory/self-optimize-report.jsonmemory/self-optimize-last.jsonModifies (only with --fix):
cron_optimizer.py --fix edits cron jobs via openclaw cron editmemory/cron-backup.json firstPeriodic Self-Optimization
Set up a weekly cron (read-only, no --fix):
openclaw cron add \
--name "Agent Self-Optimize" \
--cron "0 11 * * 0" \
--tz "America/Los_Angeles" \
--session isolated \
--stagger 2m \
--no-deliver \
--message "Run agent self-optimization:
python3 ~/.openclaw/workspace/skills/agent-health-optimizer/scripts/self_optimize.pyReport results. List HIGH priority issues first. Keep it brief if everything looks fine."
Positioning
Use this skill when you want:
Do not treat it as a substitute for human review on destructive or far-reaching changes.
Credits
Diagnostic patterns informed by:
License
This work is licensed under CC BY-SA 4.0. You are free to share and adapt, with attribution and same-license requirement.
π‘ Examples
# Full diagnostic suite β one command
python3 scripts/self_optimize.pyIndividual tools
python3 scripts/health_score.py # Health grade (A+ to F)
python3 scripts/memory_auditor.py # Memory hygiene check
python3 scripts/cron_optimizer.py # Cron analysis
python3 scripts/cron_optimizer.py --fix # Conservative auto-repair (backs up first)
python3 scripts/skill_comparator.py # Adjacent/overlapping ClawHub skills