Install
openclaw skills install auto-skill-evolver-1-5-1A meta-skill that continuously improves other skills through trace+feedback-driven evolution, with the goal of making skill training, status checking, and ap...
openclaw skills install auto-skill-evolver-1-5-1This skill allows your AI agent to autonomously improve its own skills. It uses an iterative "training" process where the agent practices a task, evaluates the result, and rewrites the skill definition to perform better next time.
⚠️ Security Notice: This skill modifies code/config files on your local machine. It runs the local
openclawCLI and executes arbitrary commands defined by you. Use with caution and review changes before applying them.
openclaw command available in PATH, external dependency and not bundled by this skill package).--interactive) unless you are in a trusted CI pipeline.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.&&, |, ;, 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.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" \
--interactive
# Step 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 yes
# Step 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 1800
# Step 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 json
# Step 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_evolution
# After 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)
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_versions
# List 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'])
.proposed and .proposed.meta.json.yes or exact proposal hash.--apply-proposal, no re-optimization needed.--approval-expire-seconds to reject stale proposals.--status and --output-mode json to expose proposal state and next actions to chat/mobile UI.--chat-action propose|status|approve reduces client decision complexity.This skill includes built-in defenses against Prompt Injection attacks from execution logs and local file tampering:
curl, rm -rf, chmod 777, disk destructive patterns)tempfile + os.replace) to prevent partial writes and race-condition corruption..secure_workspace) with restricted permissions (current user only) to prevent tampering during the update process.Usage, How It Works, Security). Frontmatter and non-whitelisted sections remain unchanged.yes or exact hash entry, and full diff is always visible in-session.--approval-token-file supports file-based approval for mobile/server control without exposing token in process args.--approval-expire-seconds enforces max age to block stale proposal apply.--output-mode json emits machine-readable proposal/approval events for conversation-driven clients.risk_level (low|medium|high) for red/yellow/green mobile cards.--allowed-skill-roots limits writable target ranges to approved root paths.--allow-self-target only in controlled maintenance.Use the same script with one action:
# Start training proposal
python skills/auto-skill-evolver/scripts/optimize_skill.py --skill-path "skills/target-skill/SKILL.md" --chat-action propose --task-desc "..." --trace-file "..." --feedback-file "..."
# Check proposal in 3-line text mode (small screen)
python skills/auto-skill-evolver/scripts/optimize_skill.py --skill-path "skills/target-skill/SKILL.md" --chat-action status --output-mode text
# Approve proposal (requires explicit yes/hash token or interactive input)
python skills/auto-skill-evolver/scripts/optimize_skill.py --skill-path "skills/target-skill/SKILL.md" --chat-action approve
Natural language mode (no need to remember action flags):
# Chinese: start training
python skills/auto-skill-evolver/scripts/optimize_skill.py --chat-text "训练 auto-skill-evolver"
# English: start training
python skills/auto-skill-evolver/scripts/optimize_skill.py --chat-text "train auto-skill-evolver"
# Chinese: check status
python skills/auto-skill-evolver/scripts/optimize_skill.py --chat-text "查看 auto-skill-evolver 状态" --output-mode text
# English: approve
python skills/auto-skill-evolver/scripts/optimize_skill.py --chat-text "approve auto-skill-evolver"
The router can infer action + skill from natural phrases:
训练 xxx 优化 xxx 让 xxx 技能迭代 让 xxx 技能进化查看 xxx 训练状态 查询 xxx 状态批准 xxx 应用 xxx 提案 确认通过 xxxtrain xxx optimize xxx evolve xxxstatus xxx check xxx progressapprove xxx apply xxx proposalIf user says 这个技能 / 当前技能 / this skill, it maps to auto-skill-evolver.
This release is hardened for marketplace safety review:
.proposed + .proposed.meta.json).yes or proposal hash), including token-file and deferred apply mode.Legacy high-risk flags are intentionally rejected:
--auto-apply--disable-section-whitelistRun local checks before publishing:
python -m py_compile skills/auto-skill-evolver/scripts/optimize_skill.py
python skills/auto-skill-evolver/scripts/optimize_skill.py --help
Expected outcome:
skills/auto-skill-evolver/
├── SKILL.md # This file
├── prompts/
│ └── optimizer.md # The meta-prompt for the Optimizer LLM
└── scripts/
├── optimize_skill.py # Core optimization logic
├── train_loop.py # Self-training loop
└── version_control.py# Backup and restore utilities