Auto Skill Evolver 1.5.1
by @zhangyingzhuangk
A meta-skill that continuously improves other skills through trace+feedback-driven evolution, with the goal of making skill training, status checking, and ap...
1. Self-Training Mode (The "Gym")
Use this mode when you want the agent to practice a specific task repeatedly to perfect a skill.
Command:
python skills/auto-skill-evolver/scripts/train_loop.py \
--skill-path "skills/target-skill/SKILL.md" \
--command "[\"your-agent-command\", \"--task\", \"do the thing\"]" \
--iterations 10 \
--interval 300 \
--trace-file "logs/execution.log" \
--interactive-each-iteration
Parameters:
--skill-path: The path to the skill file you want to improve.--command: The command to run the agent task. ["bin","--arg","value"]) for exact argv control.
- Security hardening: shell operators like &&, |, ;, redirection are rejected to prevent injection.
--iterations: How many times to practice (default: 10).--interval: Seconds to wait between iterations (e.g., 1800 for 30 mins).--trace-file: The file where your agent writes its execution logs.--interactive-each-iteration: If enabled, each iteration requires yes or hash approval before apply.2. In-Process Evolution (Hook Mode)
Use this mode to improve skills during normal usage.
Option A: Command Line Hook
# Step 1: Generate proposal and show full diff in current session
python skills/auto-skill-evolver/scripts/optimize_skill.py \
--skill-path "skills/target-skill/SKILL.md" \
--task-desc "User's request" \
--trace-file "logs/session.log" \
--feedback-file "logs/user_feedback.txt" \
--allowed-sections "Usage,How It Works,Security" \
--interactiveStep 2: Apply existing proposal later (mobile/remote friendly)
python skills/auto-skill-evolver/scripts/optimize_skill.py \
--skill-path "skills/target-skill/SKILL.md" \
--apply-proposal \
--approval-token yesStep 2 (token file mode): avoid exposing token in command args
python skills/auto-skill-evolver/scripts/optimize_skill.py \
--skill-path "skills/target-skill/SKILL.md" \
--apply-proposal \
--approval-token-file "runtime/approval_token.txt" \
--approval-expire-seconds 1800Step 3 (session-first): query current proposal status for mobile chat UI
python skills/auto-skill-evolver/scripts/optimize_skill.py \
--skill-path "skills/target-skill/SKILL.md" \
--status \
--output-mode jsonStep 4 (single-action mobile flow): one action param only
python skills/auto-skill-evolver/scripts/optimize_skill.py \
--skill-path "skills/target-skill/SKILL.md" \
--chat-action approve
Option B: Python Integration (Wrapper)
from skills.auto_skill_evolver.scripts.hook_wrapper import trigger_evolutionAfter task completion
report = trigger_evolution(
skill_path="skills/target-skill/SKILL.md",
task_desc="Analyze financial data",
trace_file="logs/trace_123.log",
feedback_file="logs/feedback_123.txt",
interactive=True # Ask for yes/hash approval before applying
)
print(report)
3. Version Control & Rollback
Every time the skill is updated, a backup is saved in .skill_versions/ inside the skill's directory.
Restore a previous version:
from skills.auto_skill_evolver.scripts.version_control import restore_version, list_versionsList available versions
versions = list_versions("skills/target-skill/SKILL.md")
for v in versions:
print(v['filename'], v['meta'])Restore
restore_version("skills/target-skill/SKILL.md", versions[1]['path'])
1. Python 3.8+ installed.
2. OpenClaw CLI installed and configured (openclaw command available in PATH, external dependency and not bundled by this skill package).
3. No external API key required (uses your local OpenClaw agent configuration).
4. Strongly recommended to run with human review (--interactive) unless you are in a trusted CI pipeline.
clawhub install auto-skill-evolver-1-5-1